@Deprecated public static class

ProjectSearchCriteria.Builder

extends Object
java.lang.Object
   ↳ com.atlassian.stash.project.ProjectSearchCriteria.Builder

This class is deprecated.
in 2.6, scheduled for removal in 3.0. Use ProjectSearchRequest.Builder instead.

Summary

Public Constructors
ProjectSearchCriteria.Builder()
ProjectSearchCriteria.Builder(ProjectSearchCriteria criteria)
Constructs a new Builder which will copy initial values from the provided criteria.
Public Methods
@Nonnull ProjectSearchCriteria build()
Assembles a new ProjectSearchCriteria from the provided values.
@Nonnull ProjectSearchCriteria.Builder name(String value)
When set, limits returned projects to only those whose names contain the provided value.
@Nonnull ProjectSearchCriteria.Builder permission(Permission value)
When set, limits returned projects to only those for which the current user has the required Permission.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ProjectSearchCriteria.Builder ()

public ProjectSearchCriteria.Builder (ProjectSearchCriteria criteria)

Constructs a new Builder which will copy initial values from the provided criteria.

Parameters
criteria criteria to copy

Public Methods

@Nonnull public ProjectSearchCriteria build ()

Assembles a new ProjectSearchCriteria from the provided values.

Returns
  • a new criteria

@Nonnull public ProjectSearchCriteria.Builder name (String value)

When set, limits returned projects to only those whose names contain the provided value. Matching is performed in a case-insensitive manner, and will match anywhere within projects' names.

Note: Values containing only whitespace are ignored, and will not be applied. Additionally, leading and trailing whitespace are trimmed.

Parameters
value filter text match against project names, or null to return projects regardless of name
Returns
  • this

@Nonnull public ProjectSearchCriteria.Builder permission (Permission value)

When set, limits returned projects to only those for which the current user has the required Permission. The provided value may be null, in which case projects will automatically be limited to those for which the current user has VIEW permission.

Parameters
value the required permission, or null to default to VIEW
Returns
  • this
Throws
IllegalArgumentException if the provided Permission is not project related