Class ProjectSearchRequest

java.lang.Object
com.atlassian.bitbucket.project.ProjectSearchRequest

public class ProjectSearchRequest extends Object
Request for searching projects. The purpose and behaviour of each field is described on its accessor.
  • Method Details

    • getName

      @Nullable public String getName()
      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.

      Returns:
      filter text match against project names, or null to return projects regardless of name
    • getPermission

      @Nullable public Permission getPermission()
      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.
      Returns:
      the required permission, or null to default to VIEW
    • hasName

      public boolean hasName()
      Retrieves a flag indicating whether name text has been set.
      Returns:
      true if getName() is not null or whitespace; otherwise, false
    • hasPermission

      public boolean hasPermission()
      Retrieves a flag indicating whether a specific permission has been set. If no explicit permission has been set, the search will default to VIEW.
      Returns:
      true if getPermission() is not null; otherwise, false