001/*
002 *  Copyright 2018 Anyware Services
003 *
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016package org.ametys.plugins.repository.data.holder.group;
017
018/**
019 * Interface for modifiable repeater entries
020 */
021public interface ModifiableRepeaterEntry extends RepeaterEntry, ModifiableComposite
022{
023    /**
024     * Sets the position of the entry in the repeater. The position starts at index 1.
025     * The position can be an integer between 1 and the repeater size to move an entry from the beginning
026     * Or the position can an integer between 0 and - the repeater size to move an entry from the end (0 means at the end, -1 means before the last one and so on)
027     * @param position The new position of the entry
028     * @throws IllegalArgumentException if the position is not between the negative and positive repeater size
029     */
030    public void setPosition(int position) throws IllegalArgumentException;
031}