Package flexagon.fd.core.plugin
Class FlexBuildArtifacts
java.lang.Object
flexagon.fd.core.plugin.FlexBuildArtifacts
Utility class to help build artifact zip file for partial deploy operations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected WorkflowExecutionContextprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcalculateDirectoryHash(File dirToHash) This is not common but during build all files in a folder are used to calculate hash of entire folder.protected StringcalculateFileHash(File pFile) This is most commonly used during build as most partial deployment project work with individual files.protected StringcalculateHash(ProjectObject projectObject) If isMetaDataOnlyProjectObject then we do not have enough details to calculate hash, so just use System.currentTimeMillis in this case.checkFileInSource(String pFile, boolean pThrowException) protected FilecheckFolder(String pTargetFolder) finalizePackageObjects(List<PackageObject> pPackageObjects, boolean pZipObjects) generateZIPArtifact(List<PackageObject> pPackageObjects) Utility for Partial Deployments.protected Fileprotected booleanincludeObjectInZip(ProjectObject projectObject) This is used by classes that extend it to determine if files should be included in the zip.protected booleanisMetaDataOnlyProjectObject(ProjectObject pProjectObject) protected voidprepareTempFileCollectionFolder(File pTempFileCollectionFolder) Overridden by subclasses to add any files to the collection folder which should be part of the zip even if they are not included in package.
-
Field Details
-
MISSING_FILE_MESSAGE_PREFIX
- See Also:
-
mContext
-
-
Constructor Details
-
FlexBuildArtifacts
-
-
Method Details
-
getContext
-
getTargetDirectory
-
getZipFileName
-
getSourceDirectories
-
generateZIPArtifact
public List<PackageObject> generateZIPArtifact(List<PackageObject> pPackageObjects) throws FlexCheckedException Utility for Partial Deployments. Generates ZIP artifact for ProjectObjects. This utility adds the Hash to the Object and returns ProjectObjects back as IN-Out parameter.- Throws:
FlexCheckedException
-
finalizePackageObjects
public List<PackageObject> finalizePackageObjects(List<PackageObject> pPackageObjects, boolean pZipObjects) throws FlexCheckedException - Throws:
FlexCheckedException
-
includeObjectInZip
This is used by classes that extend it to determine if files should be included in the zip.- Returns:
- boolean, whether to include a project object in the zip file
-
checkFolder
- Parameters:
pTargetFolder- the folder to check if it's a real folder- Returns:
- File if it's a real folder, otherwise a FlexInvalidArgumentException is thrown.
-
getFile
-
calculateDirectoryHash
This is not common but during build all files in a folder are used to calculate hash of entire folder.- Returns:
- hash string of the directory
- Throws:
FlexCheckedException
-
calculateFileHash
This is most commonly used during build as most partial deployment project work with individual files.- Returns:
- hash string of the file
- Throws:
FlexCheckedException
-
calculateHash
If isMetaDataOnlyProjectObject then we do not have enough details to calculate hash, so just use System.currentTimeMillis in this case.- Returns:
- hash string of a metadata only Project Object
-
checkFileInSource
-
isMetaDataOnlyProjectObject
-
prepareTempFileCollectionFolder
protected void prepareTempFileCollectionFolder(File pTempFileCollectionFolder) throws FlexCheckedException Overridden by subclasses to add any files to the collection folder which should be part of the zip even if they are not included in package. This is used if there are other supported files needed on the deploy side.- Throws:
FlexCheckedException
-