001    /**
002     * Copyright 2005-2012 The Kuali Foundation
003     *
004     * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
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     */
016    package org.kuali.rice.krad.uif.control;
017    
018    /**
019     * Indicates <code>Control</code> types that can be configured with a static value to submit, as opposed to pulling
020     * the value from the underlying property
021     *
022     * <p>
023     * Examples of this are {@link CheckboxControl}, which can be configured with a value that will be submitted when the
024     * checkbox is checked. For example, suppose we had a model property of type Set<String> that represents selected car
025     * types. In the UI, we can present a list of available car types with a checkbox next to each. The value for the
026     * each checkbox will be the model type of the associated role: 'Ford', 'GM', 'Honda'. For each checkbox selected the
027     * associated value will be submitted and populated into the Set<String> on the model.
028     * </p>
029     *
030     * @author Kuali Rice Team (rice.collab@kuali.org)
031     */
032    public interface ValueConfiguredControl {
033    
034        /**
035         * Retrieves the value that will be submitted with the control
036         *
037         * @return String control value
038         */
039        public String getValue();
040    
041        /**
042         * Setter for the value that should be submitted with the control
043         *
044         * @param value
045         */
046        public void setValue(String value);
047    }