Class RepositorySearchRequest
The term "prefix-match", when used in this documentation, describes a string matching process that satisfies the following criteria:
- the matched value starts with the provided filter value
- the matching is performed in a case-insensitive manner
- the filter string's leading and trailing whitespace characters are ignored
- a blank filter (null, or whitespace characters only) is treated as 'empty' and results in all repositories being returned for the purpose of that particular filter (note that other filters specified in conjunction with that filter may still limit the final result)
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionWhen set, limits returnedrepositories
to only those, whoseboolean
archive state match the provided value.getName()
When set, limits returnedrepositories
to only those that prefix-match the provided value according to the rules described in the class header.When set, limits returnedrepositories
to only those for which the current user has the requiredPermission
.When set, limits returnedrepositories
to only those, whose project's key exact-match (case-insensitive) the provided value.When set, limits returnedrepositories
to only those, whose project's name prefix-match the provided value.getState()
When set, limits returnedrepositories
to only those that are in the specified state.When set, limits returnedrepositories
to only those which match the specifiedvisibility
.boolean
Retrieves a flag indicating whetherarchived
text has been set.boolean
hasName()
Retrieves a flag indicating whethername
text has been set.boolean
Retrieves a flag indicating whether a specificpermission
has been set.boolean
Retrieves a flag indicating whethergetProjectKey()
projectKey} text has been set.boolean
Retrieves a flag indicating whethergetProjectName()
projectName} text has been set.boolean
hasState()
Retrieves a flag indicating whethergetState()
state} has been set.boolean
Retrieves a flag indicating whether a specificvisibility
has been set.boolean
isEmpty()
Checks whether this request is considered empty, that is, none of the filters have been set.
-
Method Details
-
getArchived
When set, limits returnedrepositories
to only those, whoseboolean
archive state match the provided value.The provided value may be
null
, in which case no additional restriction is applied to the search.- Returns:
- the required boolean archive state, or
null
- Since:
- 8.0
-
getName
When set, limits returnedrepositories
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.- Returns:
- filter text to match against repository names (and possibly project names), or
null
to return repositories regardless of name. - See Also:
-
getProjectName
When set, limits returnedrepositories
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.
- Returns:
- filter text to match against project names, or null to return repositories regardless of the project name
- See Also:
-
getProjectKey
When set, limits returnedrepositories
to only those, whose project's key exact-match (case-insensitive) the provided value.If this field is not set, it is assumed that all repositories shall be returned, regardless of the project key. Applying other filters would still limit the final results in such case.
- Returns:
- the required repository project key, or
null
- Since:
- 8.0
-
getState
When set, limits returnedrepositories
to only those that are in the specified state. The provided value may benull
, in which case no additional restriction is applied to the search.- Returns:
- the required repository state, or
null
- Since:
- 5.13
-
getPermission
When set, limits returnedrepositories
to only those for which the current user has the requiredPermission
. The provided value may benull
, in which case a default permissionPermission.REPO_READ
will be used.- Returns:
- the required repository permission, or
null
to default toPermission.REPO_READ
-
getVisibility
When set, limits returnedrepositories
to only those which match the specifiedvisibility
. The provided value may benull
, in which case no additional restriction is applied to the search.- Returns:
- the required repository visibility, or
null
to return repositories regardless of visibility. - See Also:
-
hasArchived
public boolean hasArchived()Retrieves a flag indicating whetherarchived
text has been set.- Returns:
true
ifgetArchived()
is notnull
,false
otherwise- Since:
- 8.0
-
hasName
public boolean hasName()Retrieves a flag indicating whethername
text has been set. -
hasProjectName
public boolean hasProjectName()Retrieves a flag indicating whethergetProjectName()
projectName} text has been set.- Returns:
true
ifgetName()
is notnull
or whitespace,false
otherwise
-
hasProjectKey
public boolean hasProjectKey()Retrieves a flag indicating whethergetProjectKey()
projectKey} text has been set.- Returns:
true
ifgetProjectKey()
is notnull
or whitespace,false
otherwise- Since:
- 8.0
-
hasPermission
public boolean hasPermission()Retrieves a flag indicating whether a specificpermission
has been set. If no explicit permission has been set, the search will default toPermission.REPO_READ
.- Returns:
true
ifgetPermission()
is notnull
,false
otherwise- See Also:
-
hasState
public boolean hasState()Retrieves a flag indicating whethergetState()
state} has been set.- Returns:
true
ifgetState()
is notnull
,false
otherwise- Since:
- 5.13
-
hasVisibility
public boolean hasVisibility()Retrieves a flag indicating whether a specificvisibility
has been set.- Returns:
true
ifgetVisibility()
is notnull
,false
otherwise- See Also:
-
isEmpty
public boolean isEmpty()Checks whether this request is considered empty, that is, none of the filters have been set.- Returns:
- true, if none of the filter fields on this
request
have been set, false otherwise - See Also:
-