public class DefaultCustomLayoutManager extends Object implements CustomLayoutManager
| Constructor and Description |
|---|
DefaultCustomLayoutManager(PersistentDecoratorDao persistentDecoratorDao,
com.atlassian.event.api.EventPublisher eventPublisher) |
| Modifier and Type | Method and Description |
|---|---|
Collection<DefaultDecorator> |
getAllDefaultDecorators()
Retrieves a collection of all default decorators without customization
|
Collection<PersistentDecorator> |
getApplicableCustomDecoratorsForSpace(String spaceKey)
Returns allcustom decorators that apply to a space, whether they are space level or global level.
|
Collection<PersistentDecorator> |
getCustomGlobalDecorators()
Returns all global custom decorators (does not retrieve space level decorators)
|
Collection<PersistentDecorator> |
getCustomSpaceDecorators(String spaceKey)
Returns all custom decorators defined for a specific space only (does not retrieve global decorators)
|
DefaultDecorator |
getDefaultDecorator(String decoratorName)
Retrieves the default decorator for a given decorator name without customization
|
PersistentDecorator |
getPersistentDecorator(String spaceKey,
String decoratorName)
Retrieves a custom decorator for the (spaceKey, name) combination.
|
boolean |
hasCustomDecorator(String spaceKey,
String decoratorName)
Determines if a given space overrides a default decorator with a custom one.
|
boolean |
hasCustomGlobalDecorator(String decoratorName)
Determines if a given default decorator is overridden globally
|
boolean |
hasCustomSpaceDecorator(String spaceKey,
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(String spaceKey,
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(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(String spaceKey,
String decoratorName,
String content)
Creates a decorator for the given spaceKey with the given name, and saves it.
|
boolean |
usesCustomLayout(String spaceKey)
Determines if a space has any custom layout decorators defined.
|
public DefaultCustomLayoutManager(PersistentDecoratorDao persistentDecoratorDao, com.atlassian.event.api.EventPublisher eventPublisher)
public void saveOrUpdate(PersistentDecorator persistentDecorator)
CustomLayoutManagersaveOrUpdate in interface CustomLayoutManagerpublic void saveOrUpdate(String spaceKey, String decoratorName, String content)
CustomLayoutManagersaveOrUpdate in interface CustomLayoutManagerspaceKey - null spaceKey indicates a global decoratordecoratorName - the filename of the decoratorcontent - the decorator bodypublic PersistentDecorator getPersistentDecorator(String spaceKey, String decoratorName)
CustomLayoutManagergetPersistentDecorator in interface CustomLayoutManagerspaceKey - null spaceKey indicates a global decoratordecoratorName - the filename of the decoratorpublic Collection<PersistentDecorator> getCustomSpaceDecorators(String spaceKey)
CustomLayoutManagergetCustomSpaceDecorators in interface CustomLayoutManagerspaceKey - null spaceKey indicates a global decoratorpublic Collection<PersistentDecorator> getApplicableCustomDecoratorsForSpace(String spaceKey)
CustomLayoutManagergetApplicableCustomDecoratorsForSpace in interface CustomLayoutManagerpublic Collection<PersistentDecorator> getCustomGlobalDecorators()
CustomLayoutManagergetCustomGlobalDecorators in interface CustomLayoutManagerpublic boolean hasCustomSpaceDecorator(String spaceKey, String decoratorName)
CustomLayoutManagerhasCustomSpaceDecorator in interface CustomLayoutManagerspaceKey - null spaceKey indicates globaldecoratorName - the filename of the decoratorpublic boolean hasCustomGlobalDecorator(String decoratorName)
CustomLayoutManagerhasCustomGlobalDecorator in interface CustomLayoutManagerdecoratorName - the filename of the decoratorpublic boolean hasCustomDecorator(String spaceKey, String decoratorName)
CustomLayoutManagerhasCustomDecorator in interface CustomLayoutManagerspaceKey - null spaceKey indicates a global decoratordecoratorName - the filename of the decoratorpublic boolean usesCustomLayout(String spaceKey)
CustomLayoutManagerusesCustomLayout in interface CustomLayoutManagerspaceKey - null spaceKey indicates globalpublic void remove(String spaceKey, String decoratorName)
CustomLayoutManagerremove in interface CustomLayoutManagerspaceKey - null spaceKey indicates a global decoratordecoratorName - the filename of the decoratorpublic void remove(PersistentDecorator persistentDecorator)
CustomLayoutManagerremove in interface CustomLayoutManagerpersistentDecorator - the custom decorator to deletepublic void removeAllCustomSpaceDecorators(String spaceKey)
CustomLayoutManagerremoveAllCustomSpaceDecorators in interface CustomLayoutManagerspaceKey - null spaceKey indicates globalpublic void removeAllCustomGlobalDecorators()
CustomLayoutManagerremoveAllCustomGlobalDecorators in interface CustomLayoutManagerpublic DefaultDecorator getDefaultDecorator(String decoratorName)
CustomLayoutManagergetDefaultDecorator in interface CustomLayoutManagerdecoratorName - The filename of the default decoratorpublic Collection<DefaultDecorator> getAllDefaultDecorators()
CustomLayoutManagergetAllDefaultDecorators in interface CustomLayoutManagerCopyright © 2003–2022 Atlassian. All rights reserved.