com.sapportals.wcm.repository.service.layout.info

Class SettingsContainer

java.lang.Object
  extended by com.sapportals.wcm.repository.service.layout.info.SettingsContainer

public class SettingsContainer
extends Object

acts as a container keeping a map of ISettingInfo instances as well as a map of IResourceBasedInfo instances. If the setting for the requested SettingInfoKey or RID does not exist, it is created, added to the map and returned to the calling class.


Constructor Summary
SettingsContainer(Locale locale)
           
 
Method Summary
 List flavorList()
           
 List getGlobalTypes()
           
 SettingInfoKey.Source[] getMergeMode()
           
 IResourceBasedInfo getResourceBasedInfo(com.sapportals.wcm.util.uri.RID rid)
           
 IResourceBasedInfo getResourceBasedInfo(String type)
           
 IResourceBasedInfo getResourceTypeBasedInfo(String type)
           
 ISettingInfo getSetting(SettingInfoKey key)
          returns an already existing ISettingInfo stored in the class' local map or creates a new instance and stores it in its map.
 Status getStatus()
           
 Status getStatus(SettingInfoKeyList list)
           
 SettingInfoKeyList keys()
           
 Locale locale()
           
 List parameterNameList()
           
 List ridList()
           
 void setMergeMode(SettingInfoKey.Source[] mode)
           
 List sourceList()
           
 List typeList()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SettingsContainer

public SettingsContainer(Locale locale)
Parameters:
locale - is needed for a future translation extension of the rendering information. Classes adding information to this container might not have access to the current locale at the time they need to add information here. Must not be null
Method Detail

getMergeMode

public SettingInfoKey.Source[] getMergeMode()

setMergeMode

public void setMergeMode(SettingInfoKey.Source[] mode)

getResourceBasedInfo

public IResourceBasedInfo getResourceBasedInfo(com.sapportals.wcm.util.uri.RID rid)
Parameters:
rid, - must not be null
Returns:
the instance of the IResourceBasedInfo that is mapped to the given rid-parameter. If no instance exists at the time of the call, a new, empty instance will be created and returned. The rid will be added to the list of global keys.

getResourceBasedInfo

public IResourceBasedInfo getResourceBasedInfo(String type)
Parameters:
type - is the type of the ITypedResourceList that is used to retrieve the customizing settings for the current rendering. Must not be null.
Returns:
the instance of the IResourceBasedInfo that is mapped to the given type-parameter. If no instance exists at the time of the call, a new, empty instance will be created and returned. The type will be added to the list of global keys.

getResourceTypeBasedInfo

public IResourceBasedInfo getResourceTypeBasedInfo(String type)

getGlobalTypes

public List getGlobalTypes()
Returns:
a new List instance that holds String representations of all RIDs and resourcelisttypes that have been added to the container using the getResourceBasedInfo() methods.

locale

public Locale locale()
Returns:
the locale set for this container, must not return null.

getSetting

public ISettingInfo getSetting(SettingInfoKey key)
returns an already existing ISettingInfo stored in the class' local map or creates a new instance and stores it in its map.

Parameters:
flavor - the flavor to retrieve the ISettingInfo for, must not be null
Returns:
an ISettingInfo, that might be newly created, but never null

keys

public SettingInfoKeyList keys()
Returns:
a new instance of a SettingInfoKeyList that includes all keys that have beed added using the method

ridList

public List ridList()
Returns:
the list of all RID instances that have been part of the SettingInfoKey instances used in the method.

typeList

public List typeList()

flavorList

public List flavorList()
Returns:
the list of all IFlavor instances that have been part of the SettingInfoKey instances used in the method.

sourceList

public List sourceList()
Returns:
the list of all Source instances as String representations, that have been part of the SettingInfoKey instances used in the method.

parameterNameList

public List parameterNameList()
Returns:
the list of all IParameterName instances that have been part of the SettingInfoKey instances used in the method.

getStatus

public Status getStatus(SettingInfoKeyList list)
Returns:
the status for this container's ISettingInfo instances that are mapped to the keys in the given list. The default return value should be Status.OK. The returned status reflects the highest severity any of these ISettingInfo instances indicate. Must not return null.

getStatus

public Status getStatus()
Returns:
the status for this container. The default return value should be Status.OK. It reflects the highest severity any of its contained classes indicates, either ISettingInfo or IResourceBasedInfo. Must not return null.
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