com.atlassian.jira.sharing.search
Class SharedEntitySearchParametersBuilder

java.lang.Object
  extended by com.atlassian.jira.sharing.search.SharedEntitySearchParametersBuilder

public class SharedEntitySearchParametersBuilder
extends Object

A builder object used to create searching parameters when looking for SharedEntityColumn instances.

This has a toSearchParameters() method that gives back a new immutable instance of SharedEntitySearchParameters when called.

Since:
v3.13
See Also:
SharedEntitySearchParameters

Constructor Summary
SharedEntitySearchParametersBuilder()
          Creates a new template with empty parameters.
SharedEntitySearchParametersBuilder(SharedEntitySearchParameters sharedEntitySearchParameters)
          Creates a new template based on the parameters contained within an existing SharedEntitySearchParameters instance
 
Method Summary
 SharedEntitySearchParametersBuilder setDescription(String description)
           
 SharedEntitySearchParametersBuilder setEntitySearchContext(SharedEntitySearchContext entitySearchContext)
           
 SharedEntitySearchParametersBuilder setFavourite(Boolean favourite)
           
 SharedEntitySearchParametersBuilder setName(String name)
           
 SharedEntitySearchParametersBuilder setSharePermission(SharePermission permission)
           
 SharedEntitySearchParametersBuilder setShareTypeParameter(ShareTypeSearchParameter shareTypeParameter)
          Sets the Share Type parameter, used to search for shared entities that are shared based

The following classes and singleton instances can be used GlobalShareTypeSearchParameter.GLOBAL_PARAMETER GroupShareTypeSearchParameter ProjectShareTypeSearchParameter PrivateShareTypeSearchParameter.PRIVATE_PARAMETER

 SharedEntitySearchParametersBuilder setSortColumn(SharedEntityColumn column, boolean sortOrderAscending)
           
 SharedEntitySearchParametersBuilder setTextSearchMode(SharedEntitySearchParameters.TextSearchMode textSearchMode)
           
 SharedEntitySearchParametersBuilder setUserName(String user)
           
 SharedEntitySearchParameters toSearchParameters()
          Call this method to clone the current SharedEntitySearchParametersTemplate into an immutable SharedEntitySearchParameters object.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SharedEntitySearchParametersBuilder

public SharedEntitySearchParametersBuilder()
Creates a new template with empty parameters. This will find the most data possible in this state

See Also:
SharedEntitySearchParameters

SharedEntitySearchParametersBuilder

public SharedEntitySearchParametersBuilder(SharedEntitySearchParameters sharedEntitySearchParameters)
Creates a new template based on the parameters contained within an existing SharedEntitySearchParameters instance

Parameters:
sharedEntitySearchParameters - the existing SharedEntitySearchParameters object. Must be non null.
Throws:
IllegalArgumentException - if the sharedEntitySearchParameters is null.
See Also:
SharedEntitySearchParameters
Method Detail

setName

public SharedEntitySearchParametersBuilder setName(String name)

setDescription

public SharedEntitySearchParametersBuilder setDescription(String description)

setUserName

public SharedEntitySearchParametersBuilder setUserName(String user)

setFavourite

public SharedEntitySearchParametersBuilder setFavourite(Boolean favourite)

setSortColumn

public SharedEntitySearchParametersBuilder setSortColumn(SharedEntityColumn column,
                                                         boolean sortOrderAscending)

setShareTypeParameter

public SharedEntitySearchParametersBuilder setShareTypeParameter(ShareTypeSearchParameter shareTypeParameter)
Sets the Share Type parameter, used to search for shared entities that are shared based

The following classes and singleton instances can be used

Parameters:
shareTypeParameter - the ShareTypeSearchParameter
Returns:
this Builder

setTextSearchMode

public SharedEntitySearchParametersBuilder setTextSearchMode(SharedEntitySearchParameters.TextSearchMode textSearchMode)

setEntitySearchContext

public SharedEntitySearchParametersBuilder setEntitySearchContext(SharedEntitySearchContext entitySearchContext)

setSharePermission

public SharedEntitySearchParametersBuilder setSharePermission(SharePermission permission)

toSearchParameters

public SharedEntitySearchParameters toSearchParameters()
Call this method to clone the current SharedEntitySearchParametersTemplate into an immutable SharedEntitySearchParameters object. This immutable object can then safely be shared between threads and placed into the Session for example.

Returns:
an im0mutable SharedEntitySearchParameters object.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2012 Atlassian. All Rights Reserved.