Package org.alfresco.repo.admin.patch
Class PatchServiceImpl
java.lang.Object
org.alfresco.repo.admin.patch.PatchServiceImpl
- All Implemented Interfaces:
PatchService
Manages patches applied against the repository.
Patches are injected into this class and any attempted applications are recorded for later auditing.
- Since:
- 1.2
- Author:
- Derek Hulley
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanapplyOutstandingPatch(Patch patch) Apply the specified patch that is relevant to the repo, regardless of the deferred flag.booleanApply all outstanding patches that are relevant to the repo.Retrieve an existing patchgetPatches(Date fromDate, Date toDate) Retrieves all applied patches between two specific times.voidregisterPatch(Patch patch) Registers a patch with the service that executes them.voidsetAppliedPatchDAO(AppliedPatchDAO appliedPatchDAO) voidsetDescriptorService(DescriptorService descriptorService) voidsetRuleService(RuleService ruleService) voidsetTransactionService(TransactionServiceImpl transactionService) booleanvalidatePatch(Patch patch) Does some up-front validation on the specified patch, specifically to see if it applies to the current server version and not some future version.booleanDoes some up-front validation on the patches, specifically to see if they all apply to the current server version and not some future version.
-
Constructor Details
-
PatchServiceImpl
public PatchServiceImpl()
-
-
Method Details
-
setDescriptorService
-
setTransactionService
-
setAppliedPatchDAO
-
setRuleService
-
registerPatch
Description copied from interface:PatchServiceRegisters a patch with the service that executes them.- Specified by:
registerPatchin interfacePatchService- Parameters:
patch- the patch to register
-
validatePatches
public boolean validatePatches()Does some up-front validation on the patches, specifically to see if they all apply to the current server version and not some future version. This is to prevent tampering with versioning information attached to a license.- Specified by:
validatePatchesin interfacePatchService- Returns:
- true if validation is successful. Outputs errors and returns false otherwise.
-
validatePatch
Does some up-front validation on the specified patch, specifically to see if it applies to the current server version and not some future version. This is to prevent tampering with versioning information attached to a license.- Specified by:
validatePatchin interfacePatchService- Parameters:
patch- the patch object- Returns:
- true if validation is successful. Outputs errors and returns false otherwise.
-
applyOutstandingPatches
public boolean applyOutstandingPatches()Description copied from interface:PatchServiceApply all outstanding patches that are relevant to the repo. If there is a failure, then the patches that were applied will remain so, but the process will not attempt to apply any further patches.- Specified by:
applyOutstandingPatchesin interfacePatchService- Returns:
- Returns true if all outstanding patches were applied, or false if the process was terminated before all patches could be applied.
-
applyOutstandingPatch
Apply the specified patch that is relevant to the repo, regardless of the deferred flag.- Specified by:
applyOutstandingPatchin interfacePatchService- Parameters:
patch- the patch object- Returns:
- true if the specified patch and its dependencies were applied, or false if the process was terminated before all patches could be applied.
-
getPatches
Description copied from interface:PatchServiceRetrieves all applied patches between two specific times.- Specified by:
getPatchesin interfacePatchService- Parameters:
fromDate- the start date of the search, or null to get all patches from the starttoDate- the end date of the search, or null to g- Returns:
- Returns all applied patches (successful or not)
-
getPatch
Description copied from interface:PatchServiceRetrieve an existing patch- Specified by:
getPatchin interfacePatchService- Parameters:
id- the patch unique ID- Returns:
- Returns the patch instance or null if one has not been persisted
-