org.opencms.ade.containerpage.inherited
Class CmsInheritedContainerState

java.lang.Object
  extended by org.opencms.ade.containerpage.inherited.CmsInheritedContainerState

public class CmsInheritedContainerState
extends java.lang.Object

The state of an inherited container at a given point in the VFS tree.


Constructor Summary
CmsInheritedContainerState()
          Default constructor.
 
Method Summary
protected  void addConfiguration(CmsContainerConfiguration configuration)
          Adds a configuration bean for a new tree level.
 void addConfigurations(CmsContainerConfigurationCache cache, java.lang.String rootPath, java.lang.String name, java.util.Locale locale)
          Reads the configurations for a root path and its parents from a cache instance and adds them to this state.
 java.util.List<CmsContainerElementBean> getElements(boolean includeHidden)
          Gets a list of container element beans which represent the state of the inherited container.
 java.util.Set<java.lang.String> getNewElementKeys()
          Gets the keys of new elements.
protected  java.util.List<java.lang.Boolean> getVisibilities(java.lang.String key)
          Gets the list of visibilities for a given key in all the tree levels.
 boolean hasElementWithKey(java.lang.String key)
          Checks whether an element with the given key is actually defined in this inherited container state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsInheritedContainerState

public CmsInheritedContainerState()
Default constructor.

Method Detail

addConfigurations

public void addConfigurations(CmsContainerConfigurationCache cache,
                              java.lang.String rootPath,
                              java.lang.String name,
                              java.util.Locale locale)
Reads the configurations for a root path and its parents from a cache instance and adds them to this state.

Parameters:
cache - the cache instance
rootPath - the root path
name - the name of the container configuration
locale - the locale

getElements

public java.util.List<CmsContainerElementBean> getElements(boolean includeHidden)
Gets a list of container element beans which represent the state of the inherited container.

The container element beans returned will have additional information available via the getInheritanceInfo method.

Parameters:
includeHidden - if true, hidden elements will be included in the result list
Returns:
the elements for this container state

getNewElementKeys

public java.util.Set<java.lang.String> getNewElementKeys()
Gets the keys of new elements.

Returns:
a set containing the keys of the new elements

hasElementWithKey

public boolean hasElementWithKey(java.lang.String key)
Checks whether an element with the given key is actually defined in this inherited container state.

Parameters:
key - the key for which the check should be performed
Returns:
true if an element with the key has been defined in this state

addConfiguration

protected void addConfiguration(CmsContainerConfiguration configuration)
Adds a configuration bean for a new tree level.

Parameters:
configuration - the configuration bean

getVisibilities

protected java.util.List<java.lang.Boolean> getVisibilities(java.lang.String key)
Gets the list of visibilities for a given key in all the tree levels.

Parameters:
key - the key for which the visibilities should be returned
Returns:
the list of visibilities, from top to bottom