Package com.atlassian.bitbucket.project
Class ProjectSearchRequest
java.lang.Object
com.atlassian.bitbucket.project.ProjectSearchRequest
Request for searching projects. The purpose and behaviour of each field is described on its accessor.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiongetName()When set, limits returnedprojectsto only those for which the current user has the requiredPermission.booleanhasName()Retrieves a flag indicating whethernametext has been set.booleanRetrieves a flag indicating whether a specificpermissionhas been set.
-
Method Details
-
getName
When set, limits returnedprojectsto only those whosenamescontain 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.
- Returns:
- filter text match against project names, or
nullto return projects regardless of name
-
getPermission
When set, limits returnedprojectsto only those for which the current user has the requiredPermission. The provided value may benull, in which case projects will automatically be limited to those for which the current user hasVIEWpermission.- Returns:
- the required permission, or
nullto default toVIEW
-
hasName
public boolean hasName()Retrieves a flag indicating whethernametext has been set.- Returns:
trueifgetName()is notnullor whitespace; otherwise,false
-
hasPermission
public boolean hasPermission()Retrieves a flag indicating whether a specificpermissionhas been set. If no explicit permission has been set, the search will default toVIEW.- Returns:
trueifgetPermission()is notnull; otherwise,false
-