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 returnedrepositoriesto only those, whosebooleanarchive state match the provided value.getName()When set, limits returnedrepositoriesto only those that prefix-match the provided value according to the rules described in the class header.When set, limits returnedrepositoriesto only those for which the current user has the requiredPermission.When set, limits returnedrepositoriesto only those, whose project's key exact-match (case-insensitive) the provided value.When set, limits returnedrepositoriesto only those, whose project's name prefix-match the provided value.getState()When set, limits returnedrepositoriesto only those that are in the specified state.When set, limits returnedrepositoriesto only those which match the specifiedvisibility.booleanRetrieves a flag indicating whetherarchivedtext has been set.booleanhasName()Retrieves a flag indicating whethernametext has been set.booleanRetrieves a flag indicating whether a specificpermissionhas been set.booleanRetrieves a flag indicating whethergetProjectKey()projectKey} text has been set.booleanRetrieves a flag indicating whethergetProjectName()projectName} text has been set.booleanhasState()Retrieves a flag indicating whethergetState()state} has been set.booleanRetrieves a flag indicating whether a specificvisibilityhas been set.booleanisEmpty()Checks whether this request is considered empty, that is, none of the filters have been set.
-
Method Details
-
getArchived
When set, limits returnedrepositoriesto only those, whosebooleanarchive 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 returnedrepositoriesto 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
projectNamefilter 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
nullto return repositories regardless of name. - See Also:
-
getProjectName
When set, limits returnedrepositoriesto 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 returnedrepositoriesto 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 returnedrepositoriesto 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 returnedrepositoriesto only those for which the current user has the requiredPermission. The provided value may benull, in which case a default permissionPermission.REPO_READwill be used.- Returns:
- the required repository permission, or
nullto default toPermission.REPO_READ
-
getVisibility
When set, limits returnedrepositoriesto 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
nullto return repositories regardless of visibility. - See Also:
-
hasArchived
public boolean hasArchived()Retrieves a flag indicating whetherarchivedtext has been set.- Returns:
trueifgetArchived()is notnull,falseotherwise- Since:
- 8.0
-
hasName
public boolean hasName()Retrieves a flag indicating whethernametext has been set. -
hasProjectName
public boolean hasProjectName()Retrieves a flag indicating whethergetProjectName()projectName} text has been set.- Returns:
trueifgetName()is notnullor whitespace,falseotherwise
-
hasProjectKey
public boolean hasProjectKey()Retrieves a flag indicating whethergetProjectKey()projectKey} text has been set.- Returns:
trueifgetProjectKey()is notnullor whitespace,falseotherwise- Since:
- 8.0
-
hasPermission
public boolean hasPermission()Retrieves a flag indicating whether a specificpermissionhas been set. If no explicit permission has been set, the search will default toPermission.REPO_READ.- Returns:
trueifgetPermission()is notnull,falseotherwise- See Also:
-
hasState
public boolean hasState()Retrieves a flag indicating whethergetState()state} has been set.- Returns:
trueifgetState()is notnull,falseotherwise- Since:
- 5.13
-
hasVisibility
public boolean hasVisibility()Retrieves a flag indicating whether a specificvisibilityhas been set.- Returns:
trueifgetVisibility()is notnull,falseotherwise- 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
requesthave been set, false otherwise - See Also:
-