com.sas.portal.portlet.configuration
Class ConfigurationFactory

com.sas.portal.portlet.configuration.ConfigurationFactory

public final class ConfigurationFactory

ConfigurationFactory is the mechanism whereby Configuration and Attribute objects are instantiated and serialized to the metadata store.

Since:
1/15/2003
See Also:
Configuration, Attribute

Method Summary
static Configuration getConfiguration(PortletContext pctx)
          Fetches a Configuration from metadata.
static Configuration getConfiguration(PortletContext pctx, boolean createConfiguration)
          Fetches the configuration based on the entity key of a portlet.
static Configuration storeConfiguration(PortletContext pctx, Configuration config)
          Persists the Configuration object to metadata.
 

Method Detail

getConfiguration

public static Configuration getConfiguration(PortletContext pctx,
                                             boolean createConfiguration)
                                      throws java.rmi.RemoteException
Fetches the configuration based on the entity key of a portlet. If createConfiguration is set to true, and the appropriate records are not found in the metadata store, then the records will be created and a Configuration instance will be returned; If createConfiguration is set to false, and the metadata records are not found, then the method will return null.

Parameters:
pctx - PortletContext of the calling portlet
createConfiguration - Create a new Configuration if one doesn't exist
Returns:
com.sas.portal.portlet.configuration.Configuration
Throws:
java.rmi.RemoteException

getConfiguration

public static Configuration getConfiguration(PortletContext pctx)
                                      throws java.rmi.RemoteException
Fetches a Configuration from metadata. This method call will create the metadata records if they do not exist.

Parameters:
pctx - PortletContext of the calling portlet
Returns:
Configuration - the configuration in this PortletContext
Throws:
java.rmi.RemoteException

storeConfiguration

public static Configuration storeConfiguration(PortletContext pctx,
                                               Configuration config)
                                        throws java.rmi.RemoteException
Persists the Configuration object to metadata. Performs dirty checking and detects updated Attributes as well as new Attributes.

Parameters:
pctx - PortletContext of the calling Portlet
config - Configuration to be persisted
Returns:
com.sas.portal.portlet.configuration.Configuration
Throws:
java.rmi.RemoteException



Copyright © 2009 SAS Institute Inc. All Rights Reserved.