All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javax.portlet.MutablePortletParameters Maven / Gradle / Ivy

Go to download

The Java Portlet API version 3.0 developed by the Java Community Process JSR-362 Expert Group.

There is a newer version: 3.0.1
Show newest version
/*  Licensed to the Apache Software Foundation (ASF) under one
 *  or more contributor license agreements.  See the NOTICE file
 *  distributed with this work for additional information
 *  regarding copyright ownership.  The ASF licenses this file
 *  to you under the Apache License, Version 2.0 (the
 *  "License"); you may not use this file except in compliance
 *  with the License.  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing,
 *  software distributed under the License is distributed on an
 *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 *  KIND, either express or implied.  See the License for the
 *  specific language governing permissions and limitations
 *  under the License.
 */

/*
 * This source code implements specifications defined by the Java
 * Community Process. In order to remain compliant with the specification
 * DO NOT add / change / or delete method signatures!
 */

package javax.portlet;

import java.util.Set;

/**
 * 
* The MutablePortletParameters provides methods that allow * setting parameters to define a potential future render state. *

* {@link RenderState} provides a description of the render state. * {@link PortletParameters} provides a description of the parameter concept. *

* @see RenderState * @see PortletParameters * @see MutableRenderState * @since 3.0 */ public interface MutablePortletParameters extends PortletParameters, Mutable { /** *
* Returns a Set of String * objects containing the names of the parameters contained * in this object. *

* A parameter cannot be added through use of the set. * However, removing a parameter from the set will remove the * underlying parameter. *

* Only parameter names targeted to the current portlet are returned. *

* * * @return a Set of String * objects, each String containing * the name of a parameter; or an * empty Set if the * MutablePortletParameters object has no parameters. * * @since 3.0 */ public Set getNames(); /** *
* Sets a String parameter. *

* If the parameter already exists, this method replaces * all existing values with the new value. *

* A parameter value of null is valid. *

* To remove a parameter, use {@link #removeParameter(String)}. *

* * @param name * the parameter name * @param value * the parameter value * * @return The previous parameter value, or * null if there was no previous value. * * @since 3.0 * * @exception java.lang.IllegalArgumentException * if name is null. */ public String setValue (String name, String value); /** *
* Sets a multivalued String parameter. *

* If the parameter already exists, this method replaces * all existing values with the new value array. *

* An input value of null or an empty array is valid. * These values will be preserved when reading the parameter through * {@link PortletParameters#getValues(String)}, but will be * mapped to the value null when the parameter is read * through {@link PortletParameters#getValue(String)}. *

* A parameter value of null within the array is valid. *

* To remove a parameter, use {@link #removeParameter(String)}. *

* * @param name * the parameter name * @param values * An array of parameter values * * @return The previous parameter value array, or * null if there was no previous value. * * @since 3.0 * * @exception java.lang.IllegalArgumentException * if name is null */ public String[] setValues (String name, String... values); /** *
* Removes the given public or private parameter. * All values associated with the name are removed. *
* * @param name * the parameter name * * @exception java.lang.IllegalArgumentException * if name is null. * * @return true if the parameter name was present. * * @since 3.0 */ public boolean removeParameter (String name); /** *
* Makes the public and private parameters identical to * those of the input PortletParameters object. *

* The parameters are copied so that after the operation completes, there * is no linkage to the input object. *

* * @param params - input portlet parameters * * @return MutablePortletParameters object containing the previous values * * @since 3.0 */ public MutablePortletParameters set(PortletParameters params); /** *
* Adds the parameters from the input PortletParameters object * if they are not already present. * If a parameter from the input object is already present, its value * will be updated with the input value. *

* The parameters are copied so that after the operation completes, there * is no linkage to the input object. *

* * @param params - input portlet parameters * * @return MutablePortletParameters object containing the previous values * * @since 3.0 */ public MutablePortletParameters add(PortletParameters params); /** *
* Clears all parameters. *
* @since 3.0 */ public void clear(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy