public class RepositorySearchRequest extends Object
The term "prefix-match", when used in this documentation, describes a string matching process that satisfies the following criteria:
| Modifier and Type | Class and Description |
|---|---|
static class |
RepositorySearchRequest.Builder |
| Modifier and Type | Method and Description |
|---|---|
String |
getName()
When set, limits returned
repositories to only those that prefix-match the provided
value according to the rules described in the class header. |
Permission |
getPermission()
When set, limits returned
repositories to only those for which the current user has the
required Permission. |
String |
getProjectName()
When set, limits returned
repositories to only those, whose project's name prefix-match
the provided value. |
Repository.State |
getState()
When set, limits returned
repositories to only those that are in the specified state. |
RepositoryVisibility |
getVisibility()
When set, limits returned
repositories to only those which match the specified
visibility. |
boolean |
hasName()
Retrieves a flag indicating whether
name text has been set. |
boolean |
hasPermission()
Retrieves a flag indicating whether a specific
permission has been set. |
boolean |
hasProjectName()
Retrieves a flag indicating whether
getProjectName() projectName} text has been set. |
boolean |
hasState()
Retrieves a flag indicating whether
getState() state} has been set. |
boolean |
hasVisibility()
Retrieves a flag indicating whether a specific
visibility has been set. |
boolean |
isEmpty()
Checks whether this request is considered empty, that is, none of the filters have been set.
|
@Nullable public String getName()
repositories to only those that prefix-match the provided
value according to the rules described in the class header.
If this field is not set, it is assumed that all repositories shall be returned, regardless of the repository
name. Applying the projectName filter would still limit the results to matching project names in such
case.
null to return
repositories regardless of name.getProjectName()@Nullable public String getProjectName()
repositories to only those, whose project's name prefix-match
the provided value.
If this field is not set, it is assumed that all repositories shall be returned, regardless of the project name. Applying other filters would still limit the final results in such case.
getName()@Nullable public Repository.State getState()
repositories to only those that are in the specified state. The
provided value may be null, in which case no additional restriction is applied to the search.null@Nullable public Permission getPermission()
repositories to only those for which the current user has the
required Permission. The provided value may be null, in which case a default permission
Permission.REPO_READ will be used.null to default to Permission.REPO_READ@Nullable public RepositoryVisibility getVisibility()
repositories to only those which match the specified
visibility. The provided value may be null, in which case no
additional restriction is applied to the search.null to return repositories regardless of visibility.RepositoryVisibilitypublic boolean hasName()
name text has been set.public boolean hasProjectName()
getProjectName() projectName} text has been set.true if getName() is not null or whitespace, false otherwisepublic boolean hasPermission()
permission has been set. If no explicit
permission has been set, the search will default to Permission.REPO_READ.true if getPermission() is not null, false otherwisegetPermission()public boolean hasState()
getState() state} has been set.true if getState() ()} is not null, false otherwisepublic boolean hasVisibility()
visibility has been set.true if getVisibility() is not null, false otherwisegetVisibility()public boolean isEmpty()
request have been set, false
otherwisehasName(),
hasProjectName(),
hasPermission(),
hasVisibility()Copyright © 2019 Atlassian. All rights reserved.