Package org.opencms.ade.configuration
Class CmsADEConfigurationSequence
- java.lang.Object
-
- org.opencms.ade.configuration.CmsADEConfigurationSequence
-
public class CmsADEConfigurationSequence extends java.lang.Object
Represents a sequence of inherited module/sitemap configurations, together with an index into that list.Used for computing the configuration inheritance.
-
-
Constructor Summary
Constructors Modifier Constructor Description CmsADEConfigurationSequence(java.util.List<CmsADEConfigDataInternal.ConfigReferenceInstance> configDatas)
Creates a new instance for the given list of configuration data, with the index pointing to the last element.protected
CmsADEConfigurationSequence(java.util.List<CmsADEConfigDataInternal.ConfigReferenceInstance> configDatas, int index)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CmsADEConfigDataInternal
getConfig()
Gets the current configuration data.java.util.List<java.lang.String>
getConfigPaths()
Gets the list of configuration file paths in inheritance order, not including the module configuration.CmsADEConfigDataInternal.ConfigReferenceMeta
getMeta()
Gets the metadata associated with the path of master configuration references to the current configuration.com.google.common.base.Optional<CmsADEConfigurationSequence>
getParent()
Returns a sequence which only differs from this instance in that its index is one less.
-
-
-
Constructor Detail
-
CmsADEConfigurationSequence
public CmsADEConfigurationSequence(java.util.List<CmsADEConfigDataInternal.ConfigReferenceInstance> configDatas)
Creates a new instance for the given list of configuration data, with the index pointing to the last element.- Parameters:
configDatas
- the config data list
-
CmsADEConfigurationSequence
protected CmsADEConfigurationSequence(java.util.List<CmsADEConfigDataInternal.ConfigReferenceInstance> configDatas, int index)
Creates a new instance.- Parameters:
configDatas
- the configuration data listindex
- the index into the list
-
-
Method Detail
-
getConfig
public CmsADEConfigDataInternal getConfig()
Gets the current configuration data.- Returns:
- the current configuration data
-
getConfigPaths
public java.util.List<java.lang.String> getConfigPaths()
Gets the list of configuration file paths in inheritance order, not including the module configuration.- Returns:
- the list of configuration file paths
-
getMeta
public CmsADEConfigDataInternal.ConfigReferenceMeta getMeta()
Gets the metadata associated with the path of master configuration references to the current configuration.- Returns:
- the metadata associated with the path of master configuration references to the current configuration.
-
getParent
public com.google.common.base.Optional<CmsADEConfigurationSequence> getParent()
Returns a sequence which only differs from this instance in that its index is one less.However, if the index of this instance is already 0, Optional.absent will be returned.
- Returns:
- the parent sequence, or Optional.absent if we are already at the start of the sequence
-
-