1 /* 2 * Copyright 2003,2004 The Apache Software Foundation. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 /* 17 18 */ 19 20 package org.apache.pluto.om.common; 21 22 import java.util.List; 23 24 25 /** 26 * <P> 27 * This interface provides access to change a set of <CODE>Preference</CODE> objects. 28 * </P> 29 * <P> 30 * This interface defines the controller as known from the MVC pattern. 31 * Its purpose is to provide write access to the data stored in the model. 32 * </P> 33 */ 34 35 public interface PreferenceSetCtrl extends org.apache.pluto.om.Controller 36 { 37 38 39 /** 40 * Creates a new preference and adds it to the set 41 * The return value cannot be NULL. 42 * 43 * @param name the name of the new preference 44 * @param values the values of the new preference 45 * 46 * @return the new preference 47 */ 48 public Preference add(String name, List values); 49 50 /** 51 * Removes the preference with the given name 52 * from the set 53 * The return value may be NULL. 54 * 55 * @param name the name of the preference to be removed 56 * 57 * @return the removed preference 58 */ 59 public Preference remove(String name); 60 61 /** 62 * Removes the given preference from the set 63 * 64 * @param preference the preference to be removed 65 */ 66 public void remove(Preference preference); 67 68 } 69