com.atlassian.jira.sharing.type
Class GlobalShareQueryFactory

java.lang.Object
  extended by com.atlassian.jira.sharing.type.GlobalShareQueryFactory
All Implemented Interfaces:
ShareQueryFactory<GlobalShareTypeSearchParameter>

public class GlobalShareQueryFactory
extends Object
implements ShareQueryFactory<GlobalShareTypeSearchParameter>

Implementation of the ShareQueryFactory for the Global share type.

Since:
v3.13

Constructor Summary
GlobalShareQueryFactory()
           
 
Method Summary
 org.apache.lucene.document.Field getField(SharedEntity entity, SharePermission permission)
          Get the Field we will later search for.
 org.apache.lucene.search.Query getQuery(ShareTypeSearchParameter parameter)
          Get the search query for all shares shares that match the passed parameter.
 org.apache.lucene.search.Query getQuery(ShareTypeSearchParameter parameter, ApplicationUser user)
          Get the search query for the shares that can be seen by the passed user for the passed parameter.
 org.apache.lucene.search.Query getQuery(ShareTypeSearchParameter parameter, com.atlassian.crowd.embedded.api.User user)
           
 org.apache.lucene.index.Term[] getTerms(ApplicationUser user)
          Get the search terms for the shares that can be seen by the passed user.
 org.apache.lucene.index.Term[] getTerms(com.atlassian.crowd.embedded.api.User user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalShareQueryFactory

public GlobalShareQueryFactory()
Method Detail

getTerms

public org.apache.lucene.index.Term[] getTerms(ApplicationUser user)
Description copied from interface: ShareQueryFactory
Get the search terms for the shares that can be seen by the passed user.

Specified by:
getTerms in interface ShareQueryFactory<GlobalShareTypeSearchParameter>
Parameters:
user - the user to perform the search on behalf of.
Returns:
an array of Terms. It may be empty but never null.

getTerms

public org.apache.lucene.index.Term[] getTerms(com.atlassian.crowd.embedded.api.User user)
Specified by:
getTerms in interface ShareQueryFactory<GlobalShareTypeSearchParameter>
Parameters:
user - the user to perform the search on behalf of.
Returns:
an array of Terms. It may be empty but never null.

getQuery

public org.apache.lucene.search.Query getQuery(ShareTypeSearchParameter parameter,
                                               ApplicationUser user)
Description copied from interface: ShareQueryFactory
Get the search query for the shares that can be seen by the passed user for the passed parameter. Used when the user has specified something to search for.

Specified by:
getQuery in interface ShareQueryFactory<GlobalShareTypeSearchParameter>
Parameters:
parameter - the parameters for the search.
user - the user to perform the search on behalf of.
Returns:
an array of Terms. It may be empty but never null.

getQuery

public org.apache.lucene.search.Query getQuery(ShareTypeSearchParameter parameter,
                                               com.atlassian.crowd.embedded.api.User user)
Specified by:
getQuery in interface ShareQueryFactory<GlobalShareTypeSearchParameter>
Parameters:
parameter - the parameters for the search.
user - the user to perform the search on behalf of.
Returns:
an array of Terms. It may be empty but never null.

getQuery

public org.apache.lucene.search.Query getQuery(ShareTypeSearchParameter parameter)
Description copied from interface: ShareQueryFactory
Get the search query for all shares shares that match the passed parameter. Used by the system to match all entities that match the parameter, for instance when deleting Group, Project or Role.

Specified by:
getQuery in interface ShareQueryFactory<GlobalShareTypeSearchParameter>
Parameters:
parameter - the parameters for the search.
Returns:
an array of Terms. It may be empty but never null.

getField

public org.apache.lucene.document.Field getField(SharedEntity entity,
                                                 SharePermission permission)
Description copied from interface: ShareQueryFactory
Get the Field we will later search for.

Specified by:
getField in interface ShareQueryFactory<GlobalShareTypeSearchParameter>
Returns:
the field so we can add it to the index


Copyright © 2002-2013 Atlassian. All Rights Reserved.