|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.themes.DefaultCustomLayoutManager
public class DefaultCustomLayoutManager
Constructor Summary | |
---|---|
DefaultCustomLayoutManager(PersistentDecoratorDao persistentDecoratorDao)
|
Method Summary | |
---|---|
java.util.Collection<DefaultDecorator> |
getAllDefaultDecorators()
Retrieves a collection of all default decorators without customization |
java.util.Collection<PersistentDecorator> |
getApplicableCustomDecoratorsForSpace(java.lang.String spaceKey)
Returns allcustom decorators that apply to a space, whether they are space level or global level. |
java.util.Collection<PersistentDecorator> |
getCustomGlobalDecorators()
Returns all global custom decorators (does not retrieve space level decorators) |
java.util.Collection<PersistentDecorator> |
getCustomSpaceDecorators(java.lang.String spaceKey)
Returns all custom decorators defined for a specific space only (does not retrieve global decorators) |
DefaultDecorator |
getDefaultDecorator(java.lang.String decoratorName)
Retrieves the default decorator for a given decorator name without customization |
PersistentDecorator |
getPersistentDecorator(java.lang.String spaceKey,
java.lang.String decoratorName)
Retrieves a custom decorator for the (spaceKey, name) combination. |
boolean |
hasCustomDecorator(java.lang.String spaceKey,
java.lang.String decoratorName)
Determines if a given space overrides a default decorator with a custom one. |
boolean |
hasCustomGlobalDecorator(java.lang.String decoratorName)
Determines if a given default decorator is overridden globally |
boolean |
hasCustomSpaceDecorator(java.lang.String spaceKey,
java.lang.String decoratorName)
Determines if a given space overrides a default decorator with a custom one at the space level |
void |
remove(PersistentDecorator persistentDecorator)
Removes the given custom decorator, and flushes it from the velocity cache |
void |
remove(java.lang.String spaceKey,
java.lang.String decoratorName)
Removes the custom decorator with the given (spaceKey, name) pair, and flushes it from the velocity cache |
void |
removeAllCustomGlobalDecorators()
Removes all globally defines custom decorators (does not remove space level custom decorators) |
void |
removeAllCustomSpaceDecorators(java.lang.String spaceKey)
Removes all custom decorators defined for a given space (does not remove global ones) |
void |
saveOrUpdate(PersistentDecorator persistentDecorator)
Saves the given decorator (or updates it if it already exists), and updates the velocity cache |
void |
saveOrUpdate(java.lang.String spaceKey,
java.lang.String decoratorName,
java.lang.String content)
Creates a decorator for the given spaceKey with the given name, and saves it. |
boolean |
usesCustomLayout(java.lang.String spaceKey)
Determines if a space has any custom layout decorators defined. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultCustomLayoutManager(PersistentDecoratorDao persistentDecoratorDao)
Method Detail |
---|
public void saveOrUpdate(PersistentDecorator persistentDecorator)
CustomLayoutManager
saveOrUpdate
in interface CustomLayoutManager
public void saveOrUpdate(java.lang.String spaceKey, java.lang.String decoratorName, java.lang.String content)
CustomLayoutManager
saveOrUpdate
in interface CustomLayoutManager
spaceKey
- null spaceKey indicates a global decoratordecoratorName
- the filename of the decoratorcontent
- the decorator bodypublic PersistentDecorator getPersistentDecorator(java.lang.String spaceKey, java.lang.String decoratorName)
CustomLayoutManager
getPersistentDecorator
in interface CustomLayoutManager
spaceKey
- null spaceKey indicates a global decoratordecoratorName
- the filename of the decorator
public java.util.Collection<PersistentDecorator> getCustomSpaceDecorators(java.lang.String spaceKey)
CustomLayoutManager
getCustomSpaceDecorators
in interface CustomLayoutManager
spaceKey
- null spaceKey indicates a global decorator
public java.util.Collection<PersistentDecorator> getApplicableCustomDecoratorsForSpace(java.lang.String spaceKey)
CustomLayoutManager
getApplicableCustomDecoratorsForSpace
in interface CustomLayoutManager
public java.util.Collection<PersistentDecorator> getCustomGlobalDecorators()
CustomLayoutManager
getCustomGlobalDecorators
in interface CustomLayoutManager
public boolean hasCustomSpaceDecorator(java.lang.String spaceKey, java.lang.String decoratorName)
CustomLayoutManager
hasCustomSpaceDecorator
in interface CustomLayoutManager
spaceKey
- null spaceKey indicates globaldecoratorName
- the filename of the decorator
public boolean hasCustomGlobalDecorator(java.lang.String decoratorName)
CustomLayoutManager
hasCustomGlobalDecorator
in interface CustomLayoutManager
decoratorName
- the filename of the decorator
public boolean hasCustomDecorator(java.lang.String spaceKey, java.lang.String decoratorName)
CustomLayoutManager
hasCustomDecorator
in interface CustomLayoutManager
spaceKey
- null spaceKey indicates a global decoratordecoratorName
- the filename of the decorator
public boolean usesCustomLayout(java.lang.String spaceKey)
CustomLayoutManager
usesCustomLayout
in interface CustomLayoutManager
spaceKey
- null spaceKey indicates global
public void remove(java.lang.String spaceKey, java.lang.String decoratorName)
CustomLayoutManager
remove
in interface CustomLayoutManager
spaceKey
- null spaceKey indicates a global decoratordecoratorName
- the filename of the decoratorpublic void remove(PersistentDecorator persistentDecorator)
CustomLayoutManager
remove
in interface CustomLayoutManager
persistentDecorator
- the custom decorator to deletepublic void removeAllCustomSpaceDecorators(java.lang.String spaceKey)
CustomLayoutManager
removeAllCustomSpaceDecorators
in interface CustomLayoutManager
spaceKey
- null spaceKey indicates globalpublic void removeAllCustomGlobalDecorators()
CustomLayoutManager
removeAllCustomGlobalDecorators
in interface CustomLayoutManager
public DefaultDecorator getDefaultDecorator(java.lang.String decoratorName)
CustomLayoutManager
getDefaultDecorator
in interface CustomLayoutManager
decoratorName
- The filename of the default decoratorpublic java.util.Collection<DefaultDecorator> getAllDefaultDecorators()
CustomLayoutManager
getAllDefaultDecorators
in interface CustomLayoutManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |