com.sapportals.wcm.repository.service.layout.customizing

Interface IParameters

All Known Subinterfaces:
IParameterMap
All Known Implementing Classes:
AbstractCollectionRenderer, AbstractResourceRenderer, AlignmentCollectionRenderer, AlignmentCollectionRendererNews, BusinessCardCollectionRenderer, CollectionGridRenderer, CollectionGroupRenderer, CollectionListRenderer, CollectionTableRenderer, CollectionTabRenderer, HTMLRenderer, ImageMapRenderer, KMMonitorHistoryTableRenderer, LayoutObject, LightCollectionRenderer, LinkListCollectionRenderer, SlimCollectionListRenderer, SlimCollectionRenderer

public interface IParameters

The Parameters is a set of parameters used within the com.sapportals.rendering package. It provides a Properties like access to values with a default mechanism. A default Parameters object can be provided which is used, when a value is not found in the current object and in the getParameter methods a default value can be provided. Null key's or values are not permitted. All values are stored as String and can be retrieved as int or boolean as well. A special paramter with the key IParameterName.PARAMETERSET can be used to include other paramters sets within this paramter set. All included paramters sets are used to search for a key, if this key is not found in the main set.


Method Summary
 Object get(String key)
          Returns the value to which the specified key is mapped in this parameters set or in the default or in the default parameter set, when not found.
 List getMultiValueParameter(IParameterName key)
          Searches for the parameter with the specified key.
 String getParameter(IParameterName key)
          Searches for the parameter with the specified key.
 boolean getParameter(IParameterName key, boolean defaultValue)
          Searches for the parameter with the specified key.
 int getParameter(IParameterName key, int defaultValue)
          Searches for the parameter with the specified key.
 String getParameter(IParameterName key, String defaultValue)
          Searches for the parameter with the specified key.
 com.sapportals.htmlb.enums.TextViewDesign getParameter(IParameterName key, com.sapportals.htmlb.enums.TextViewDesign defaultValue)
          Searches for the parameter with the specified key.
 IParameters getParameters(IParameterName[] keys)
           
 boolean isExactlyValue(IParameterName key, Object checkValue)
          Checks if an entry in the set exists for the specified key, which has the specified value.
 boolean isNoOtherValue(IParameterName key, Object checkValue)
          Checks for a key if no other value than the specified value is set.
 IParameterNameSet parameterNames()
          Returns an enumeration of all the keys in this parameter set, including the keys in the default parameter set and all included paramters.
 Set parameters()
          Returns a Set view of the parameters contained in this parameters set.
 void removeParameter(IParameterName key)
          removes the parameter specified from the paramters map.
 Boolean setParameter(IParameterName key, boolean value)
          Calls the map.put(key, value) method.
 Integer setParameter(IParameterName key, int value)
          Calls the map.put(key, value) method.
 Object setParameter(IParameterName key, Object value)
           
 String setParameter(IParameterName key, String value)
          Calls the map.put(key, value) method.
 com.sapportals.htmlb.enums.TextViewDesign setParameter(IParameterName key, com.sapportals.htmlb.enums.TextViewDesign value)
          Calls the map.put(key, value) method.
 

Method Detail

setParameter

Object setParameter(IParameterName key,
                    Object value)

setParameter

String setParameter(IParameterName key,
                    String value)
Calls the map.put(key, value) method. This method is parrallel to the String getParameter(IParameterName key) method.

Parameters:
key - The key for the new Parameter
value - The value for the new Parameter
Returns:
previous value associated with specified key, or null if there was no mapping for key.
Throws:
NullpointerException - if the key or the value is null

setParameter

Integer setParameter(IParameterName key,
                     int value)
Calls the map.put(key, value) method. This method is parrallel to the String getParameter(IParameterName key) method. Here an int can be provided. The value will be stored as String .

Parameters:
key - The key for the new Parameter
value - The value for the new Parameter
Returns:
previous value associated with specified key, or null if there was no mapping for key.
Throws:
NullpointerException - if the key or the value is null
ClassCastException - if the old value is not a String
NumberFormatException - - if the old value cannot be parsed as an int.

setParameter

com.sapportals.htmlb.enums.TextViewDesign setParameter(IParameterName key,
                                                       com.sapportals.htmlb.enums.TextViewDesign value)
Calls the map.put(key, value) method. This method is parrallel to the String getParameter(IParameterName key) method. Here an TextViewDesign can be provided. The value will be stored as String .

Parameters:
key - The key for the new Parameter
value - The value for the new Parameter
Returns:
previous value associated with specified key, or null if there was no mapping for key.
Throws:
NullpointerException - if the key or the value is null
ClassCastException - if the old value is not a String

setParameter

Boolean setParameter(IParameterName key,
                     boolean value)
Calls the map.put(key, value) method. This method is parrallel to the String getParameter(IParameterName key) method. Here an int can be provided. The value will be stored as String .

Parameters:
key - The key for the new Parameter
value - The value for the new Parameter
Returns:
previous value associated with specified key, or null if there was no mapping for key.
Throws:
NullpointerException - if the key or the value is null
ClassCastException - if the old value is not a String

removeParameter

void removeParameter(IParameterName key)
removes the parameter specified from the paramters map. Only the first level map is considered. The paramter is not removed from any default map.


get

Object get(String key)
Returns the value to which the specified key is mapped in this parameters set or in the default or in the default parameter set, when not found.

Parameters:
key - a key of the parameter.
Returns:
the value to which the key is mapped in this parameters set; null if the key is not mapped to any value in this parameters set or in the default.
See Also:
#put(Object, Object)

parameterNames

IParameterNameSet parameterNames()
Returns an enumeration of all the keys in this parameter set, including the keys in the default parameter set and all included paramters.

Returns:
an enumeration of all the keys in this parameter set, including the keys in the default parameter set.
See Also:
Enumeration

parameters

Set parameters()
Returns a Set view of the parameters contained in this parameters set. Each element in this collection is a Map.Entry. In contrast to method entrySet() this set is not backed up by the map, but it contains all paramters accessible via this Paramters map, this means, all paramters contained in the map, in the default map and in all included parameter sets.

Returns:
a set view of the mappings contained in this parameters set.

getParameters

IParameters getParameters(IParameterName[] keys)

getParameter

String getParameter(IParameterName key)
Searches for the parameter with the specified key. If the key is not found in this parameter set, the default parameter set, and its defaults, recursively, are then checked. The method returns null if the parameter is not found.

Parameters:
key - the parameters key.
Returns:
the value in this parameter set with the specified key value.

getMultiValueParameter

List getMultiValueParameter(IParameterName key)
Searches for the parameter with the specified key. If the key is not found in this parameter set, the default parameter set, and its defaults, recursively, are then checked. The method returns null if the parameter is not found. The parameter is returned as java.util.List , even if it is a single Value Parameter. The class of the returned objects in the list can be asked via key.getMetaDate().getParameterClass()

Parameters:
key - the parameters key.
Returns:
the value in this parameter set with the specified key value.

getParameter

String getParameter(IParameterName key,
                    String defaultValue)
Searches for the parameter with the specified key. If the key is not found in this parameter set, the default parameter set, and its defaults, recursively, are then checked. The method returns the default value argument if the parameter is not found.

Parameters:
key - the parameters key.
defaultValue -
Returns:
the value in this parameter set with the specified key value.

getParameter

int getParameter(IParameterName key,
                 int defaultValue)
Searches for the parameter with the specified key. If the key is not found in this parameter set, the default parameter set, and its defaults, recursively, are then checked. The method returns the default value argument if the parameter is not found. The value is returned as int if possible.

Parameters:
key - the parameters key.
defaultValue - a default value.
Returns:
the value in this parameter set with the specified key value.

getParameter

boolean getParameter(IParameterName key,
                     boolean defaultValue)
Searches for the parameter with the specified key. If the key is not found in this parameter set, the default parameter set, and its defaults, recursively, are then checked. The method returns the default value argument if the parameter is not found. The value is returned as boolean . The boolean returned represents the value true if the parameters value is equal, ignoring case, to the string "true" .

Example: Boolean.valueOf("True") returns true .
Example: Boolean.valueOf("yes") returns false .

Parameters:
key - the parameters key.
defaultValue - a default value.
Returns:
the value in this parameter set with the specified key value.

getParameter

com.sapportals.htmlb.enums.TextViewDesign getParameter(IParameterName key,
                                                       com.sapportals.htmlb.enums.TextViewDesign defaultValue)
Searches for the parameter with the specified key. If the key is not found in this parameter set, the default parameter set, and its defaults, recursively, are then checked. The method returns the default value argument if the parameter is not found. The value is returned as TextViewDesign . If the stored String can not be converted into a TextViewDesign null is returned.

Parameters:
key - the parameters key.
defaultValue - a default value.
Returns:
the value in this parameter set with the specified key value.

isNoOtherValue

boolean isNoOtherValue(IParameterName key,
                       Object checkValue)
Checks for a key if no other value than the specified value is set. The value for the specified key is searched via the Object get(Object key) method an true is returned when no value is not found or the found value equals the specified value.

Parameters:
key - the paramters key to search
checkValue - the value to compare with
Returns:
true, if no entry is found for the specified key or if the found value equals the specified value
See Also:
get(Object key)

isExactlyValue

boolean isExactlyValue(IParameterName key,
                       Object checkValue)
Checks if an entry in the set exists for the specified key, which has the specified value. The value for the specified key is searched via the Object get(Object key) method an true is returned when a value is found which equals the specified value.

Parameters:
key - the paramters key to search
checkValue - the value to compare with
Returns:
true, if a value is found which equals the specified value
See Also:
get(Object key)
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM


Copyright 2011 SAP AG Complete Copyright Notice