com.atlassian.jira.web
Class FieldVisibilityManagerImpl

java.lang.Object
  extended by com.atlassian.jira.web.FieldVisibilityManagerImpl
All Implemented Interfaces:
FieldVisibilityManager

public class FieldVisibilityManagerImpl
extends Object
implements FieldVisibilityManager

Since:
v4.0

Field Summary
 
Fields inherited from interface com.atlassian.jira.web.FieldVisibilityManager
ALL_ISSUE_TYPES
 
Constructor Summary
FieldVisibilityManagerImpl(FieldManager fieldManager, ProjectManager projectManager)
          Deprecated. 
FieldVisibilityManagerImpl(FieldManager fieldManager, ProjectManager projectManager, ConstantsManager constantsManager, FieldLayoutManager fieldLayoutManager, SubTaskManager subTaskManager)
           
 
Method Summary
 boolean isCustomFieldHidden(Long projectId, Long customFieldId, String issueTypeId)
          Checks if the custom field is hidden in the project with id of projectId.
 boolean isCustomFieldVisible(Long projectId, Long customFieldId, String issueTypeId)
          Checks if the custom field is visible in the project with id of projectId.
 boolean isFieldHidden(Long projectId, String fieldId, Long issueTypeId)
          Checks if the field is hidden in the project with id of projectId.
 boolean isFieldHidden(Long projectId, String fieldId, String issueTypeId)
          Checks if specified field is hidden in at least one scheme associated with the specified project and issue type.
 boolean isFieldHidden(String fieldId, Issue issue)
          Checks if the field is hidden for the issue's current field layout scheme.
 boolean isFieldHidden(com.atlassian.crowd.embedded.api.User remoteUser, String id)
          Checks if the field is hidden across all the projects that the user can see (has the Permissions.BROWSE permission).
 boolean isFieldHiddenInAllSchemes(Long projectId, String fieldId)
           
 boolean isFieldHiddenInAllSchemes(Long projectId, String fieldId, List<String> issueTypes)
          Returns TRUE if specified field is hidden under the following scenarios:

1: Project specified - is field hidden in all schemes associated with the specified project.

 boolean isFieldHiddenInAllSchemes(String fieldId, SearchContext context, com.atlassian.crowd.embedded.api.User user)
           
 boolean isFieldVisible(Long projectId, String fieldId, Long issueTypeId)
          Checks if the field is visible in the project with id of projectId.
 boolean isFieldVisible(Long projectId, String fieldId, String issueTypeId)
          Checks if specified field is visible in all schemes associated with the specified project and issue type.
 boolean isFieldVisible(String fieldId, Issue issue)
          Checks if the field is visible for the issue's current field layout scheme.
 boolean isFieldVisible(com.atlassian.crowd.embedded.api.User remoteUser, String id)
          Checks if the field is visible in at least one of the projects that the user can see (has the Permissions.BROWSE permission).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldVisibilityManagerImpl

@Deprecated
public FieldVisibilityManagerImpl(FieldManager fieldManager,
                                             ProjectManager projectManager)
Deprecated. 


FieldVisibilityManagerImpl

public FieldVisibilityManagerImpl(FieldManager fieldManager,
                                  ProjectManager projectManager,
                                  ConstantsManager constantsManager,
                                  FieldLayoutManager fieldLayoutManager,
                                  SubTaskManager subTaskManager)
Method Detail

isFieldHidden

public boolean isFieldHidden(com.atlassian.crowd.embedded.api.User remoteUser,
                             String id)
Description copied from interface: FieldVisibilityManager
Checks if the field is hidden across all the projects that the user can see (has the Permissions.BROWSE permission).

Specified by:
isFieldHidden in interface FieldVisibilityManager
Parameters:
remoteUser - user
id - id of the FieldConfiguration
Returns:
true if the user cannot see the field across all visible projects, false otherwise

isFieldVisible

public boolean isFieldVisible(com.atlassian.crowd.embedded.api.User remoteUser,
                              String id)
Description copied from interface: FieldVisibilityManager
Checks if the field is visible in at least one of the projects that the user can see (has the Permissions.BROWSE permission).

Specified by:
isFieldVisible in interface FieldVisibilityManager
Parameters:
remoteUser - user
id - id of the FieldConfiguration
Returns:
true if the user can see the field in at least one visible project, false otherwise

isFieldHidden

public boolean isFieldHidden(String fieldId,
                             Issue issue)
Description copied from interface: FieldVisibilityManager
Checks if the field is hidden for the issue's current field layout scheme.

Specified by:
isFieldHidden in interface FieldVisibilityManager
Parameters:
fieldId - field id
issue - issue
Returns:
true if the field is hidden, false otherwise

isFieldVisible

public boolean isFieldVisible(String fieldId,
                              Issue issue)
Description copied from interface: FieldVisibilityManager
Checks if the field is visible for the issue's current field layout scheme.

Specified by:
isFieldVisible in interface FieldVisibilityManager
Parameters:
fieldId - field id
issue - issue
Returns:
true if the field is visible, false otherwise

isCustomFieldHidden

public boolean isCustomFieldHidden(Long projectId,
                                   Long customFieldId,
                                   String issueTypeId)
Description copied from interface: FieldVisibilityManager
Checks if the custom field is hidden in the project with id of projectId.

Specified by:
isCustomFieldHidden in interface FieldVisibilityManager
Parameters:
projectId - project id
customFieldId - the data store id of the custom field
issueTypeId - issue type id
Returns:
true if the custom field is hidden, false otherwise

isCustomFieldVisible

public boolean isCustomFieldVisible(Long projectId,
                                    Long customFieldId,
                                    String issueTypeId)
Description copied from interface: FieldVisibilityManager
Checks if the custom field is visible in the project with id of projectId.

Specified by:
isCustomFieldVisible in interface FieldVisibilityManager
Parameters:
projectId - project id
customFieldId - the data store id of the custom field
issueTypeId - issue type id
Returns:
true if the custom field is visible, false otherwise

isFieldHidden

public boolean isFieldHidden(Long projectId,
                             String fieldId,
                             Long issueTypeId)
Description copied from interface: FieldVisibilityManager
Checks if the field is hidden in the project with id of projectId.

Specified by:
isFieldHidden in interface FieldVisibilityManager
Parameters:
projectId - project id
fieldId - field id
issueTypeId - issue type id
Returns:
true if the field is hidden, false otherwise

isFieldVisible

public boolean isFieldVisible(Long projectId,
                              String fieldId,
                              Long issueTypeId)
Description copied from interface: FieldVisibilityManager
Checks if the field is visible in the project with id of projectId.

Specified by:
isFieldVisible in interface FieldVisibilityManager
Parameters:
projectId - project id
fieldId - field id
issueTypeId - issue type id
Returns:
true if the field is visible, false otherwise

isFieldHidden

public boolean isFieldHidden(Long projectId,
                             String fieldId,
                             String issueTypeId)
Description copied from interface: FieldVisibilityManager
Checks if specified field is hidden in at least one scheme associated with the specified project and issue type.

Specified by:
isFieldHidden in interface FieldVisibilityManager
Parameters:
projectId - project id
fieldId - field id
issueTypeId - issue type id
Returns:
true if the field is hidden, false otherwise

isFieldVisible

public boolean isFieldVisible(Long projectId,
                              String fieldId,
                              String issueTypeId)
Description copied from interface: FieldVisibilityManager
Checks if specified field is visible in all schemes associated with the specified project and issue type.

Specified by:
isFieldVisible in interface FieldVisibilityManager
Parameters:
projectId - project id
fieldId - field id
issueTypeId - issue type id
Returns:
true if the field is visible, false otherwise

isFieldHiddenInAllSchemes

public boolean isFieldHiddenInAllSchemes(Long projectId,
                                         String fieldId,
                                         List<String> issueTypes)
Description copied from interface: FieldVisibilityManager
Returns TRUE if specified field is hidden under the following scenarios:

1: Project specified - is field hidden in all schemes associated with the specified project.

2: Project and Issue Type(s) specified - is field hidden in all schemes associated with the specified project for the issue types specified.

Caching is abstracted to next level - all calls to getFieldLayout(...) are cached

Specified by:
isFieldHiddenInAllSchemes in interface FieldVisibilityManager
Parameters:
projectId - project id
fieldId - field id
issueTypes - list of issue type ids (as String objects)
Returns:
true if the given field is hidden, false otherwise

isFieldHiddenInAllSchemes

public boolean isFieldHiddenInAllSchemes(Long projectId,
                                         String fieldId)
Specified by:
isFieldHiddenInAllSchemes in interface FieldVisibilityManager

isFieldHiddenInAllSchemes

public boolean isFieldHiddenInAllSchemes(String fieldId,
                                         SearchContext context,
                                         com.atlassian.crowd.embedded.api.User user)
Specified by:
isFieldHiddenInAllSchemes in interface FieldVisibilityManager


Copyright © 2002-2014 Atlassian. All Rights Reserved.