@PublicApi public interface

SharedEntitySearchParameters

com.atlassian.jira.sharing.search.SharedEntitySearchParameters

@PublicApi

This interface is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

Interface for the passing parameters when searching for SharedEntity instances.

Summary

Nested Classes
class SharedEntitySearchParameters.TextSearchMode A type safe enumeration for specify text searching mode. 
Public Methods
String getDescription()
Returns the description fragments to search for.
SharedEntitySearchContext getEntitySearchContext()
Returns the SharedEntitySearchContext under which this search is to be executed.
Boolean getFavourite()
Returns a tri-state Boolean indicating how favourites are to be searched.
String getName()
Returns the name fragments to search for.
ShareTypeSearchParameter getShareTypeParameter()
Returns the ShareTypeSearchParameter object to be used.
SharedEntityColumn getSortColumn()
Returns the SharedEntityColumn to sort the results by.
SharedEntitySearchParameters.TextSearchMode getTextSearchMode()
This controls how the text fragment parameters (name and description) are combined and searched.
String getUserName()
Returns the user name to search for.
boolean isAscendingSort()

Public Methods

public String getDescription ()

Returns the description fragments to search for. The string is broken into white-space delimited words and each word is used as a OR'ed partial match for the description. If this is null, then SharedEntity's will be returned without regard to their description.

Returns
  • the description fragments to search for.

public SharedEntitySearchContext getEntitySearchContext ()

Returns the SharedEntitySearchContext under which this search is to be executed. This can either be ADMINISTER or USE.

Returns
  • the SharedEntitySearchContext under which this search is to be executed. Can not be null.

public Boolean getFavourite ()

Returns a tri-state Boolean indicating how favourites are to be searched.

  • IF the Boolean is null, then it doesn't care if the SharedEntity is a favourite or not
  • IF the Boolean is true, then only favourited SharedEntity are returned
  • IF the Boolean is false, then only non favourited SharedEntity are returned

Returns
  • a tri-state Boolean indicating how favourites are to be searched.

public String getName ()

Returns the name fragments to search for. The string is broken into white-space delimited words and each word is used as a OR'ed partial match for the name. If this is null, then SharedEntity's will be returned without regard to their name.

Returns
  • the name fragments to search for.

public ShareTypeSearchParameter getShareTypeParameter ()

Returns the ShareTypeSearchParameter object to be used. When this parameter is non null, then only SharedEntity's shared via that share type will be returned. If the value is null, then SharedEntity's will be returned without regard to how they were shared.

Returns
  • the ShareTypeSearchParameter to use. It can be null.

public SharedEntityColumn getSortColumn ()

Returns the SharedEntityColumn to sort the results by. NAME will be used by default.

The following constants MUST be used

Returns
  • the SharedEntityColumn used for searching. It MUST not be null.

public SharedEntitySearchParameters.TextSearchMode getTextSearchMode ()

This controls how the text fragment parameters (name and description) are combined and searched.

If this value is TextSearchMode.AND then the name AND the description will be used to match

if this value is TextSearchMode.OR then the name OR the description will be used to match

Returns
  • one of TextSearchMode.AND or TextSearchMode.OR. A value of null will be considered as TextSearchMode.AND

public String getUserName ()

Returns the user name to search for. If this is null, then SharedEntity's will be returned without regard to which user shared them.

Returns
  • the user name to search for.

public boolean isAscendingSort ()

Returns
  • true if the results should be sorted in ascending order