Package flexagon.fd.core.workflow
Class WorkflowExecutionContext
java.lang.Object
flexagon.ff.common.core.pojos.BasePOJO
flexagon.fd.core.workflow.WorkflowExecutionContext
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
MockWorkflowExecutionContext
Represents context information related to the current plugin execution, such as the target
environment and instance, properties, inputs, output, etc.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionINTERNAL USE ONLYWorkflowExecutionContext(Project pProject, Environment pEnvironment, Instance pInstance, Long pWorkflowRequestId, Properties pProperties) INTERNAL USE ONLYWorkflowExecutionContext(Project pProject, Environment pEnvironment, Instance pInstance, Long pWorkflowRequestId, Map<String, PropertyValue> pInputs) INTERNAL USE ONLY -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperty(String pKey, Object pValue, DataTypeEnum pDataType, boolean pIsEncrypted) INTERNAL USE ONLYvoidaddProperty(String pInstanceCode, String pKey, Object pValue, DataTypeEnum pDataType, boolean pIsEncrypted) INTERNAL USE ONLYclone()INTERNAL USE ONLYvoidReturns the artifacts directory of the target endpoint, which is used to store artifacts produced or consumed by plugin operations.Returns the backups directory of the target endpoint, which is used to store backup artifacts produced or consumed by plugin operations.The base install directory is the directory defined by the "Base Working Directory" on the target endpoint.Returns the base working directory of the target endpoint.Returns commits included in current execution.Returns the target environment which the current workflow is executing inReturns the input with the given name as an Object.Returns the inputs for the current workflow executionReturns the plugin installation directory on the target endpoint.getInstallPluginsDirectory(String pluginName, String pluginVersion) Returns the plugin installation sub-directory for the given plugin name and plugin version.Returns the target instance which the current workflow is executing onReturns the internal directory of the target endpoint, which is used to store temporary files generated by the plugin execution lifecycle and its plugins.Returns all Issues included in the current execution.INTERNAL USE ONLYINTERNAL USE ONLYReturns the object results directory of the target endpoint, which is used to store results produced by partial deployment plugin operations.Returns the workflow execution id of the current execution.Returns the map of Outputs.INTERNAL USE ONLYReturns the plugin execution idReturns a project property value suitable for printing, in that encrypted values are masked.getPrintablePropertyValue(String pInstanceCode, String pKey) Returns an Target property value for the given instance which is suitable for printing, in that encrypted values are masked.Returns the project which the current workflow execution is forINTERNAL USE ONLYReturns the properties for the current workflow executiongetPropertyValue(String pKey) Returns a project property value.getPropertyValue(String pInstanceCode, String pKey) Returns an environment property value for the given instance.getPropertyValueOrDefault(String pKey, Object pDefault) Returns a project property value.getPropertyValueOrDefault(String pInstanceCode, String pKey, Object pDefault) Returns an Target property value.Returns the reports directory of the target endpoint.Returns the scan results directory of the target endpoint, which is used to store test results produced by scan plugin operations.Returns the temp directory of the target endpoint, which is used to store temporary files generated by the plugin executions.Returns the test results directory of the target endpoint, which is used to store test results produced by test plugin operations.Returns the transfer directory of the target endpoint, which used for sharing files between plugin operations within a single workflow.Returns the id of the current workflow executionINTERNAL USE ONLY - this method will return null on PluginsReturns the workflow request id of the current execution.Returns the workflow type nameReturns the working directory of the target endpoint.booleanbooleanbooleanbooleanbooleanbooleanReturns whether "force deploy" was selected on the submit build/deploy request.booleanbooleanbooleanbooleanbooleanbooleanbooleanvoidsetBaseInstallDirectory(String pDirectory) INTERNAL USE ONLYvoidsetCommits(List<ScmCommit> pCommits) INTERNAL USE ONLYvoidsetConsumesArtifacts(boolean pConsumesArtifacts) voidsetEnvironment(Environment pEnvironment) INTERNAL USE ONLYvoidsetForceDeploy(boolean pForceDeploy) INTERNAL USE ONLYvoidsetInstance(Instance pInstance) INTERNAL USE ONLYvoidINTERNAL USE ONLYvoidsetLastEndPoint(Long pLastEndPoint) INTERNAL USE ONLYvoidsetMainInstance(Instance pMainInstance) INTERNAL USE ONLYvoidsetOrginatingWorkflowExecutionId(Long pOrginatingWorkflowExecutionId) INTERNAL USE ONLYvoidsetOutput(String pName, Object pValue, DataTypeEnum pDataType) INTERNAL USE ONLYvoidsetPackageObjects(List<PackageObject> pPackageObjects) INTERNAL USE ONLYvoidsetPluginExecutionId(Long pPluginExecutionId) INTERNAL USE ONLYvoidsetPostRefresh(boolean pPostRefresh) voidsetProducesArtifacts(boolean pProducesArtifacts) voidsetProject(Project pProject) INTERNAL USE ONLYvoidsetProperties(Properties pProperties) INTERNAL USE ONLYvoidsetPropertyDefinitions(Map<String, PropertyDefinition> pPropertyDefinitions) INTERNAL USE ONLYvoidsetUnfilteredPackageObjectList(List<PackageObject> pUnfilteredPackageObjectList) voidsetWorkflowExecutionId(Long pWorkflowExecutionId) INTERNAL USE ONLYvoidsetWorkflowRequestId(Long pWorkflowRequestId) INTERNAL USE ONLYvoidsetWorkflowType(String pWorkflowType) Sets the workflow type nametoString()Returns custom String representation implemented by walking complete object structure.
-
Field Details
-
mUnfilteredPackageObjectList
-
-
Constructor Details
-
WorkflowExecutionContext
public WorkflowExecutionContext(Project pProject, Environment pEnvironment, Instance pInstance, Long pWorkflowRequestId, Map<String, PropertyValue> pInputs) INTERNAL USE ONLY -
WorkflowExecutionContext
public WorkflowExecutionContext()INTERNAL USE ONLY -
WorkflowExecutionContext
public WorkflowExecutionContext(Project pProject, Environment pEnvironment, Instance pInstance, Long pWorkflowRequestId, Properties pProperties) INTERNAL USE ONLY
-
-
Method Details
-
copyState
-
clone
INTERNAL USE ONLY- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
getWorkflowExecutionState
INTERNAL USE ONLY - this method will return null on Plugins -
setWorkflowRequestId
INTERNAL USE ONLY -
getWorkflowRequestId
Returns the workflow request id of the current execution.- Returns:
- the workflow request id
-
setOrginatingWorkflowExecutionId
INTERNAL USE ONLY -
getOrginatingWorkflowExecutionId
Returns the workflow execution id of the current execution. If workflow is a child workflow, this still returns main workflow execution id.- Returns:
- the originating workflow execution id
-
setPluginExecutionId
INTERNAL USE ONLY -
getPluginExecutionId
Returns the plugin execution id- Returns:
- the plugin execution id
-
setWorkflowType
Sets the workflow type name -
getWorkflowType
Returns the workflow type name- Returns:
- string the workflow type name
-
getWorkflowExecutionId
Returns the id of the current workflow execution- Returns:
- the workflow execution id
-
setWorkflowExecutionId
INTERNAL USE ONLY -
setProject
INTERNAL USE ONLY -
getProject
Returns the project which the current workflow execution is for- Returns:
- the project
-
getEnvironment
Returns the target environment which the current workflow is executing in- Returns:
- the environment
-
setEnvironment
INTERNAL USE ONLY -
getInstance
Returns the target instance which the current workflow is executing on- Returns:
- the instance
-
setInstance
INTERNAL USE ONLY -
setMainInstance
INTERNAL USE ONLY -
getMainInstance
INTERNAL USE ONLY -
getProperties
Returns the properties for the current workflow execution- Returns:
- the properties for the current workflow execution
-
getInput
Returns the input with the given name as an Object. Returns null if the input is not found.- Parameters:
pName- the name of the input- Returns:
- the input object
-
getInputMap
Returns the inputs for the current workflow execution- Returns:
- a Map of all inputs for the current execution
-
setProperties
INTERNAL USE ONLY -
getPrintablePropertyValue
Returns a project property value suitable for printing, in that encrypted values are masked.- Parameters:
pKey- the key of the property to find- Returns:
- the project property value
-
getPropertyValue
Returns a project property value. WARNING: Values of encrypted properties are not masked.- Parameters:
pKey- the key of the property to find- Returns:
- the project property value
-
getPropertyValueOrDefault
Returns a project property value. If value is not set, pDefault will be returned. WARNING: Values of encrypted properties are not masked.- Parameters:
pKey- the key of the property to findpDefault- the default value- Returns:
- the project property value
-
getPrintablePropertyValue
Returns an Target property value for the given instance which is suitable for printing, in that encrypted values are masked.- Parameters:
pInstanceCode- the instance codepKey- the key of the property to find- Returns:
- the Target property value
-
getPropertyValue
Returns an environment property value for the given instance. WARNING: Values of encrypted properties are not masked.- Parameters:
pInstanceCode- the instance codepKey- the key of the property to find- Returns:
- the Target property value
-
getPropertyValueOrDefault
Returns an Target property value. If value is not set, pDefault will be returned. WARNING: Values of encrypted properties are not masked.- Parameters:
pInstanceCode- the instance codepKey- the key of the property to findpDefault- the default value- Returns:
- the Target property value
-
addProperty
INTERNAL USE ONLY -
addProperty
public void addProperty(String pInstanceCode, String pKey, Object pValue, DataTypeEnum pDataType, boolean pIsEncrypted) INTERNAL USE ONLY -
setOutput
INTERNAL USE ONLY -
getOutputMap
Returns the map of Outputs.- Returns:
- the outputs
-
getBaseWorkingDirectory
Returns the base working directory of the target endpoint. The base working directory is located in the "work" subdirectory of the base install directory of the endpoint.- Returns:
- the base working directory
-
getWorkingDirectory
Returns the working directory of the target endpoint. The working directory is generated uniquely within the base working directory, and has the following structure:
[base working directory]/[project id]/[workflow execution id]
(e.g. /u01/flexdeploy/work/10009/12801)
- Returns:
- the working directory
-
getInternalDirectory
Returns the internal directory of the target endpoint, which is used to store temporary files generated by the plugin execution lifecycle and its plugins. The internal directory is located in the "internal" sub-folder of the working directory.- Returns:
- the internal directory
-
getTempDirectory
Returns the temp directory of the target endpoint, which is used to store temporary files generated by the plugin executions. The temp directory is located in the "temp" sub-folder of the working directory.- Returns:
- the temp directory
-
getArtifactsDirectory
Returns the artifacts directory of the target endpoint, which is used to store artifacts produced or consumed by plugin operations. The artifacts directory is located in the "artifacts" sub-folder of the working directory.- Returns:
- the artifacts directory
-
getBackupsDirectory
Returns the backups directory of the target endpoint, which is used to store backup artifacts produced or consumed by plugin operations. The backups directory is located in the "backups" sub-folder of the working directory.- Returns:
- the backups directory
-
getTransferDirectory
Returns the transfer directory of the target endpoint, which used for sharing files between plugin operations within a single workflow. The transfer directory is located in the "transfer" sub-folder of the working directory.- Returns:
- the artifacts directory
-
getReportsDirectory
Returns the reports directory of the target endpoint. The reports directory is located in the "reports" sub-folder of the working directory. RESERVED FOR FUTURE USE.- Returns:
- the reports directory
-
getTestResultsDirectory
Returns the test results directory of the target endpoint, which is used to store test results produced by test plugin operations. The test results directory is located in the "test-results" sub-folder of the working directory.- Returns:
- the test results directory
-
getScanResultsDirectory
Returns the scan results directory of the target endpoint, which is used to store test results produced by scan plugin operations. The scan results directory is located in the "scan-results" sub-folder of the working directory.- Returns:
- the scan results directory
-
getObjectResultsDirectory
Returns the object results directory of the target endpoint, which is used to store results produced by partial deployment plugin operations. The object results directory is located in the "object-results" sub-folder of the working directory.- Returns:
- the object results directory
-
getProjectSourcesDirectory
INTERNAL USE ONLY -
getBaseInstallDirectory
The base install directory is the directory defined by the "Base Working Directory" on the target endpoint.- Returns:
- the base installation directory
-
setBaseInstallDirectory
INTERNAL USE ONLY -
getInstallPluginsDirectory
Returns the plugin installation directory on the target endpoint. The plugin installation directory is located in the "plugins" subdirectory of the base install directory on the endpoint.- Returns:
- the plugin installation directory
-
getInstallPluginsDirectory
Returns the plugin installation sub-directory for the given plugin name and plugin version. This directory is located in the following path on the endpoint:
[plugin installation directory]/[plugin name]/[plugin version]
- Parameters:
pluginName- the name of the pluginpluginVersion- the plugin version- Returns:
- the plugin installation directory for a specific plugin name and version
-
setLastEndPoint
INTERNAL USE ONLY -
getLastEndPoint
INTERNAL USE ONLY -
setForceDeploy
public void setForceDeploy(boolean pForceDeploy) INTERNAL USE ONLY -
isForceDeploy
public boolean isForceDeploy()Returns whether "force deploy" was selected on the submit build/deploy request.- Returns:
- whether force deploy was selected for this request
-
setPackageObjects
INTERNAL USE ONLY -
getPackageObjects
INTERNAL USE ONLY -
toString
Description copied from class:BasePOJOReturns custom String representation implemented by walking complete object structure. -
isWindows
public boolean isWindows() -
setPostRefresh
public void setPostRefresh(boolean pPostRefresh) -
isPostRefresh
public boolean isPostRefresh() -
setProducesArtifacts
public void setProducesArtifacts(boolean pProducesArtifacts) -
isProducesArtifacts
public boolean isProducesArtifacts() -
setConsumesArtifacts
public void setConsumesArtifacts(boolean pConsumesArtifacts) -
isConsumesArtifacts
public boolean isConsumesArtifacts() -
isBuildWorkflow
public boolean isBuildWorkflow() -
isDeployWorkflow
public boolean isDeployWorkflow() -
isSyncStateWorkflow
public boolean isSyncStateWorkflow() -
isPreDeployWorkflow
public boolean isPreDeployWorkflow() -
isUtilityWorkflow
public boolean isUtilityWorkflow() -
isTestWorkflow
public boolean isTestWorkflow() -
isDeployOrUtilityWorkflow
public boolean isDeployOrUtilityWorkflow() -
isDeployOrPreDeployWorkflow
public boolean isDeployOrPreDeployWorkflow() -
setPropertyDefinitions
INTERNAL USE ONLY -
getPropertyDefinitions
-
setIssues
INTERNAL USE ONLY -
getIssues
Returns all Issues included in the current execution. If deploy this will include all the issues that are to be deployed since previous deployment.- Returns:
- list of all Issues included in the current execution
-
setCommits
INTERNAL USE ONLY -
getCommits
Returns commits included in current execution. If deploy this will include all the commits that are to be deployed since previous deployment.- Returns:
- list of all commits included in current execution
-
getUnfilteredPackageObjectList
-
setUnfilteredPackageObjectList
-