org.opencms.jsp.decorator
Interface I_CmsDecoratorConfiguration

All Known Implementing Classes:
CmsDecoratorConfiguration

public interface I_CmsDecoratorConfiguration

Interface for a CmsDecoratorConfiguration.

This interface describes a CmsDecoratorConfiguration which provides methods to get a filled CmsDecorationBundle. A decoration bundle contains a datastructure of text decorations which can be used in the current request context.

Author:
Michael Emmerich

Method Summary
 CmsDecorationDefintion getDecorationDefinition(CmsXmlContent configuration, int i)
          Builds a CmsDecorationDefintion from a given configuration file.
 CmsDecorationBundle getDecorations()
          Gets the decoration bundle.
 boolean hasUsed(java.lang.String key)
          Tests if a decoration key was used before in this configuration.
 void init(CmsObject cms, java.lang.String configFile, java.util.Locale locale)
          Initialises the configuration.
 boolean isExcluded(java.lang.String tag)
          Tests if a tag is contained in the exclude list of the decorator.
 void markAsUsed(java.lang.String key)
          Mark a decoration key as already used.
 void resetMarkedDecorations()
          Resets the used decoration keys.
 

Method Detail

getDecorationDefinition

CmsDecorationDefintion getDecorationDefinition(CmsXmlContent configuration,
                                               int i)
Builds a CmsDecorationDefintion from a given configuration file.

Parameters:
configuration - the configuration file
i - the number of the decoration definition to create
Returns:
CmsDecorationDefintion created form configuration file

getDecorations

CmsDecorationBundle getDecorations()
Gets the decoration bundle.

Returns:
the decoration bundle to be used

hasUsed

boolean hasUsed(java.lang.String key)
Tests if a decoration key was used before in this configuration.

Parameters:
key - the key to look for
Returns:
true if this key was already used

init

void init(CmsObject cms,
          java.lang.String configFile,
          java.util.Locale locale)
          throws CmsException
Initialises the configuration.

Parameters:
cms - the CmsObject
configFile - the configuration file
locale - to locale to build this configuration for
Throws:
CmsException - if something goes wrong

isExcluded

boolean isExcluded(java.lang.String tag)
Tests if a tag is contained in the exclude list of the decorator.

Parameters:
tag - the tag to test
Returns:
true if the tag is in the exclode list, false othwerwise.

markAsUsed

void markAsUsed(java.lang.String key)
Mark a decoration key as already used.

Parameters:
key - the key to mark

resetMarkedDecorations

void resetMarkedDecorations()
Resets the used decoration keys.