Class ProjectFilter

  • All Implemented Interfaces:
    java.io.Serializable

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

      • ProjectFilter

        public ProjectFilter()
    • Method Detail

      • withArchived

        public ProjectFilter withArchived​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.Boolean statistics)
        Include project statistics.
        Parameters:
        statistics - if true, include project statistics
        Returns:
        the reference to this ProjectFilter instance
      • withCustomAttributes

        public ProjectFilter withCustomAttributes​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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
      • 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​(java.lang.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​(java.lang.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​(java.util.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​(java.util.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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 GitLabForm 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 GitLabForm getQueryParams()
        Get the query params specified by this filter.
        Returns:
        a GitLabApiForm instance holding the query parameters for this ProjectFilter instance
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object