|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.opencms.jsp.decorator.CmsDecoratorConfiguration
public class CmsDecoratorConfiguration
The CmsDecoratorConfiguration initalizes and stores the text decorations.
It uses uses the information of one or more to create the
pre- and postfixs for text decorations.
CmsDecorationDefintion
| Field Summary | |
|---|---|
static java.lang.String |
XPATH_DECORATION
The xpath for the decoration configuration. |
static java.lang.String |
XPATH_EXCLUDE
The xpath for the exclude configuration. |
static java.lang.String |
XPATH_USELOCALE
The xpath for the uselocale configuration. |
| Constructor Summary | |
|---|---|
CmsDecoratorConfiguration()
Constructor, creates a new, empty CmsDecoratorConfiguration. |
|
CmsDecoratorConfiguration(CmsObject cms)
Constructor, creates a new, empty CmsDecoratorConfiguration. |
|
CmsDecoratorConfiguration(CmsObject cms,
java.lang.String configFile)
Constructor, creates a new, CmsDecoratorConfiguration with a given config file. |
|
CmsDecoratorConfiguration(CmsObject cms,
java.lang.String configFile,
java.util.Locale locale)
Constructor, creates a new, CmsDecoratorConfiguration with a given config file and locale. |
|
| Method Summary | |
|---|---|
void |
addDecorations(CmsDecorationDefintion decorationDefinition)
Adds decorations defined in a object to the map of all decorations. |
CmsObject |
getCms()
Returns the cms. |
java.lang.String |
getConfigFile()
Returns the configFile. |
java.util.Locale |
getConfigurationLocale()
Returns the configurationLocale. |
CmsDecorationDefintion |
getDecorationDefinition(CmsXmlContent configuration,
int i)
Builds a CmsDecorationDefintion from a given configuration file. |
java.util.List<CmsDecorationDefintion> |
getDecorationDefinitions()
Returns the list with all
instances parsed from the config file. |
CmsDecorationBundle |
getDecorations()
Gets the decoration bundle. |
java.util.List<java.lang.String> |
getExcludes()
Returns the excludes. |
java.util.Locale |
getLocale()
Returns the locale. |
java.util.List<java.lang.String> |
getUsedDecorations()
Returns the usedDecorations. |
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. |
void |
setCms(CmsObject cms)
Sets the cms. |
void |
setConfigFile(java.lang.String configFile)
Sets the configFile. |
void |
setConfigurationLocale(java.util.Locale configurationLocale)
Sets the configurationLocale. |
void |
setDecorationDefinitions(java.util.List<CmsDecorationDefintion> decorationDefinitions)
Sets the decorationDefinitions. |
void |
setDecorations(CmsDecorationBundle decorations)
Sets the decoration bundle, overwriting an exiting one. |
void |
setExcludes(java.util.List<java.lang.String> excludes)
Sets the excludes. |
void |
setLocale(java.util.Locale locale)
Sets the locale. |
void |
setUsedDecorations(java.util.List<java.lang.String> usedDecorations)
Sets the usedDecorations. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String XPATH_DECORATION
public static final java.lang.String XPATH_EXCLUDE
public static final java.lang.String XPATH_USELOCALE
| Constructor Detail |
|---|
public CmsDecoratorConfiguration()
public CmsDecoratorConfiguration(CmsObject cms)
throws CmsException
cms - the CmsObject
CmsException - if something goes wrong
public CmsDecoratorConfiguration(CmsObject cms,
java.lang.String configFile)
throws CmsException
cms - the CmsObjectconfigFile - the configuration file
CmsException - if something goes wrong
public CmsDecoratorConfiguration(CmsObject cms,
java.lang.String configFile,
java.util.Locale locale)
throws CmsException
cms - the CmsObjectconfigFile - the configuration filelocale - to locale to build this configuration for
CmsException - if something goes wrong| Method Detail |
|---|
public void addDecorations(CmsDecorationDefintion decorationDefinition)
throws CmsException
CmsDecorationDefintion object to the map of all decorations.
decorationDefinition - the CmsDecorationDefintion the decorations to be added
CmsException - if something goes wrongpublic CmsObject getCms()
public java.lang.String getConfigFile()
public java.util.Locale getConfigurationLocale()
public CmsDecorationDefintion getDecorationDefinition(CmsXmlContent configuration,
int i)
getDecorationDefinition in interface I_CmsDecoratorConfigurationconfiguration - the configuration filei - the number of the decoration definition to create
public java.util.List<CmsDecorationDefintion> getDecorationDefinitions()
CmsDecorationDefintion
instances parsed from the config file.
CmsDecorationDefintion instances
parsed from the config filepublic CmsDecorationBundle getDecorations()
getDecorations in interface I_CmsDecoratorConfigurationpublic java.util.List<java.lang.String> getExcludes()
public java.util.Locale getLocale()
public java.util.List<java.lang.String> getUsedDecorations()
public boolean hasUsed(java.lang.String key)
hasUsed in interface I_CmsDecoratorConfigurationkey - the key to look for
public void init(CmsObject cms,
java.lang.String configFile,
java.util.Locale locale)
throws CmsException
I_CmsDecoratorConfiguration
init in interface I_CmsDecoratorConfigurationcms - the CmsObjectconfigFile - the configuration filelocale - to locale to build this configuration for
CmsException - if something goes wrongI_CmsDecoratorConfiguration.init(org.opencms.file.CmsObject, java.lang.String, java.util.Locale)public boolean isExcluded(java.lang.String tag)
isExcluded in interface I_CmsDecoratorConfigurationtag - the tag to test
public void markAsUsed(java.lang.String key)
markAsUsed in interface I_CmsDecoratorConfigurationkey - the key to markpublic void resetMarkedDecorations()
resetMarkedDecorations in interface I_CmsDecoratorConfigurationpublic void setCms(CmsObject cms)
cms - the cms to setpublic void setConfigFile(java.lang.String configFile)
configFile - the configFile to setpublic void setConfigurationLocale(java.util.Locale configurationLocale)
configurationLocale - the configurationLocale to setpublic void setDecorationDefinitions(java.util.List<CmsDecorationDefintion> decorationDefinitions)
decorationDefinitions - the decorationDefinitions to setpublic void setDecorations(CmsDecorationBundle decorations)
decorations - new decoration bundlepublic void setExcludes(java.util.List<java.lang.String> excludes)
excludes - the excludes to setpublic void setLocale(java.util.Locale locale)
locale - the locale to setpublic void setUsedDecorations(java.util.List<java.lang.String> usedDecorations)
usedDecorations - the usedDecorations to setpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||