org.alfresco.repo.admin.patch
Class PatchServiceImpl

java.lang.Object
  extended by org.alfresco.repo.admin.patch.PatchServiceImpl
All Implemented Interfaces:
PatchService

public class PatchServiceImpl
extends java.lang.Object
implements 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

Constructor Summary
PatchServiceImpl()
           
 
Method Summary
 boolean applyOutstandingPatches()
          Apply all outstanding patches that are relevant to the repo.
 java.util.List getPatches(java.util.Date fromDate, java.util.Date toDate)
          Retrieves all applied patches between two specific times.
 void registerPatch(Patch patch)
          Registers a patch with the service that executes them.
 void setAppliedPatchDAO(AppliedPatchDAO appliedPatchDAO)
           
 void setDescriptorService(DescriptorService descriptorService)
           
 void setRuleService(RuleService ruleService)
           
 void setTransactionService(TransactionServiceImpl transactionService)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatchServiceImpl

public PatchServiceImpl()
Method Detail

setDescriptorService

public void setDescriptorService(DescriptorService descriptorService)

setTransactionService

public void setTransactionService(TransactionServiceImpl transactionService)

setAppliedPatchDAO

public void setAppliedPatchDAO(AppliedPatchDAO appliedPatchDAO)

setRuleService

public void setRuleService(RuleService ruleService)

registerPatch

public void registerPatch(Patch patch)
Description copied from interface: PatchService
Registers a patch with the service that executes them.

Specified by:
registerPatch in interface PatchService
Parameters:
patch - the patch to register

validatePatches

public boolean validatePatches()
Description copied from interface: PatchService
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:
validatePatches in interface PatchService
Returns:
true if validation is successful. Outputs errors and returns false otherwise.

applyOutstandingPatches

public boolean applyOutstandingPatches()
Description copied from interface: PatchService
Apply 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:
applyOutstandingPatches in interface PatchService
Returns:
Returns true if all outstanding patches were applied, or false if the process was termintated before all patches could be applied.

getPatches

public java.util.List getPatches(java.util.Date fromDate,
                                 java.util.Date toDate)
Description copied from interface: PatchService
Retrieves all applied patches between two specific times.

Specified by:
getPatches in interface PatchService
Returns:
Returns all applied patches (successful or not)


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.