public class CmsFormatterChangeSet extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PREFIX_TYPE
The prefix used for types in the Add/RemoveFormatter fields in the configuration.
|
| Constructor and Description |
|---|
CmsFormatterChangeSet()
Creates an empty formatter change set.
|
CmsFormatterChangeSet(java.util.Collection<java.lang.String> toRemove,
java.util.Collection<java.lang.String> toAdd,
java.lang.String siteRoot,
boolean removeAllNonExplicitlyAdded)
Creates a new formatter change set.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyToFormatters(java.util.Map<CmsUUID,I_CmsFormatterBean> formatters,
CmsFormatterConfigurationCacheState externalFormatters)
Applies this change set to a list of external (non schema-based) formatters.
|
void |
applyToTypes(java.util.Set<java.lang.String> types)
Applies the changes (addition or removal of schema formatters) to a set of resource type names,
adding resource types for which schema formatters should be added and removing those for which
schema formatters should be removed.
|
static java.lang.String |
keyForType(java.lang.String typeName)
Produces the key for a given resource type.
|
public static final java.lang.String PREFIX_TYPE
public CmsFormatterChangeSet()
public CmsFormatterChangeSet(java.util.Collection<java.lang.String> toRemove, java.util.Collection<java.lang.String> toAdd, java.lang.String siteRoot, boolean removeAllNonExplicitlyAdded)
toRemove - the formatter keys to removetoAdd - the formatter keys to addsiteRoot - the site root of the current configremoveAllNonExplicitlyAdded - flag, indicating if all formatters that are not explicitly added should be removedpublic static java.lang.String keyForType(java.lang.String typeName)
typeName - the resource type namepublic void applyToFormatters(java.util.Map<CmsUUID,I_CmsFormatterBean> formatters, CmsFormatterConfigurationCacheState externalFormatters)
formatters - the map of formatters to which the changes should be appliedexternalFormatters - the formatter collection which should be used to add formatters which are not already present in 'formatters'public void applyToTypes(java.util.Set<java.lang.String> types)
types - the set of types to apply the changes to