@InjectableComponent public class FieldConfigSchemeClauseContextUtil extends Object
FieldConfigScheme
, taking
into account what is visible to the searcher.Constructor and Description |
---|
FieldConfigSchemeClauseContextUtil(IssueTypeSchemeManager issueTypeSchemeManager,
ConstantsManager constantsManager,
PermissionManager permissionManager,
ProjectFactory projectFactory) |
Modifier and Type | Method and Description |
---|---|
ClauseContext |
getContextForConfigScheme(com.atlassian.crowd.embedded.api.User searcher,
FieldConfigScheme fieldConfigScheme)
Given a
FieldConfigScheme determines the
ClauseContext specified by it, taking into account
what is visible to the searcher User |
FieldConfigScheme |
getFieldConfigSchemeFromContext(QueryContext queryContext,
CustomField customField)
Finds the most specific
FieldConfigScheme associated with a CustomField
that is viewable from the given QueryContext . |
boolean |
isConfigSchemeVisibleUnderContext(QueryContext queryContext,
FieldConfigScheme fieldConfigScheme)
Checks if the
FieldConfigScheme is visible under the given
QueryContext |
public FieldConfigSchemeClauseContextUtil(IssueTypeSchemeManager issueTypeSchemeManager, ConstantsManager constantsManager, PermissionManager permissionManager, ProjectFactory projectFactory)
public boolean isConfigSchemeVisibleUnderContext(QueryContext queryContext, FieldConfigScheme fieldConfigScheme)
FieldConfigScheme
is visible under the given
QueryContext
queryContext
- the QueryContext
of the search and user.fieldConfigScheme
- the scheme to to check is visibleFieldConfigScheme
is visible under the QueryContext
, false otherwise.public FieldConfigScheme getFieldConfigSchemeFromContext(QueryContext queryContext, CustomField customField)
FieldConfigScheme
associated with a CustomField
that is viewable from the given QueryContext
. The "Most Specific" means it will always return
a FieldConfigScheme with a defined project context if available, otherwise it will return
the FieldConfigScheme with the global context (if visible). If no FieldConfigScheme is visible under the QueryContext
null is returned.queryContext
- The QueryContext to find the most specific visible FieldConfigScheme
for.customField
- The custom field to retreive FieldConfigScheme
s from.FieldConfigScheme
on teh CustomField
that is visible to the QueryContext
, null if no FieldConfigScheme
is visible.public ClauseContext getContextForConfigScheme(com.atlassian.crowd.embedded.api.User searcher, FieldConfigScheme fieldConfigScheme)
FieldConfigScheme
determines the
ClauseContext
specified by it, taking into account
what is visible to the searcher User
searcher
- the user the ClauseContext
is generated forfieldConfigScheme
- the config scheme the ClauseContext
is generated forFieldConfigScheme
and searchers visibilityCopyright © 2002-2015 Atlassian. All Rights Reserved.