public class RepoProject extends java.lang.Object implements java.lang.Comparable<RepoProject>
| Modifier and Type | Class and Description |
|---|---|
static class |
RepoProject.CopyFile
The representation of a copy file configuration.
|
static class |
RepoProject.LinkFile
The representation of a link file configuration.
|
static class |
RepoProject.ReferenceFile
The representation of a reference file configuration.
|
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<RepoProject.CopyFile> |
copyfiles |
private java.lang.String |
defaultRevision |
private java.util.Set<java.lang.String> |
groups |
private java.util.List<RepoProject.LinkFile> |
linkfiles |
private java.lang.String |
name |
private java.lang.String |
path |
private java.lang.String |
recommendShallow |
private java.lang.String |
remote |
private java.lang.String |
revision |
private java.lang.String |
url |
| Constructor and Description |
|---|
RepoProject(java.lang.String name,
java.lang.String path,
java.lang.String revision,
java.lang.String remote,
java.util.Set<java.lang.String> groups,
java.lang.String recommendShallow)
Constructor for RepoProject
|
RepoProject(java.lang.String name,
java.lang.String path,
java.lang.String revision,
java.lang.String remote,
java.lang.String groupsParam)
Constructor for RepoProject
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCopyFile(RepoProject.CopyFile copyfile)
Add a copy file configuration.
|
void |
addCopyFiles(java.util.Collection<RepoProject.CopyFile> copyFiles)
Add a bunch of copyfile configurations.
|
void |
addLinkFile(RepoProject.LinkFile linkfile)
Add a link file configuration.
|
void |
addLinkFiles(java.util.Collection<RepoProject.LinkFile> linkFiles)
Add a bunch of linkfile configurations.
|
void |
clearCopyFiles()
Clear all the copyfiles.
|
void |
clearLinkFiles()
Clear all the linkfiles.
|
int |
compareTo(RepoProject that) |
boolean |
equals(java.lang.Object o) |
java.util.List<RepoProject.CopyFile> |
getCopyFiles()
Getter for the copyfile configurations.
|
java.util.Set<java.lang.String> |
getGroups()
Return the set of groups.
|
java.util.List<RepoProject.LinkFile> |
getLinkFiles()
Getter for the linkfile configurations.
|
java.lang.String |
getName()
Get the name (relative path to the
remote) of this sub repo. |
java.lang.String |
getPath()
Get the path (relative path to the super project) of this sub repo.
|
private java.lang.String |
getPathWithSlash() |
java.lang.String |
getRecommendShallow()
Return the recommendation for shallowness.
|
java.lang.String |
getRemote()
Get the name of the remote definition of the sub repo.
|
java.lang.String |
getRevision()
Get the revision of the sub repo.
|
java.lang.String |
getUrl()
Get the url of the sub repo.
|
int |
hashCode() |
boolean |
inGroup(java.lang.String group)
Test whether this sub repo belongs to a specified group.
|
boolean |
isAncestorOf(RepoProject that)
Check if this sub repo is the ancestor of given sub repo.
|
boolean |
isAncestorOf(java.lang.String thatPath)
Check if this sub repo is an ancestor of the given path.
|
RepoProject |
setDefaultRevision(java.lang.String defaultRevision)
Set the default revision for the sub repo.
|
RepoProject |
setGroups(java.lang.String groupsParam)
Set the url of the sub repo.
|
void |
setRecommendShallow(java.lang.String recommendShallow)
Sets the recommendation for shallowness.
|
RepoProject |
setUrl(java.lang.String url)
Set the url of the sub repo.
|
private final java.lang.String name
private final java.lang.String path
private final java.lang.String revision
private final java.lang.String remote
private final java.util.Set<java.lang.String> groups
private final java.util.List<RepoProject.CopyFile> copyfiles
private final java.util.List<RepoProject.LinkFile> linkfiles
private java.lang.String recommendShallow
private java.lang.String url
private java.lang.String defaultRevision
public RepoProject(java.lang.String name,
java.lang.String path,
java.lang.String revision,
java.lang.String remote,
java.util.Set<java.lang.String> groups,
java.lang.String recommendShallow)
name - the relative path to the remotepath - the relative path to the super projectrevision - a SHA-1 or branch name or tag nameremote - name of the remote definitiongroups - set of groupsrecommendShallow - recommendation for shallownesspublic RepoProject(java.lang.String name,
java.lang.String path,
java.lang.String revision,
java.lang.String remote,
java.lang.String groupsParam)
name - the relative path to the remotepath - the relative path to the super projectrevision - a SHA-1 or branch name or tag nameremote - name of the remote definitiongroupsParam - comma separated group listpublic RepoProject setUrl(java.lang.String url)
url - project urlpublic RepoProject setGroups(java.lang.String groupsParam)
groupsParam - comma separated group listpublic RepoProject setDefaultRevision(java.lang.String defaultRevision)
defaultRevision - the name of the default revisionpublic java.lang.String getName()
remote) of this sub repo.namepublic java.lang.String getPath()
pathpublic java.lang.String getRevision()
revision if set, or defaultRevision.public java.util.List<RepoProject.CopyFile> getCopyFiles()
copyfilespublic java.util.List<RepoProject.LinkFile> getLinkFiles()
linkfilespublic java.lang.String getUrl()
urlpublic java.lang.String getRemote()
remotepublic boolean inGroup(java.lang.String group)
group - a groupgroup is present.public java.util.Set<java.lang.String> getGroups()
public java.lang.String getRecommendShallow()
public void setRecommendShallow(java.lang.String recommendShallow)
recommendShallow - recommendation for shallownesspublic void addCopyFile(RepoProject.CopyFile copyfile)
copyfile - a RepoProject.CopyFile object.public void addCopyFiles(java.util.Collection<RepoProject.CopyFile> copyFiles)
copyFiles - a collection of
RepoProject.CopyFile objectspublic void clearCopyFiles()
public void addLinkFile(RepoProject.LinkFile linkfile)
linkfile - a RepoProject.LinkFile object.public void addLinkFiles(java.util.Collection<RepoProject.LinkFile> linkFiles)
linkFiles - a collection of RepoProject.LinkFilespublic void clearLinkFiles()
private java.lang.String getPathWithSlash()
public boolean isAncestorOf(RepoProject that)
that - non nullpublic boolean isAncestorOf(java.lang.String thatPath)
thatPath - path to be checked to see if it is within this repositorypublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int compareTo(RepoProject that)
compareTo in interface java.lang.Comparable<RepoProject>