public class PerforceRepository extends AbstractStandaloneRepository implements LegacyRepository, MavenPomAccessorCapableRepository, RequirementsAwareRepository, CustomVariableProviderRepository
Repository interface.| Modifier and Type | Field and Description |
|---|---|
static String |
BAD_FORMAT |
static String |
COMPLETE_PLUGIN_KEY |
static String |
KEY |
static String |
NAME |
static String |
P4_CAPABILITY_KEY |
static String |
P4_CLIENT |
static String |
P4_DEPOT |
static String |
P4_EXTRA_ENVIRONMENT |
static String |
P4_MANAGE |
static String |
P4_MAVEN_POM_CHECKOUT_POM_RELATIVE_PATH |
static String |
P4_PASSWD |
static String |
P4_PORT |
static String |
P4_USECLIENTMAPPING |
static String |
P4_USER |
protected PerforceManager |
perforceManager |
static String |
TEMPORARY_P4_PASSWORD |
administrationConfigurationAccessor, BUILD_TRIGGER_IP, buildDirectoryManager, buildLoggerManager, customVariableContext, featureManager, REPO_PREFIX, repositoryModuleDescriptor, templateRenderer, textProvidermoduleDescriptorSELECTED_REPOSITORY, UNKNOWN_HOSTFILTER_PATTERN_EXCLUDE, FILTER_PATTERN_INCLUDE, FILTER_PATTERN_NONE, FILTER_PATTERN_OPTION, FILTER_PATTERN_REGEXCHANGESET_FILTER_PATTERN_REGEX, MAVEN_RELEASE_PLUGIN_EXCLUSION_PATTERN| Constructor and Description |
|---|
PerforceRepository() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDefaultValues(BuildConfiguration buildConfiguration)
Extension point for adding default values to the form for
RenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan) |
BuildRepositoryChanges |
collectChangesForRevision(PlanKey planKey,
String targetRevision)
Collects the changes for the targetRevision.
|
BuildRepositoryChanges |
collectChangesSinceLastBuild(String planKey,
String lastVcsRevisionKey)
Access the perforce repository to retrieve change logs since the lastVCSRevisionKey
|
int |
compareTo(Object obj) |
boolean |
equals(Object o) |
String |
getClient()
Obtain the perforce client we're using
|
Map<String,String> |
getCustomVariables()
Return a map containing name->value mapping of the variables.
|
String |
getDepot()
What's the build depot that we're checking for changes?
|
String |
getEncryptedPassword()
Whats the encryted password for the user
|
String |
getEnvironmentVariables() |
String |
getHost()
Retrieves the address of the Perforce Server
|
MavenPomAccessor |
getMavenPomAccessor() |
String |
getMavenPomCheckoutPomRelativePath() |
String |
getName()
Return the name of the repository
|
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
|
Map<String,String> |
getPlanRepositoryVariables()
Return a map containing name->value mapping of the plan repository format variables.
|
String |
getPort()
Which perforce server are we using?
|
Set<Requirement> |
getRequirements() |
File |
getSourceCodeDirectory(PlanKey planKey)
Retrieves the location that the build will occur.
|
String |
getSubstitutedClient() |
String |
getSubstitutedDepot() |
String |
getSubstitutedPort() |
String |
getSubstitutedUser() |
String |
getUrl() |
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 |
isRepositoryDifferent(Repository repository)
Checks if the current repo is the same as the given repository
|
boolean |
isUseClientMapping() |
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.
|
String |
retrieveSourceCode(BuildContext buildContext,
String vcsRevisionKey)
Checkout the sourcecode as at the vcsRevisionKey, if revisionKey is null source will be checked out from head
|
void |
setCapabilityContext(CapabilityContext capabilityContext) |
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 |
setEncryptedPassword(String encryptedPassword)
Set the password for the user.
|
void |
setEnvironmentVariableAccessor(EnvironmentVariableAccessor environmentVariableAccessor) |
void |
setEnvironmentVariables(String environmentVariables) |
void |
setManageWorkspace(boolean manageWorkspace) |
void |
setMavenPomCheckoutPomRelativePath(String mavenPomCheckoutPomRelativePath) |
void |
setPerforceManager(PerforceManager perforceManager) |
void |
setPort(String port)
Define the perforce server and port we're going to connect to
|
void |
setUseClientMapping(boolean useClientMapping) |
void |
setUser(String user)
Override the default user, if you want to specify the perforce user
|
void |
setWorkingDir(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. |
getAdvancedEditHtml, getAdvancedViewHtml, getEditHtml, getViewHtml, getViewHtmlcheckConnection, customizeBuildRequirements, getAdvancedEditHtml, getAdvancedViewHtml, getBranchIntegrationEditHtml, getChangesetFilterPatternRegex, getDefaultTriggerModule, getDescription, getEditHtml, getFilterFilePatternOption, getFilterFilePatternRegex, getKey, getLocationIdentifier, getMavenPomCheckoutAccessEditHtml, getMaxCommitsToReturn, getMaxRetries, getMinimalEditHtml, getPollingTriggerModule, getQuietPeriod, getShortKey, getSystemWideExclusionPatterns, getViewHtml, getWorkingDirectory, init, isAdvancedOptionEnabled, isQuietPeriodEnabled, isWorkspaceEmpty, removeBuildRequirements, setAdministrationConfigurationAccessor, setBuildDirectoryManager, setBuildLoggerManager, setChangesetFilterPatternRegex, setCustomVariableContext, setFeatureManager, setFilterFilePatternOption, setFilterFilePatternRegex, setTemplateRenderer, setTextProvider, substituteString, toMergeCapableRepositorypopulateContextForEdit, populateContextForViewclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitcheckConnection, getKey, getLocationIdentifier, getMinimalEditHtml, getShortKeycustomizeBuildRequirements, removeBuildRequirementsisConfigurationMissinginitgetEditHtml, getViewHtmlgetDescriptionpublic static final String NAME
public static final String KEY
public static final String COMPLETE_PLUGIN_KEY
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 P4_PASSWD
public static final String P4_MANAGE
public static final String P4_USECLIENTMAPPING
public static final String P4_EXTRA_ENVIRONMENT
public static final String P4_MAVEN_POM_CHECKOUT_POM_RELATIVE_PATH
public static final String TEMPORARY_P4_PASSWORD
public static final String BAD_FORMAT
public static final String P4_CAPABILITY_KEY
protected transient PerforceManager perforceManager
@NotNull public BuildRepositoryChanges collectChangesForRevision(@NotNull PlanKey planKey, @Nullable String targetRevision) throws RepositoryException
OnceOffCapableRepositorycollectChangesForRevision in interface OnceOffCapableRepositorycollectChangesForRevision in class AbstractRepositoryRepositoryException - if something goes wrong@NotNull public BuildRepositoryChanges collectChangesSinceLastBuild(@NotNull String planKey, @Nullable String lastVcsRevisionKey) throws RepositoryException
collectChangesSinceLastBuild in interface RepositoryV2planKey - lastVcsRevisionKey - - the revision number for the last buildRepositoryException - If perforce fails to collect the changes@NotNull public String retrieveSourceCode(@NotNull BuildContext buildContext, @Nullable String vcsRevisionKey) throws RepositoryException
retrieveSourceCode in interface LegacyRepositorybuildContext - - for the build being checked outvcsRevisionKey - - the revision to checkout the source fromRepositoryException - if Perforce fails to@NotNull public com.tek42.perforce.Depot getPerforceDepot()
@Nullable public 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 RenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan) template.validate in interface BuildConfigurationAwarePluginvalidate in class AbstractRepositorybuildConfiguration - -ErrorCollection keyed by the field name.@NotNull public Set<Requirement> getRequirements()
getRequirements in interface RequirementsAwareRepositorypublic String getClient()
public String getSubstitutedClient()
public void setClient(String client)
client - The clientpublic String getPort()
public String getSubstitutedPort()
public void setPort(String port)
port - The perforce server and portpublic String getDepot()
public String getSubstitutedDepot()
public void setDepot(String depot)
depot - The depotpublic void setUser(String user)
user - The perforce userpublic String getUser()
public String getSubstitutedUser()
public boolean isManageWorkspace()
public void setManageWorkspace(boolean manageWorkspace)
public boolean isUseClientMapping()
public void setUseClientMapping(boolean useClientMapping)
public String getEnvironmentVariables()
public void setEnvironmentVariables(String environmentVariables)
public void setEncryptedPassword(String encryptedPassword)
encryptedPassword - public String getEncryptedPassword()
public String getMavenPomCheckoutPomRelativePath()
public void setMavenPomCheckoutPomRelativePath(String mavenPomCheckoutPomRelativePath)
@NotNull public String getName()
getName in interface RepositorygetName in interface DescriptionProvidergetName in interface NameProviderpublic String getUrl()
public void setWorkingDir(File workingDir)
setWorkingDir in class AbstractRepositoryworkingDir - ignored@NotNull public File getSourceCodeDirectory(@NotNull PlanKey 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.@NotNull public String getHost()
getHost in interface Repositorypublic boolean isRepositoryDifferent(@NotNull
Repository repository)
RepositoryV2isRepositoryDifferent in interface RepositoryV2repository - to compare against@NotNull public MavenPomAccessor getMavenPomAccessor()
getMavenPomAccessor in interface MavenPomAccessorCapableRepositorypublic void addDefaultValues(@NotNull
BuildConfiguration buildConfiguration)
BuildConfigurationAwarePluginRenderableBuildConfiguration.getEditHtml(com.atlassian.bamboo.ww2.actions.build.admin.create.BuildConfiguration, com.atlassian.bamboo.plan.Plan)addDefaultValues in interface BuildConfigurationAwarePluginaddDefaultValues in class AbstractRepositorybuildConfiguration - -public void populateFromConfig(@NotNull
org.apache.commons.configuration.HierarchicalConfiguration config)
ConvertibleFromConfigHierarchicalConfigurationpopulateFromConfig in interface ConvertibleFromConfigpopulateFromConfig in class AbstractRepository@NotNull public org.apache.commons.configuration.HierarchicalConfiguration toConfiguration()
ConvertibleFromConfigHierarchicalConfiguration from the current state of the objecttoConfiguration in interface ConvertibleFromConfigtoConfiguration in class AbstractRepositoryHierarchicalConfiguration. Never null@NotNull public Map<String,String> getCustomVariables()
CustomVariableProviderRepositoryNull values will be filtered out so it's safe to put them in the map.
getCustomVariables in interface CustomVariableProviderRepository@NotNull public Map<String,String> getPlanRepositoryVariables()
CustomVariableProviderRepositoryNull values will be filtered out so it's safe to put them in the map.
getPlanRepositoryVariables in interface CustomVariableProviderRepositorypublic int compareTo(Object obj)
public void prepareConfigObject(@NotNull
BuildConfiguration buildConfiguration)
BuildConfigurationAwarePluginprepareConfigObject in interface BuildConfigurationAwarePluginprepareConfigObject in class BaseBuildConfigurationAwarePluginbuildConfiguration - -public boolean isPerforceExecutableSet()
public void setPerforceManager(PerforceManager perforceManager)
public void setCapabilityContext(CapabilityContext capabilityContext)
public void setEnvironmentVariableAccessor(EnvironmentVariableAccessor environmentVariableAccessor)
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.