public class RepoProject extends Object implements 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.
|
Constructor and Description |
---|
RepoProject(String name,
String path,
String revision,
String remote,
Set<String> groups,
String recommendShallow)
Constructor for RepoProject
|
RepoProject(String name,
String path,
String revision,
String remote,
String groupsParam)
Constructor for RepoProject
|
Modifier and Type | Method and Description |
---|---|
void |
addCopyFile(RepoProject.CopyFile copyfile)
Add a copy file configuration.
|
void |
addCopyFiles(Collection<RepoProject.CopyFile> copyFiles)
Add a bunch of copyfile configurations.
|
void |
addLinkFile(RepoProject.LinkFile linkfile)
Add a link file configuration.
|
void |
addLinkFiles(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(Object o) |
List<RepoProject.CopyFile> |
getCopyFiles()
Getter for the copyfile configurations.
|
Set<String> |
getGroups()
Return the set of groups.
|
List<RepoProject.LinkFile> |
getLinkFiles()
Getter for the linkfile configurations.
|
String |
getName()
Get the name (relative path to the
remote ) of this sub repo. |
String |
getPath()
Get the path (relative path to the super project) of this sub repo.
|
String |
getRecommendShallow()
Return the recommendation for shallowness.
|
String |
getRemote()
Get the name of the remote definition of the sub repo.
|
String |
getRevision()
Get the revision of the sub repo.
|
String |
getUrl()
Get the url of the sub repo.
|
int |
hashCode() |
boolean |
inGroup(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(String thatPath)
Check if this sub repo is an ancestor of the given path.
|
RepoProject |
setDefaultRevision(String defaultRevision)
Set the default revision for the sub repo.
|
RepoProject |
setGroups(String groupsParam)
Set the url of the sub repo.
|
void |
setRecommendShallow(String recommendShallow)
Sets the recommendation for shallowness.
|
RepoProject |
setUrl(String url)
Set the url of the sub repo.
|
public RepoProject(String name, String path, String revision, String remote, Set<String> groups, String recommendShallow)
name
- the relative path to the remote
path
- 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(String name, String path, String revision, String remote, String groupsParam)
name
- the relative path to the remote
path
- 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(String url)
url
- project urlpublic RepoProject setGroups(String groupsParam)
groupsParam
- comma separated group listpublic RepoProject setDefaultRevision(String defaultRevision)
defaultRevision
- the name of the default revisionpublic String getName()
remote
) of this sub repo.name
public String getPath()
path
public String getRevision()
revision
if set, or defaultRevision
.public List<RepoProject.CopyFile> getCopyFiles()
copyfiles
public List<RepoProject.LinkFile> getLinkFiles()
linkfiles
public String getUrl()
url
public String getRemote()
remote
public boolean inGroup(String group)
group
- a groupgroup
is present.public Set<String> getGroups()
public String getRecommendShallow()
public void setRecommendShallow(String recommendShallow)
recommendShallow
- recommendation for shallownesspublic void addCopyFile(RepoProject.CopyFile copyfile)
copyfile
- a RepoProject.CopyFile
object.public void addCopyFiles(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(Collection<RepoProject.LinkFile> linkFiles)
linkFiles
- a collection of RepoProject.LinkFile
spublic void clearLinkFiles()
public boolean isAncestorOf(RepoProject that)
that
- non nullpublic boolean isAncestorOf(String thatPath)
thatPath
- path to be checked to see if it is within this repositorypublic int compareTo(RepoProject that)
compareTo
in interface Comparable<RepoProject>
Copyright © 2019 Eclipse JGit Project. All rights reserved.