Class GitRepository
- java.lang.Object
-
- org.guvnor.structure.repositories.impl.git.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 Summary
Fields Modifier and Type Field Description static org.uberfire.spaces.SpacesAPI.SchemeSCHEME-
Fields inherited from interface org.guvnor.structure.repositories.Repository
RESOURCE_TYPE
-
-
Constructor Summary
Constructors Constructor Description GitRepository()GitRepository(String alias, org.uberfire.spaces.Space space)GitRepository(String alias, org.uberfire.spaces.Space space, List<PublicURI> publicURIs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBranch(Branch branch)voidaddEnvironmentParameter(String key, Object value)booleanequals(Object o)StringgetAlias()Most of the time, this can not be used as an unique ID.Optional<Branch>getBranch(String branchName)Optional<Branch>getBranch(org.uberfire.backend.vfs.Path branchRoot)Collection<Branch>getBranches()Returns "read-only" view of all branches available in this repository.Collection<org.uberfire.security.Contributor>getContributors()Optional<Branch>getDefaultBranch()In the case of Git repository this would be master.Map<String,Object>getEnvironment()Collection<String>getGroups()StringgetIdentifier()List<PublicURI>getPublicURIs()org.uberfire.security.ResourceTypegetResourceType()org.uberfire.spaces.SpacesAPI.SchemegetScheme()org.uberfire.spaces.SpacegetSpace()StringgetUri()inthashCode()booleanisValid()voidmarkAsCached()booleanrequiresRefresh()voidsetBranches(Map<String,Branch> branches)voidsetGroups(Collection<String> groups)voidsetPublicURIs(List<PublicURI> publicURIs)StringtoString()
-
-
-
Method Detail
-
getAlias
public String getAlias()
Description copied from interface:RepositoryMost 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:
getAliasin interfaceRepository- Returns:
- short name for the repository
-
getSpace
public org.uberfire.spaces.Space getSpace()
- Specified by:
getSpacein interfaceRepository
-
getScheme
public org.uberfire.spaces.SpacesAPI.Scheme getScheme()
- Specified by:
getSchemein interfaceRepository
-
getEnvironment
public Map<String,Object> getEnvironment()
- Specified by:
getEnvironmentin interfaceRepository
-
addEnvironmentParameter
public void addEnvironmentParameter(String key, Object value)
- Specified by:
addEnvironmentParameterin interfaceRepository
-
getBranches
public Collection<Branch> getBranches()
Description copied from interface:RepositoryReturns "read-only" view of all branches available in this repository.- Specified by:
getBranchesin interfaceRepository- Returns:
-
getBranch
public Optional<Branch> getBranch(String branchName)
- Specified by:
getBranchin interfaceRepository
-
getBranch
public Optional<Branch> getBranch(org.uberfire.backend.vfs.Path branchRoot)
- Specified by:
getBranchin interfaceRepository
-
isValid
public boolean isValid()
- Specified by:
isValidin interfaceRepository
-
getUri
public String getUri()
- Specified by:
getUriin interfaceRepository
-
getPublicURIs
public List<PublicURI> getPublicURIs()
- Specified by:
getPublicURIsin interfaceRepository
-
getIdentifier
public String getIdentifier()
- Specified by:
getIdentifierin interfaceorg.uberfire.security.Resource
-
getResourceType
public org.uberfire.security.ResourceType getResourceType()
- Specified by:
getResourceTypein interfaceorg.uberfire.security.Resource
-
getGroups
public Collection<String> getGroups()
- Specified by:
getGroupsin interfaceRepository
-
setGroups
public void setGroups(Collection<String> groups)
-
getContributors
public Collection<org.uberfire.security.Contributor> getContributors()
- Specified by:
getContributorsin interfaceorg.uberfire.security.ContributorResource
-
getDefaultBranch
public Optional<Branch> getDefaultBranch()
Description copied from interface:RepositoryIn the case of Git repository this would be master.- Specified by:
getDefaultBranchin interfaceRepository- Returns:
- empty if there are no branches.
-
markAsCached
public void markAsCached()
- Specified by:
markAsCachedin interfaceorg.uberfire.commons.data.Cacheable
-
requiresRefresh
public boolean requiresRefresh()
- Specified by:
requiresRefreshin interfaceorg.uberfire.commons.data.Cacheable
-
addBranch
public void addBranch(Branch branch)
-
-