com.atlassian.jira.issue.fields.layout.column
Class DefaultColumnLayoutManager

java.lang.Object
  extended by com.atlassian.jira.issue.fields.layout.column.DefaultColumnLayoutManager
All Implemented Interfaces:
ColumnLayoutManager

public class DefaultColumnLayoutManager
extends Object
implements ColumnLayoutManager


Constructor Summary
DefaultColumnLayoutManager(FieldManager fieldManager, OfBizDelegator ofBizDelegator, UserKeyService userKeyService, com.atlassian.cache.CacheManager cacheManager)
           
 
Method Summary
 ColumnLayout getColumnLayout(com.atlassian.crowd.embedded.api.User remoteUser)
          Get the columns layout for a user, if the user does not have one the default is returned
 ColumnLayout getColumnLayout(com.atlassian.crowd.embedded.api.User remoteUser, SearchRequest searchRequest)
          Get the columns layout for a searchRequest, if the searchRequest does not have one the user's columns are returned.
 ColumnLayout getDefaultColumnLayout()
           
 ColumnLayout getDefaultColumnLayout(com.atlassian.crowd.embedded.api.User remoteUser)
          Get the default Layout, and filter out the columns which a user cannot see
 EditableDefaultColumnLayout getEditableDefaultColumnLayout()
          Get an editable default column layout for the system
 EditableSearchRequestColumnLayout getEditableSearchRequestColumnLayout(com.atlassian.crowd.embedded.api.User user, SearchRequest searchRequest)
          Get an editable column layout for the searchRequest, returns null if it does not have one
 EditableUserColumnLayout getEditableUserColumnLayout(com.atlassian.crowd.embedded.api.User user)
          Get an editable column layout for the user, returns null if they do not have one
 boolean hasColumnLayout(Long filterId)
          Tells whether the filter with the given id has columns configured.
 boolean hasColumnLayout(SearchRequest searchRequest)
          Tells whether the given filter has columns configured.
 boolean hasColumnLayout(com.atlassian.crowd.embedded.api.User user)
          Tells whether the given user has a column layout.
 boolean hasDefaultColumnLayout()
          Tells whether the system has a default column layout object in the persistent store.
 void onClearCache(ClearCacheEvent event)
           
 void refresh()
           
 void restoreDefaultColumnLayout()
          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 restoreUserColumnLayout(com.atlassian.crowd.embedded.api.User user)
           
 void storeEditableDefaultColumnLayout(EditableDefaultColumnLayout editableDefaultColumnLayout)
          Writes the default column layout to permanent storage
 void storeEditableSearchRequestColumnLayout(EditableSearchRequestColumnLayout editableSearchRequestColumnLayout)
          Writes the default column layout to permanent storage
 void storeEditableUserColumnLayout(EditableUserColumnLayout editableUserColumnLayout)
          Writes the default column layout to permanent storage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultColumnLayoutManager

public DefaultColumnLayoutManager(FieldManager fieldManager,
                                  OfBizDelegator ofBizDelegator,
                                  UserKeyService userKeyService,
                                  com.atlassian.cache.CacheManager cacheManager)
Method Detail

onClearCache

@EventListener
public void onClearCache(ClearCacheEvent event)

refresh

public void refresh()
Specified by:
refresh in interface ColumnLayoutManager

getColumnLayout

public ColumnLayout getColumnLayout(com.atlassian.crowd.embedded.api.User remoteUser)
                             throws ColumnLayoutStorageException
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 interface ColumnLayoutManager
Returns:
Immutable ColumnLayout to be used when displaying
Throws:
ColumnLayoutStorageException

getDefaultColumnLayout

public ColumnLayout getDefaultColumnLayout(com.atlassian.crowd.embedded.api.User 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 interface ColumnLayoutManager
Throws:
ColumnLayoutStorageException

getDefaultColumnLayout

public ColumnLayout getDefaultColumnLayout()
                                    throws ColumnLayoutStorageException
Specified by:
getDefaultColumnLayout in interface ColumnLayoutManager
Throws:
ColumnLayoutStorageException

getEditableDefaultColumnLayout

public EditableDefaultColumnLayout getEditableDefaultColumnLayout()
Description copied from interface: ColumnLayoutManager
Get an editable default column layout for the system

Specified by:
getEditableDefaultColumnLayout in interface ColumnLayoutManager

getEditableUserColumnLayout

public EditableUserColumnLayout getEditableUserColumnLayout(com.atlassian.crowd.embedded.api.User user)
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 interface ColumnLayoutManager
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 interface ColumnLayoutManager
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 interface ColumnLayoutManager
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 interface ColumnLayoutManager

restoreUserColumnLayout

public void restoreUserColumnLayout(com.atlassian.crowd.embedded.api.User user)
Specified by:
restoreUserColumnLayout in interface ColumnLayoutManager

getColumnLayout

public ColumnLayout getColumnLayout(com.atlassian.crowd.embedded.api.User 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 interface ColumnLayoutManager
Returns:
Immutable ColumnLayout to be used when displaying
Throws:
ColumnLayoutStorageException

getEditableSearchRequestColumnLayout

public EditableSearchRequestColumnLayout getEditableSearchRequestColumnLayout(com.atlassian.crowd.embedded.api.User 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 interface ColumnLayoutManager
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 interface ColumnLayoutManager

restoreSearchRequestColumnLayout

public void restoreSearchRequestColumnLayout(SearchRequest searchRequest)
                                      throws ColumnLayoutStorageException
Specified by:
restoreSearchRequestColumnLayout in interface ColumnLayoutManager
Throws:
ColumnLayoutStorageException

hasColumnLayout

public boolean hasColumnLayout(SearchRequest searchRequest)
Description copied from interface: ColumnLayoutManager
Tells whether the given filter has columns configured.

Specified by:
hasColumnLayout in interface ColumnLayoutManager
Returns:
true only if the filter has a column layout.

hasColumnLayout

public boolean hasColumnLayout(Long filterId)
Description copied from interface: ColumnLayoutManager
Tells whether the filter with the given id has columns configured.

Specified by:
hasColumnLayout in interface ColumnLayoutManager
Returns:
true only if there is a filter with the id and its has a column layout.

hasColumnLayout

public boolean hasColumnLayout(com.atlassian.crowd.embedded.api.User user)
Description copied from interface: ColumnLayoutManager
Tells whether the given user has a column layout.

Specified by:
hasColumnLayout in interface ColumnLayoutManager
Returns:
true only if the given user has a column layout.

hasDefaultColumnLayout

public boolean hasDefaultColumnLayout()
                               throws ColumnLayoutStorageException
Description copied from interface: ColumnLayoutManager
Tells whether the system has a default column layout object in the persistent store.

Specified by:
hasDefaultColumnLayout in interface ColumnLayoutManager
Returns:
true only if there is a default column layout.
Throws:
ColumnLayoutStorageException - when the persistent store is inaccessible.


Copyright © 2002-2015 Atlassian. All Rights Reserved.