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
Direct Known Subclasses:
EnterpriseColumnLayoutManager

public class DefaultColumnLayoutManager
extends java.lang.Object
implements ColumnLayoutManager


Field Summary
protected static int DEFAULT_CACHE_SIZE
           
 
Constructor Summary
DefaultColumnLayoutManager(FieldManager fieldManager)
           
 
Method Summary
 ColumnLayout getColumnLayout(com.opensymphony.user.User remoteUser)
          Get the columns layout for a user, if the user does not have one the default is returned
 ColumnLayout getColumnLayout(com.opensymphony.user.User remoteUser, SearchRequest searchRequest)
          Get the columns layout for a searchRequest, if the searchRequest does not have one the user's columns are returned.
protected  java.util.List getColumnLayoutItems(java.lang.String username, java.util.Set availableFields)
           
 ColumnLayout getDefaultColumnLayout()
           
 ColumnLayout getDefaultColumnLayout(com.opensymphony.user.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.opensymphony.user.User user, SearchRequest searchRequest)
          Get an editable column layout for the searchRequest, returns null if it does not have one
 EditableUserColumnLayout getEditableUserColumnLayout(com.opensymphony.user.User user)
          Get an editable column layout for the user, returns null if they do not have one
protected  FieldManager getFieldManager()
           
 boolean hasColumnLayout(SearchRequest searchRequest)
           
 boolean hasColumnLayout(com.opensymphony.user.User user)
           
 boolean hasDefaultColumnLayout()
           
 void refresh()
           
protected  void removeColumnLayoutItems(org.ofbiz.core.entity.GenericValue columnLayoutGV)
           
 void restoreDefaultColumnLayout()
           
 void restoreSearchRequestColumnLayout(SearchRequest searchRequest)
           
 void restoreUserColumnLayout(com.opensymphony.user.User user)
           
protected  void storeColumnLayoutItems(org.ofbiz.core.entity.GenericValue columnLayoutGV, ColumnLayout columnLayout)
           
 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
protected  java.util.List verifyColumnLayoutItems(org.ofbiz.core.entity.GenericValue columnLayoutGV, java.util.Set availableFields)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CACHE_SIZE

protected static final int DEFAULT_CACHE_SIZE
See Also:
Constant Field Values
Constructor Detail

DefaultColumnLayoutManager

public DefaultColumnLayoutManager(FieldManager fieldManager)
Method Detail

hasDefaultColumnLayout

public boolean hasDefaultColumnLayout()
                               throws ColumnLayoutStorageException
Specified by:
hasDefaultColumnLayout in interface ColumnLayoutManager
Throws:
ColumnLayoutStorageException

hasColumnLayout

public boolean hasColumnLayout(com.opensymphony.user.User user)
                        throws ColumnLayoutStorageException
Specified by:
hasColumnLayout in interface ColumnLayoutManager
Throws:
ColumnLayoutStorageException

hasColumnLayout

public boolean hasColumnLayout(SearchRequest searchRequest)
                        throws ColumnLayoutStorageException
Specified by:
hasColumnLayout in interface ColumnLayoutManager
Throws:
ColumnLayoutStorageException

getColumnLayout

public ColumnLayout getColumnLayout(com.opensymphony.user.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 nto have one the default is returned

Specified by:
getColumnLayout in interface ColumnLayoutManager
Returns:
Immutable ColumnLayout to be used when displaying
Throws:
ColumnLayoutStorageException

getColumnLayout

public ColumnLayout getColumnLayout(com.opensymphony.user.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.opensymphony.user.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

refresh

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

getEditableDefaultColumnLayout

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

Specified by:
getEditableDefaultColumnLayout in interface ColumnLayoutManager
Throws:
ColumnLayoutStorageException

getEditableUserColumnLayout

public EditableUserColumnLayout getEditableUserColumnLayout(com.opensymphony.user.User user)
                                                     throws ColumnLayoutStorageException
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
Throws:
ColumnLayoutStorageException

getColumnLayoutItems

protected java.util.List getColumnLayoutItems(java.lang.String username,
                                              java.util.Set availableFields)
                                       throws ColumnLayoutStorageException
Throws:
ColumnLayoutStorageException

verifyColumnLayoutItems

protected java.util.List verifyColumnLayoutItems(org.ofbiz.core.entity.GenericValue columnLayoutGV,
                                                 java.util.Set availableFields)
                                          throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getEditableSearchRequestColumnLayout

public EditableSearchRequestColumnLayout getEditableSearchRequestColumnLayout(com.opensymphony.user.User user,
                                                                              SearchRequest searchRequest)
                                                                       throws ColumnLayoutStorageException
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
Throws:
ColumnLayoutStorageException

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

storeColumnLayoutItems

protected void storeColumnLayoutItems(org.ofbiz.core.entity.GenericValue columnLayoutGV,
                                      ColumnLayout columnLayout)
                               throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

storeEditableSearchRequestColumnLayout

public void storeEditableSearchRequestColumnLayout(EditableSearchRequestColumnLayout editableSearchRequestColumnLayout)
                                            throws ColumnLayoutStorageException
Description copied from interface: ColumnLayoutManager
Writes the default column layout to permanent storage

Specified by:
storeEditableSearchRequestColumnLayout in interface ColumnLayoutManager
Throws:
ColumnLayoutStorageException

restoreDefaultColumnLayout

public void restoreDefaultColumnLayout()
                                throws ColumnLayoutStorageException
Specified by:
restoreDefaultColumnLayout in interface ColumnLayoutManager
Throws:
ColumnLayoutStorageException

restoreUserColumnLayout

public void restoreUserColumnLayout(com.opensymphony.user.User user)
                             throws ColumnLayoutStorageException
Specified by:
restoreUserColumnLayout in interface ColumnLayoutManager
Throws:
ColumnLayoutStorageException

removeColumnLayoutItems

protected void removeColumnLayoutItems(org.ofbiz.core.entity.GenericValue columnLayoutGV)
                                throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

restoreSearchRequestColumnLayout

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

getFieldManager

protected FieldManager getFieldManager()


Copyright © 2002-2010 Atlassian. All Rights Reserved.