Class DefaultColumnLayoutManager
java.lang.Object
com.atlassian.jira.issue.fields.layout.column.DefaultColumnLayoutManager
- All Implemented Interfaces:
InitializingComponent
,ColumnLayoutManager
public class DefaultColumnLayoutManager
extends Object
implements ColumnLayoutManager, InitializingComponent
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultColumnLayoutManager
(FieldManager fieldManager, OfBizDelegator ofBizDelegator, UserKeyService userKeyService, com.atlassian.cache.CacheManager cacheManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Called after all the beans are constructed and the ApplicationContext is fully populated.getColumnLayout
(ApplicationUser remoteUser) Get the columns layout for a user, if the user does not have one the default is returnedgetColumnLayout
(ApplicationUser remoteUser, SearchRequest searchRequest) Get the columns layout for a searchRequest, if the searchRequest does not have one the user's columns are returned.getDefaultColumnLayout
(ApplicationUser remoteUser) Get the default Layout, and filter out the columns which a user cannot seeGet an editable default column layout for the systemgetEditableSearchRequestColumnLayout
(ApplicationUser user, SearchRequest searchRequest) Get an editable column layout for the searchRequest, returns null if it does not have oneGet an editable column layout for the user, returns null if they do not have oneboolean
hasColumnLayout
(SearchRequest searchRequest) Tells whether the givenfilter
has columns configured.boolean
Tells whether the given user has a column layout.boolean
hasColumnLayout
(Long filterId) Tells whether the filter with the given id has columns configured.boolean
Tells whether the system has a default column layout object in the persistent store.void
onClearCache
(ClearCacheEvent event) void
void
refresh()
void
Sets the ColumnLayout in use for users who have not defined their own, also known as the System column layout.void
restoreSearchRequestColumnLayout
(SearchRequest searchRequest) void
void
storeEditableDefaultColumnLayout
(EditableDefaultColumnLayout editableDefaultColumnLayout) Writes the default column layout to permanent storagevoid
storeEditableSearchRequestColumnLayout
(EditableSearchRequestColumnLayout editableSearchRequestColumnLayout) Writes the default column layout to permanent storagevoid
storeEditableUserColumnLayout
(EditableUserColumnLayout editableUserColumnLayout) Writes the default column layout to permanent storage
-
Constructor Details
-
DefaultColumnLayoutManager
public DefaultColumnLayoutManager(FieldManager fieldManager, OfBizDelegator ofBizDelegator, UserKeyService userKeyService, com.atlassian.cache.CacheManager cacheManager)
-
-
Method Details
-
afterInstantiation
Description copied from interface:InitializingComponent
Called after all the beans are constructed and the ApplicationContext is fully populated. Order of execution is order of bean creation, driven by InitializingComponentProcessor.- Specified by:
afterInstantiation
in interfaceInitializingComponent
- Throws:
Exception
-
onClearCache
-
onColumnLayoutFKChangedEvent
-
refresh
public void refresh()- Specified by:
refresh
in interfaceColumnLayoutManager
-
getColumnLayout
Description copied from interface:ColumnLayoutManager
Get the columns layout for a user, if the user does not have one the default is returned- Specified by:
getColumnLayout
in interfaceColumnLayoutManager
- Returns:
- Immutable ColumnLayout to be used when displaying
- Throws:
ColumnLayoutStorageException
-
getDefaultColumnLayout
public ColumnLayout getDefaultColumnLayout(ApplicationUser remoteUser) throws ColumnLayoutStorageException Description copied from interface:ColumnLayoutManager
Get the default Layout, and filter out the columns which a user cannot see- Specified by:
getDefaultColumnLayout
in interfaceColumnLayoutManager
- Throws:
ColumnLayoutStorageException
-
getDefaultColumnLayout
- Specified by:
getDefaultColumnLayout
in interfaceColumnLayoutManager
-
getEditableDefaultColumnLayout
Description copied from interface:ColumnLayoutManager
Get an editable default column layout for the system- Specified by:
getEditableDefaultColumnLayout
in interfaceColumnLayoutManager
-
getEditableUserColumnLayout
Description copied from interface:ColumnLayoutManager
Get an editable column layout for the user, returns null if they do not have one- Specified by:
getEditableUserColumnLayout
in interfaceColumnLayoutManager
- Returns:
- EditableColumnLayout if there is one for the user otherwise return a new one generated from the default
-
storeEditableDefaultColumnLayout
public void storeEditableDefaultColumnLayout(EditableDefaultColumnLayout editableDefaultColumnLayout) throws ColumnLayoutStorageException Description copied from interface:ColumnLayoutManager
Writes the default column layout to permanent storage- Specified by:
storeEditableDefaultColumnLayout
in interfaceColumnLayoutManager
- Throws:
ColumnLayoutStorageException
-
storeEditableUserColumnLayout
public void storeEditableUserColumnLayout(EditableUserColumnLayout editableUserColumnLayout) throws ColumnLayoutStorageException Description copied from interface:ColumnLayoutManager
Writes the default column layout to permanent storage- Specified by:
storeEditableUserColumnLayout
in interfaceColumnLayoutManager
- Throws:
ColumnLayoutStorageException
-
restoreDefaultColumnLayout
public void restoreDefaultColumnLayout()Description copied from interface:ColumnLayoutManager
Sets the ColumnLayout in use for users who have not defined their own, also known as the System column layout.- Specified by:
restoreDefaultColumnLayout
in interfaceColumnLayoutManager
-
restoreUserColumnLayout
- Specified by:
restoreUserColumnLayout
in interfaceColumnLayoutManager
-
getColumnLayout
public ColumnLayout getColumnLayout(ApplicationUser remoteUser, SearchRequest searchRequest) throws ColumnLayoutStorageException Description copied from interface:ColumnLayoutManager
Get the columns layout for a searchRequest, if the searchRequest does not have one the user's columns are returned. If the user does not have one the default is returned- Specified by:
getColumnLayout
in interfaceColumnLayoutManager
- Returns:
- Immutable ColumnLayout to be used when displaying
- Throws:
ColumnLayoutStorageException
-
getEditableSearchRequestColumnLayout
public EditableSearchRequestColumnLayout getEditableSearchRequestColumnLayout(ApplicationUser user, SearchRequest searchRequest) Description copied from interface:ColumnLayoutManager
Get an editable column layout for the searchRequest, returns null if it does not have one- Specified by:
getEditableSearchRequestColumnLayout
in interfaceColumnLayoutManager
- Returns:
- EditableColumnLayout if there is one for the searchRequest otherwise return a new one generated from the default
-
storeEditableSearchRequestColumnLayout
public void storeEditableSearchRequestColumnLayout(EditableSearchRequestColumnLayout editableSearchRequestColumnLayout) Description copied from interface:ColumnLayoutManager
Writes the default column layout to permanent storage- Specified by:
storeEditableSearchRequestColumnLayout
in interfaceColumnLayoutManager
-
restoreSearchRequestColumnLayout
public void restoreSearchRequestColumnLayout(SearchRequest searchRequest) throws ColumnLayoutStorageException - Specified by:
restoreSearchRequestColumnLayout
in interfaceColumnLayoutManager
- Throws:
ColumnLayoutStorageException
-
hasColumnLayout
Description copied from interface:ColumnLayoutManager
Tells whether the givenfilter
has columns configured.- Specified by:
hasColumnLayout
in interfaceColumnLayoutManager
- Returns:
- true only if the filter has a column layout.
-
hasColumnLayout
Description copied from interface:ColumnLayoutManager
Tells whether the filter with the given id has columns configured.- Specified by:
hasColumnLayout
in interfaceColumnLayoutManager
- Returns:
- true only if there is a filter with the id and its has a column layout.
-
hasColumnLayout
Description copied from interface:ColumnLayoutManager
Tells whether the given user has a column layout.- Specified by:
hasColumnLayout
in interfaceColumnLayoutManager
- Returns:
- true only if the given user has a column layout.
-
hasDefaultColumnLayout
Description copied from interface:ColumnLayoutManager
Tells whether the system has a default column layout object in the persistent store.- Specified by:
hasDefaultColumnLayout
in interfaceColumnLayoutManager
- Returns:
- true only if there is a default column layout.
- Throws:
ColumnLayoutStorageException
- when the persistent store is inaccessible.
-