Class GitRepository

  • All Implemented Interfaces:
    Repository, org.uberfire.commons.data.Cacheable, org.uberfire.security.authz.RuntimeContentResource, org.uberfire.security.authz.RuntimeResource, org.uberfire.security.ContributorResource, org.uberfire.security.Resource

    @Portable
    public class GitRepository
    extends Object
    implements Repository
    • Field Detail

      • SCHEME

        public static final org.uberfire.spaces.SpacesAPI.Scheme SCHEME
    • Constructor Detail

      • GitRepository

        public GitRepository()
      • GitRepository

        public GitRepository​(String alias,
                             org.uberfire.spaces.Space space)
      • GitRepository

        public GitRepository​(String alias,
                             org.uberfire.spaces.Space space,
                             List<PublicURI> publicURIs)
    • Method Detail

      • getAlias

        public String getAlias()
        Description copied from interface: Repository
        Most of the time, this can not be used as an unique ID. If the Repository has branches each branch has the same alias.
        Specified by:
        getAlias in interface Repository
        Returns:
        short name for the repository
      • getSpace

        public org.uberfire.spaces.Space getSpace()
        Specified by:
        getSpace in interface Repository
      • getScheme

        public org.uberfire.spaces.SpacesAPI.Scheme getScheme()
        Specified by:
        getScheme in interface Repository
      • setBranches

        public void setBranches​(Map<String,​Branch> branches)
      • setPublicURIs

        public void setPublicURIs​(List<PublicURI> publicURIs)
      • getIdentifier

        public String getIdentifier()
        Specified by:
        getIdentifier in interface org.uberfire.security.Resource
      • getResourceType

        public org.uberfire.security.ResourceType getResourceType()
        Specified by:
        getResourceType in interface org.uberfire.security.Resource
      • getContributors

        public Collection<org.uberfire.security.Contributor> getContributors()
        Specified by:
        getContributors in interface org.uberfire.security.ContributorResource
      • getDefaultBranch

        public Optional<Branch> getDefaultBranch()
        Description copied from interface: Repository
        In the case of Git repository this would be master.
        Specified by:
        getDefaultBranch in interface Repository
        Returns:
        empty if there are no branches.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • markAsCached

        public void markAsCached()
        Specified by:
        markAsCached in interface org.uberfire.commons.data.Cacheable
      • requiresRefresh

        public boolean requiresRefresh()
        Specified by:
        requiresRefresh in interface org.uberfire.commons.data.Cacheable
      • addBranch

        public void addBranch​(Branch branch)