|
||||||||||
| 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 java.lang.String |
BAD_FORMAT
|
static java.lang.String |
COMPLETE_PLUGIN_KEY
|
static java.lang.String |
KEY
|
static java.lang.String |
NAME
|
static java.lang.String |
P4_CAPABILITY_KEY
|
static java.lang.String |
P4_CLIENT
|
static java.lang.String |
P4_DEPOT
|
static java.lang.String |
P4_MANAGE
|
static java.lang.String |
P4_MAVEN_POM_CHECKOUT_POM_RELATIVE_PATH
|
static java.lang.String |
P4_PASSWD
|
static java.lang.String |
P4_PORT
|
static java.lang.String |
P4_USER
|
protected PerforceManager |
perforceManager
|
static java.lang.String |
TEMPORARY_P4_PASSWORD
|
| Fields inherited from class com.atlassian.bamboo.repository.AbstractRepository |
|---|
BUILD_TRIGGER_IP, buildDirectoryManager, buildLoggerManager, CLEAN_CHECKOUT_PARAM, CLEAN_WORKING_DIRECTORY_PARAM, repositoryModuleDescriptor, templateRenderer, textProvider, variableSubstitutionBean |
| Fields inherited from interface com.atlassian.bamboo.repository.Repository |
|---|
SELECTED_REPOSITORY, UNKNOWN_HOST |
| Fields inherited from interface com.atlassian.bamboo.repository.IncludeExcludeAwareRepository |
|---|
FILTER_PATTERN_EXCLUDE, FILTER_PATTERN_INCLUDE, FILTER_PATTERN_OPTION, FILTER_PATTERN_REGEX |
| Constructor Summary | |
|---|---|
PerforceRepository()
|
|
| Method Summary | |
|---|---|
void |
addDefaultValues(BuildConfiguration buildConfiguration)
Extension point for adding default values to the form for BuildConfigurationAwarePlugin.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan) |
BuildChanges |
collectChangesSinceLastBuild(java.lang.String planKey,
java.lang.String lastVcsRevisionKey)
Access the perforce repository to retrieve change logs since the lastVCSRevisionKey |
int |
compareTo(java.lang.Object obj)
|
boolean |
equals(java.lang.Object o)
|
void |
getAllSourceCode(Build build)
Deprecated. |
java.lang.String |
getClient()
Obtain the perforce client we're using |
java.lang.String |
getDepot()
What's the build depot that we're checking for changes? |
java.lang.String |
getEncryptedPassword()
Whats the encryted password for the user |
java.lang.String |
getHost()
Retrieves the address of the Perforce Server |
MavenPomAccessor |
getMavenPomAccessor()
|
java.lang.String |
getMavenPomCheckoutPomRelativePath()
|
int |
getMaxRetries()
Returns the maximum number of times to collect changes |
java.lang.String |
getName()
Return the name of the repository |
java.lang.String |
getP4Executable()
Which perforce p4 exe are we using? |
com.tek42.perforce.Depot |
getPerforceDepot()
Retrieves an instance of a Perforce Depot populated with the builds information |
java.lang.String |
getPort()
Which perforce server are we using? |
int |
getQuietPeriod()
Returns the number of seconds to wait between each retry |
java.io.File |
getSourceCodeDirectory(java.lang.String planKey)
Retrieves the location that the build will occur, If the workspace is managed this includes the source code directory specified by bamboo followed by the directory structure as indicated in the client view. |
java.lang.String |
getSubstitutedClient()
|
java.lang.String |
getSubstitutedDepot()
|
java.lang.String |
getSubstitutedPort()
|
java.lang.String |
getSubstitutedUser()
|
java.lang.String |
getUrl()
|
java.lang.String |
getUser()
What's the optional perforce user name? Returns null if we are not using a user |
int |
hashCode()
|
boolean |
isManageWorkspace()
|
boolean |
isPerforceExecutableSet()
For configuration screens |
boolean |
isQuietPeriodEnabled()
Returns true if we were to enable the quiet period |
boolean |
isRepositoryDifferent(Repository repository)
Checks if the current repo is the same as the given repository |
void |
performPostConfiguration(BuildConfiguration buildConfiguration,
Plan plan)
Allows any other configuration to be performed after another repository has been created. |
void |
performPostConfigurationForSelectedRepository(BuildConfiguration buildConfiguration,
Plan plan)
Allows any other configuration to be performed after this repository has been created |
void |
populateFromConfig(org.apache.commons.configuration.HierarchicalConfiguration config)
Update the current object with data in the HierarchicalConfiguration |
void |
prepareConfigObject(BuildConfiguration buildConfiguration)
Do any preprocessing work before validation occurs. |
java.lang.String |
retrieveSourceCode(BuildContext buildContext,
java.lang.String vcsRevisionKey)
Checkout the sourcecode as at the vcsRevisionKey, if revisionKey is null source will be checked out from head |
java.lang.String |
retrieveSourceCode(java.lang.String planKey,
java.lang.String vcsRevisionKey)
Checks out the latest source code to an appropriate repository |
void |
setCapabilityContext(CapabilityContext capabilityContext)
|
void |
setClient(java.lang.String client)
Define the client we're using to connect to the perforce server |
void |
setDepot(java.lang.String depot)
Define the build depot |
void |
setEncryptedPassword(java.lang.String encryptedPassword)
Set the password for the user. |
void |
setManageWorkspace(boolean manageWorkspace)
|
void |
setMavenPomCheckoutPomRelativePath(java.lang.String mavenPomCheckoutPomRelativePath)
|
void |
setMaxRetries(int maxRetries)
|
void |
setPerforceManager(PerforceManager perforceManager)
|
void |
setPlanManager(PlanManager planManager)
|
void |
setPort(java.lang.String port)
Define the perforce server and port we're going to connect to |
void |
setQuietPeriod(int quietPeriod)
|
void |
setQuietPeriodEnabled(boolean quietPeriodEnabled)
|
void |
setUser(java.lang.String user)
Override the default user, if you want to specify the perforce user |
void |
setWorkingDir(java.io.File workingDir)
Ignore in as perforce will determine the working directory based on the client information |
org.apache.commons.configuration.HierarchicalConfiguration |
toConfiguration()
Generate a HierarchicalConfiguration from the current state of the object |
ErrorCollection |
validate(BuildConfiguration buildConfiguration)
Validates the properties in the BuildConfiguration object. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.atlassian.bamboo.repository.Repository |
|---|
checkConnection, getKey, getLocationIdentifier, getMinimalEditHtml, getShortKey, getTriggerIpAddress, setReferencesDifferentRepository |
| Methods inherited from interface com.atlassian.bamboo.v2.build.repository.RepositoryV2 |
|---|
referencesDifferentRepository |
| Methods inherited from interface com.atlassian.bamboo.v2.build.ConfigurablePlugin |
|---|
customizeBuildRequirements, removeBuildRequirements |
| Methods inherited from interface com.atlassian.bamboo.v2.build.BuildConfigurationAwarePlugin |
|---|
getEditHtml, getViewHtml |
| Methods inherited from interface com.atlassian.bamboo.utils.DescriptionProvider |
|---|
getDescription |
| Field Detail |
|---|
public static final java.lang.String NAME
public static final java.lang.String KEY
public static final java.lang.String COMPLETE_PLUGIN_KEY
public static final java.lang.String P4_PORT
public static final java.lang.String P4_CLIENT
public static final java.lang.String P4_DEPOT
public static final java.lang.String P4_USER
public static final java.lang.String P4_PASSWD
public static final java.lang.String P4_MANAGE
public static final java.lang.String P4_MAVEN_POM_CHECKOUT_POM_RELATIVE_PATH
public static final java.lang.String TEMPORARY_P4_PASSWORD
public static final java.lang.String BAD_FORMAT
public static final java.lang.String P4_CAPABILITY_KEY
protected transient PerforceManager perforceManager
| Constructor Detail |
|---|
public PerforceRepository()
| Method Detail |
|---|
@NotNull
public BuildChanges collectChangesSinceLastBuild(@NotNull
java.lang.String planKey,
@Nullable
java.lang.String lastVcsRevisionKey)
throws RepositoryException
collectChangesSinceLastBuild in interface RepositoryV2planKey - lastVcsRevisionKey - - the revision number for the last build
RepositoryException - If perforce fails to collect the changes
@NotNull
public java.lang.String retrieveSourceCode(@NotNull
java.lang.String planKey,
@Nullable
java.lang.String vcsRevisionKey)
throws RepositoryException
RepositoryV2
retrieveSourceCode in interface RepositoryV2vcsRevisionKey - - may be null if you want latest code
RepositoryException
@NotNull
public java.lang.String retrieveSourceCode(@NotNull
BuildContext buildContext,
@Nullable
java.lang.String vcsRevisionKey)
throws RepositoryException
retrieveSourceCode in interface RepositoryV2buildContext - - for the build being checked outvcsRevisionKey - - the revision to checkout the source from
RepositoryException - if Perforce fails to@NotNull public com.tek42.perforce.Depot getPerforceDepot()
@Nullable public java.lang.String getP4Executable()
@NotNull
public ErrorCollection validate(@NotNull
BuildConfiguration buildConfiguration)
BuildConfigurationAwarePluginBuildConfiguration object. The name of the properties match those passed
in through the form fragments in BuildConfigurationAwarePlugin.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan) template.
validate in interface BuildConfigurationAwarePluginvalidate in class AbstractRepositorybuildConfiguration - - @NotNull
ErrorCollection keyed by the field name. @NotNull
public void performPostConfiguration(BuildConfiguration buildConfiguration,
Plan plan)
PostConfigurableRepository
performPostConfiguration in interface PostConfigurableRepository
public void performPostConfigurationForSelectedRepository(BuildConfiguration buildConfiguration,
Plan plan)
PostConfigurableRepository
performPostConfigurationForSelectedRepository in interface PostConfigurableRepositorypublic java.lang.String getClient()
public java.lang.String getSubstitutedClient()
public void setClient(java.lang.String client)
client - The clientpublic java.lang.String getPort()
public java.lang.String getSubstitutedPort()
public void setPort(java.lang.String port)
port - The perforce server and portpublic java.lang.String getDepot()
public java.lang.String getSubstitutedDepot()
public void setDepot(java.lang.String depot)
depot - The depotpublic void setUser(java.lang.String user)
user - The perforce userpublic java.lang.String getUser()
public java.lang.String getSubstitutedUser()
public boolean isManageWorkspace()
public void setManageWorkspace(boolean manageWorkspace)
public void setEncryptedPassword(java.lang.String encryptedPassword)
encryptedPassword - public java.lang.String getEncryptedPassword()
public java.lang.String getMavenPomCheckoutPomRelativePath()
public void setMavenPomCheckoutPomRelativePath(java.lang.String mavenPomCheckoutPomRelativePath)
@NotNull public java.lang.String getName()
getName in interface RepositorygetName in interface DescriptionProvidergetName in interface NameProviderpublic java.lang.String getUrl()
public void setWorkingDir(java.io.File workingDir)
setWorkingDir in class AbstractRepositoryworkingDir - ignored
@NotNull
public java.io.File getSourceCodeDirectory(@NotNull
java.lang.String planKey)
throws RepositoryException
getSourceCodeDirectory in interface RepositoryV2getSourceCodeDirectory in class AbstractRepositoryplanKey -
RepositoryException - if it can not connect to perforce, could not find appropriate directory or
the depot string is incorrect.public java.lang.String getHost()
getHost in interface Repository
public boolean isRepositoryDifferent(@NotNull
Repository repository)
RepositoryV2
isRepositoryDifferent in interface RepositoryV2repository - to compare against
@NotNull public MavenPomAccessor getMavenPomAccessor()
getMavenPomAccessor in interface MavenPomAccessorCapableRepository
@Deprecated
public void getAllSourceCode(Build build)
throws RepositoryException
build -
RepositoryException - Something went wrong
public void addDefaultValues(@NotNull
BuildConfiguration buildConfiguration)
BuildConfigurationAwarePluginBuildConfigurationAwarePlugin.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)
addDefaultValues in interface BuildConfigurationAwarePluginaddDefaultValues in class AbstractRepositorybuildConfiguration - - @NotNull
public void populateFromConfig(@NotNull
org.apache.commons.configuration.HierarchicalConfiguration config)
ConvertibleFromConfigHierarchicalConfiguration
populateFromConfig in interface ConvertibleFromConfigpopulateFromConfig in class AbstractRepository@NotNull public org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
ConvertibleFromConfigHierarchicalConfiguration from the current state of the object
toConfiguration in interface ConvertibleFromConfigtoConfiguration in class AbstractRepositoryHierarchicalConfiguration. Never nullpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int compareTo(java.lang.Object obj)
public void prepareConfigObject(@NotNull
BuildConfiguration buildConfiguration)
BuildConfigurationAwarePlugin
prepareConfigObject in interface BuildConfigurationAwarePluginbuildConfiguration - - @NotNullpublic boolean isPerforceExecutableSet()
public boolean isQuietPeriodEnabled()
QuietPeriodAwareRepository
isQuietPeriodEnabled in interface QuietPeriodAwareRepositorypublic void setQuietPeriodEnabled(boolean quietPeriodEnabled)
setQuietPeriodEnabled in interface MutableQuietPeriodAwareRepositorypublic int getQuietPeriod()
QuietPeriodAwareRepository
getQuietPeriod in interface QuietPeriodAwareRepositorypublic void setQuietPeriod(int quietPeriod)
setQuietPeriod in interface MutableQuietPeriodAwareRepositorypublic int getMaxRetries()
QuietPeriodAwareRepository
getMaxRetries in interface QuietPeriodAwareRepositorypublic void setMaxRetries(int maxRetries)
setMaxRetries in interface MutableQuietPeriodAwareRepositorypublic void setPerforceManager(PerforceManager perforceManager)
public void setCapabilityContext(CapabilityContext capabilityContext)
public void setPlanManager(PlanManager planManager)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||