Class ProjectFilter

java.lang.Object
org.miaixz.bus.gitlab.models.ProjectFilter
All Implemented Interfaces:
Serializable

public class ProjectFilter extends Object implements Serializable
This class is used to filter Projects when getting lists of projects for a specified user.
See Also:
  • Constructor Details

    • ProjectFilter

      public ProjectFilter()
  • Method Details

    • withArchived

      public ProjectFilter withArchived(Boolean archived)
      Limit by archived status.
      Parameters:
      archived - if true will only return archived projects
      Returns:
      the reference to this ProjectFilter instance
    • withVisibility

      public ProjectFilter withVisibility(Visibility visibility)
      Limit by visibility public, internal, or private.
      Parameters:
      visibility - the visibility to match
      Returns:
      the reference to this ProjectFilter instance
    • withOrderBy

      public ProjectFilter withOrderBy(Constants.ProjectOrderBy orderBy)
      Return projects ordered by id, name, path, created_at, updated_at, or last_activity_at fields. Default is created_at.
      Parameters:
      orderBy - specifies what field to order by
      Returns:
      the reference to this ProjectFilter instance
    • withSortOder

      public ProjectFilter withSortOder(Constants.SortOrder sort)
      Return projects sorted in asc or desc order. Default is desc.
      Parameters:
      sort - sort direction, ASC or DESC
      Returns:
      the reference to this ProjectFilter instance
    • withSearch

      public ProjectFilter withSearch(String search)
      Return list of projects matching the search criteria.
      Parameters:
      search - the search criteria
      Returns:
      the reference to this ProjectFilter instance
    • withSearchNamespaces

      public ProjectFilter withSearchNamespaces(Boolean searchNamespaces)
      Include ancestor namespaces when matching search criteria. Default is false.
      Parameters:
      searchNamespaces - if true, include ancestor namespaces when matching search criteria
      Returns:
      the reference to this ProjectFilter instance
    • withSimple

      public ProjectFilter withSimple(Boolean simple)
      Return only limited fields for each project. This is a no-op without authentication as then only simple fields are returned.
      Parameters:
      simple - if true, return only limited fields for each project
      Returns:
      the reference to this ProjectFilter instance
    • withOwned

      public ProjectFilter withOwned(Boolean owned)
      Limit by projects explicitly owned by the current user
      Parameters:
      owned - if true, limit to projects explicitly owned by the current user
      Returns:
      the reference to this ProjectFilter instance
    • withMembership

      public ProjectFilter withMembership(Boolean membership)
      Limit by projects that the current user is a member of
      Parameters:
      membership - if true, limit by projects that the current user is a member of
      Returns:
      the reference to this ProjectFilter instance
    • withStarred

      public ProjectFilter withStarred(Boolean starred)
      Limit by projects starred by the current user.
      Parameters:
      starred - if true, limit by projects starred by the current user
      Returns:
      the reference to this ProjectFilter instance
    • withStatistics

      public ProjectFilter withStatistics(Boolean statistics)
      Include project statistics.
      Parameters:
      statistics - if true, include project statistics
      Returns:
      the reference to this ProjectFilter instance
    • withCustomAttributes

      public ProjectFilter withCustomAttributes(Boolean withCustomAttributes)
      Include custom attributes in response (admins only).
      Parameters:
      withCustomAttributes - if true, include custom attributes in the repsonse
      Returns:
      the reference to this ProjectFilter instance
    • withIssuesEnabled

      public ProjectFilter withIssuesEnabled(Boolean withIssuesEnabled)
      Limit by enabled issues feature
      Parameters:
      withIssuesEnabled - if true, limit by enabled issues feature
      Returns:
      the reference to this ProjectFilter instance
    • withMergeRequestsEnabled

      public ProjectFilter withMergeRequestsEnabled(Boolean withMergeRequestsEnabled)
      Limit by enabled merge requests feature
      Parameters:
      withMergeRequestsEnabled - if true, limit by enabled merge requests feature
      Returns:
      the reference to this ProjectFilter instance
    • withProgrammingLanguage

      public ProjectFilter withProgrammingLanguage(String withProgrammingLanguage)
      Limit by projects which use the given programming language.
      Parameters:
      withProgrammingLanguage - limit by projects which use the given programming language
      Returns:
      the reference to this ProjectFilter instance
    • withWikiChecksumFailed

      public ProjectFilter withWikiChecksumFailed(Boolean wikiChecksumFailed)
      Limit projects where the wiki checksum calculation has failed.
      Parameters:
      wikiChecksumFailed - if true, limit projects where the wiki checksum calculation has failed
      Returns:
      the reference to this ProjectFilter instance
      Since:
      GitLab 11.2
    • withRepositoryChecksumFailed

      public ProjectFilter withRepositoryChecksumFailed(Boolean repositoryChecksumFailed)
      Limit projects where the repository checksum calculation has failed.
      Parameters:
      repositoryChecksumFailed - if true, limit projects where the repository checksum calculation has failed
      Returns:
      the reference to this ProjectFilter instance
      Since:
      GitLab 11.2
    • minAccessLevel

      @Deprecated public ProjectFilter minAccessLevel(AccessLevel minAccessLevel)
      Deprecated.
      Replaced by getComponentAt
      Limit by current user minimal access level
      Parameters:
      minAccessLevel - limit by current user minimal access level
      Returns:
      the reference to this ProjectFilter instance
    • withMinAccessLevel

      public ProjectFilter withMinAccessLevel(AccessLevel minAccessLevel)
      Limit by current user minimal access level.
      Parameters:
      minAccessLevel - limit by current user minimal access level
      Returns:
      the reference to this ProjectFilter instance
    • withIdAfter

      public ProjectFilter withIdAfter(Long idAfter)
      Limit results to projects with IDs greater than the specified projectID.
      Parameters:
      idAfter - limit results to projects with IDs greater than the specified project ID
      Returns:
      the reference to this ProjectFilter instance
    • withIdBefore

      public ProjectFilter withIdBefore(Long idBefore)
      Limit results to projects with IDs less than the specified project ID.
      Parameters:
      idBefore - limit results to projects with IDs less than the specified project ID
      Returns:
      the reference to this ProjectFilter instance
    • withLastActivityAfter

      public ProjectFilter withLastActivityAfter(Date lastActivityAfter)
      Limit results to projects with last_activity after specified time.
      Parameters:
      lastActivityAfter - limit results to projects with last_activity after specified time
      Returns:
      the reference to this ProjectFilter instance
    • withLastActivityBefore

      public ProjectFilter withLastActivityBefore(Date lastActivityBefore)
      Limit results to projects with last_activity before specified time.
      Parameters:
      lastActivityBefore - limit results to projects with last_activity before specified time
      Returns:
      the reference to this ProjectFilter instance
    • withRepositoryStorage

      public ProjectFilter withRepositoryStorage(String repositoryStorage)
      Limit results to projects stored on the specified repository_storage. Available for admins only.
      Parameters:
      repositoryStorage - limit results to projects stored on repository_storage
      Returns:
      the reference to this ProjectFilter instance
    • withImported

      public ProjectFilter withImported(Boolean imported)
      Limit results to projects which were imported from external systems by current user.
      Parameters:
      imported - limit results to projects imported from external systems by current user
      Returns:
      the reference to this ProjectFilter instance
    • withTopic

      public ProjectFilter withTopic(String topic)
      Limit results to projects that match all of given topics.
      Parameters:
      topic - Comma-separated topic names.
      Returns:
      the reference to this ProjectFilter instance
    • withTopicId

      public ProjectFilter withTopicId(Integer topic_id)
      Limit results to projects with the assigned topic given by the topic ID.
      Parameters:
      topic_id - the topic ID
      Returns:
      the reference to this ProjectFilter instance
    • getQueryParams

      public GitLabApiForm getQueryParams(int page, int perPage)
      Get the query params specified by this filter.
      Parameters:
      page - specifies the page number
      perPage - specifies the number of items per page
      Returns:
      a GitLabApiForm instance holding the query parameters for this ProjectFilter instance
    • getQueryParams

      public GitLabApiForm getQueryParams()
      Get the query params specified by this filter.
      Returns:
      a GitLabApiForm instance holding the query parameters for this ProjectFilter instance
    • toString

      public String toString()
      Overrides:
      toString in class Object