|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.bamboo.repository.AbstractRepository
com.atlassian.bamboo.repository.perforce.PerforceRepository
public class PerforceRepository
This class provides a Perforce implemention of the Repository
interface.
Field Summary | |
---|---|
static String |
KEY
|
static String |
NAME
|
static String |
NO_IDEA
|
static String |
P4_CLIENT
|
static String |
P4_DEPOT
|
static String |
P4_EXE
|
static String |
P4_PORT
|
static String |
P4_USER
|
Fields inherited from class com.atlassian.bamboo.repository.AbstractRepository |
---|
BUILD_TRIGGER_IP, WEB_REPO_MODULE_NAME, WEB_REPO_URL |
Fields inherited from interface com.atlassian.bamboo.repository.Repository |
---|
REPOSIORTY_TYPE, UNKNOWN_HOST |
Constructor Summary | |
---|---|
PerforceRepository()
|
Method Summary | |
---|---|
void |
addDefaultValues(BuildConfiguration buildConfiguration)
|
boolean |
equals(Object o)
|
void |
getAllSourceCode(Build build)
Force perforce to checkout all the source code. |
Collection |
getChangesSinceLastBuild(Build build,
Date lastBuildStartTime)
What changes to the build depot have happened since the given lastBuild date? |
String |
getClient()
Obtain the perforce client we're using |
String |
getDepot()
What's the build depot that we're checking for changes? |
String |
getHost()
What's the repostory server host |
String |
getKey()
|
String |
getName()
|
String |
getP4Executable()
Which perforce p4 exe are we using? |
String |
getPort()
Which perforce server are we using? |
File |
getSourceCodeDirectory(Build build)
Perforce checks out the depot into the client's root directory. |
String |
getUrl()
|
String |
getUser()
What's the optional perforce user name? Returns null if we are not using a user |
String |
getWebRepositoryUrl()
What's the repository's web url |
String |
getWebRepositoryUrlForFile(CommitFile file)
What's the URL to the repostory for the modified file? |
String |
getWebRepositoryUrlRepoName()
What's the repository's web url repository |
int |
hashCode()
|
boolean |
hasWebBasedRepositoryAccess()
Does this implementation of the repository provide a web access to the repository? |
boolean |
isRepositoryDifferent(Repository repository)
Checks if the current repo is the same or not and sets the referencesDifferentRepository flag accordingly |
void |
populateFromConfig(HierarchicalConfiguration config)
Update the current object with data in the FieldValueItemHolder |
void |
setClient(String client)
Define the client we're using to connect to the perforce server |
void |
setDepot(String depot)
Define the build depot |
void |
setP4Executable(String p4Exe)
Set the user specify which p4 executable we're using |
void |
setPort(String port)
Define the perforce server and port we're going to connect to |
void |
setUser(String user)
Override the default user, if you want to specify the perforce user |
void |
setWebRepositoryUrl(String url)
Where should we link to to show build file changes? |
void |
setWebRepositoryUrlRepoName(String repoName)
This is used to identify the repository on multi-repository configurations. |
void |
setWorkingDir(File workingDir)
Ignore in as perforce places the files according to the depot spec |
HierarchicalConfiguration |
toConfiguration()
Generate a FieldValueItemHolder from the current state of the object |
ErrorCollection |
validate()
Ensure we have been set up correctly |
ErrorCollection |
validate(BuildConfiguration buildConfiguration)
|
Methods inherited from class com.atlassian.bamboo.repository.AbstractRepository |
---|
addPasswordToCvsRoot, createStringFromList, getLabel, getTriggerIpAddress, getWorkingDirectory, isProcessingRepositoryRequest, referencesDifferentRepository, setLabel, setProcessingRepositoryRequest, setReferencesDifferentRepository, setTriggerIpAddress, updateAectIfRepositoryHasChanged |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NAME
public static final String KEY
public static final String P4_EXE
public static final String P4_PORT
public static final String P4_CLIENT
public static final String P4_DEPOT
public static final String P4_USER
public static final String NO_IDEA
Constructor Detail |
---|
public PerforceRepository()
Method Detail |
---|
public String getP4Executable()
public void setP4Executable(String p4Exe)
p4Exe
- The locataion of the perforce p4 app (eg /usr/local/bin)public String getKey()
public String getName()
public String getUrl()
public void setWorkingDir(File workingDir)
setWorkingDir
in interface Repository
setWorkingDir
in class AbstractRepository
workingDir
- ignoredpublic File getSourceCodeDirectory(Build build)
getSourceCodeDirectory
in interface Repository
getSourceCodeDirectory
in class AbstractRepository
build
-
public String getClient()
public void setClient(String client)
client
- The clientpublic String getPort()
public void setPort(String port)
port
- The perforce server and portpublic String getDepot()
public void setDepot(String depot)
depot
- The depotpublic void setUser(String user)
user
- The perforce userpublic String getUser()
public Collection getChangesSinceLastBuild(Build build, Date lastBuildStartTime) throws RepositoryException
build
- lastBuildStartTime
- the date we are checking from
ChangeLogEntry
objects.
RepositoryException
- A generic failurepublic boolean hasWebBasedRepositoryAccess()
AbstractRepository
hasWebBasedRepositoryAccess
in interface Repository
hasWebBasedRepositoryAccess
in class AbstractRepository
public String getWebRepositoryUrl()
Repository
public String getWebRepositoryUrlRepoName()
Repository
public String getWebRepositoryUrlForFile(CommitFile file)
Repository
file
- The file that has been modified
public String getHost()
Repository
public boolean isRepositoryDifferent(Repository repository)
Repository
public void setWebRepositoryUrl(String url)
Repository
url
- The url of the repositories web interfacepublic void setWebRepositoryUrlRepoName(String repoName)
Repository
repoName
- The name of the repository we are viewingpublic void getAllSourceCode(Build build) throws RepositoryException
build
-
RepositoryException
- Something went wrongpublic ErrorCollection validate()
public ErrorCollection validate(BuildConfiguration buildConfiguration)
public void addDefaultValues(BuildConfiguration buildConfiguration)
addDefaultValues
in interface Repository
addDefaultValues
in class AbstractRepository
public void populateFromConfig(HierarchicalConfiguration config)
ConvertibleFromConfig
FieldValueItemHolder
public HierarchicalConfiguration toConfiguration()
ConvertibleFromConfig
FieldValueItemHolder
from the current state of the object
FieldValueItemHolder
. Never nullpublic int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |