com.sas.portal.portlet.configuration
Interface Configuration

All Superinterfaces:
java.io.Serializable

public interface Configuration
extends java.io.Serializable

This interface represents a persistent configuration for a portlet instance. Configuration objects are unique to a PSPortlet. In simpler terms, this means that each unique combination of portlet/page/user can have its own unique Configuration object. Configuration maps a collection of name/value pairs, represented as instances of Attribute to metadata records with mostly Java Collection semantics. Currently, only OMR PropertySets are supported. A Configuration cannot be instantiated directly. Client code should use the ConfigurationFactory to create and save Configurations.

Since:
1/25/2003
See Also:
ConfigurationFactory, Attribute

Method Summary
 void addAll(java.util.Map map)
          Add all attributes from the map into this configuration
 Attribute getAttribute(java.lang.String name)
          Get the attribute of a given name
 java.util.List getAttributeNames()
          Get the list of attribute names known for this configuration
 java.lang.String getName()
          Get the name of this configuration object
 void removeAllAttributes()
          Remove all attributes.
 Attribute removeAttribute(java.lang.String name)
          Remove an attribute with a given name, if present
 Attribute setAttribute(Attribute attr)
          Set the attribute for this configuration
 Attribute setAttribute(java.lang.String name, java.lang.String value)
          Set the attribute name and value pair for this configuration
 

Method Detail

getName

java.lang.String getName()
Get the name of this configuration object

Returns:
the String name of the configuration object

setAttribute

Attribute setAttribute(java.lang.String name,
                       java.lang.String value)
Set the attribute name and value pair for this configuration

Parameters:
name - the name of the configuration object
value - the value of the configuration object
Returns:
the attribute representing this configuration

setAttribute

Attribute setAttribute(Attribute attr)
Set the attribute for this configuration

Parameters:
attr - the attribute containing the name/value pair
Returns:
the attribute representing this configuration

getAttribute

Attribute getAttribute(java.lang.String name)
Get the attribute of a given name

Parameters:
name - the name of the attribute to return
Returns:
the attribute matching the name given

getAttributeNames

java.util.List getAttributeNames()
Get the list of attribute names known for this configuration

Returns:
the ArrayList of attribute names

removeAttribute

Attribute removeAttribute(java.lang.String name)
Remove an attribute with a given name, if present

Parameters:
name - Name of the attribute to remove
Returns:
the attribute removed

removeAllAttributes

void removeAllAttributes()
Remove all attributes.


addAll

void addAll(java.util.Map map)
Add all attributes from the map into this configuration

Parameters:
map - keys are the names of the attributes, and the value is the value of the attribute.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.