|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.opencms.xml.containerpage.CmsFormatterConfiguration
public final class CmsFormatterConfiguration
Represents a formatter configuration.
A formatter configuration can be either defined in the XML schema XSD of a XML content, or in a special sitemap configuration file.
| Field Summary | |
|---|---|
static CmsFormatterConfiguration |
EMPTY_CONFIGURATION
The empty formatter configuration. |
static org.apache.commons.logging.Log |
LOG
The log instance for this class. |
| Method Summary | |
|---|---|
static CmsFormatterConfiguration |
create(CmsObject cms,
java.util.List<CmsFormatterBean> formatters)
Returns the formatter configuration for the current project based on the given list of formatters. |
java.util.List<CmsFormatterBean> |
getAllFormatters()
Gets a list of all defined formatters. |
CmsFormatterBean |
getFormatter(java.lang.String containerType,
int containerWidth)
Selects the matching formatter for the provided type and width from this configuration. |
CmsFormatterBean |
getPreviewFormatter()
Returns the formatter from this configuration that is to be used for the preview in the ADE gallery GUI, or null if there is no preview formatter configured. |
boolean |
hasFormatter(java.lang.String containerType,
int containerWidth)
Returns the provided true in case this configuration has a formatter
for the given type / width parameters. |
boolean |
hasFormatters()
Returns true in case there is at least one usable formatter configured in this configuration. |
static void |
initialize(CmsObject cms)
Initialize the formatter configuration. |
boolean |
isSearchContent(CmsUUID formatterStructureId)
Returns true in case this configuration contains a formatter with the
provided structure id that has been configured for including the formatted content in the online search. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final CmsFormatterConfiguration EMPTY_CONFIGURATION
public static final org.apache.commons.logging.Log LOG
| Method Detail |
|---|
public static CmsFormatterConfiguration create(CmsObject cms,
java.util.List<CmsFormatterBean> formatters)
cms - the current users OpenCms context, required to know which project to read the JSP fromformatters - the list of configured formatters
public static void initialize(CmsObject cms)
throws CmsException
cms - an initialized admin OpenCms user context
CmsException - in case the initialization failspublic java.util.List<CmsFormatterBean> getAllFormatters()
public CmsFormatterBean getFormatter(java.lang.String containerType,
int containerWidth)
This method first tries to find the formatter for the provided container type. If this fails, it returns the width based formatter that matched the container width.
containerType - the container typecontainerWidth - the container width
null if none was foundpublic CmsFormatterBean getPreviewFormatter()
null if there is no preview formatter configured.
null if there is no preview formatter configured
public boolean hasFormatter(java.lang.String containerType,
int containerWidth)
true in case this configuration has a formatter
for the given type / width parameters.
containerType - the container typecontainerWidth - the container width
true in case this configuration has a formatter
for the given type / width parameters.public boolean hasFormatters()
true in case there is at least one usable formatter configured in this configuration.
true in case there is at least one usable formatter configured in this configurationpublic boolean isSearchContent(CmsUUID formatterStructureId)
true in case this configuration contains a formatter with the
provided structure id that has been configured for including the formatted content in the online search.
formatterStructureId -
true in case this configuration contains a formatter with the
provided structure id that has been configured for including the formatted content in the online search
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||