org.alfresco.repo.admin.patch.impl
Class CopiedFromAspectPatch
java.lang.Object
org.alfresco.repo.admin.patch.AbstractPatch
org.alfresco.repo.admin.patch.impl.CopiedFromAspectPatch
- All Implemented Interfaces:
- Patch, org.springframework.context.ApplicationEventPublisherAware
public class CopiedFromAspectPatch
- extends AbstractPatch
Patch to break the link between working copies
and copies
.
Formerly, when a document was copied, it was given a cm:source property on the
cm:copiedfrom aspect - a d:noderef property. During checkout, the
working copy was given the cm:workingcopy aspect and the cm:copiedfrom
aspect was assumed to be present. However, the ordinality of the cm:copiedfrom's
cm:source property didn't match up with the checkin-checkout 1:1 relationship.
This patch works in two parts:
cm:copiedfrom
- cm:source is transformed into a peer association, cm:original
- The aspect is removed where the source no longer exists
cm:workingcopy
- cm:source is transformed into a peer association, cm:workingcopylink
- The original is given aspect cm:checkedout
- The copy keeps cm:workingcopy
- Since:
- 4.0
Methods inherited from class org.alfresco.repo.admin.patch.AbstractPatch |
applies, apply, checkPropertyNotNull, getAlternatives, getDependsOn, getDescription, getFixesFromSchema, getFixesToSchema, getId, getTargetSchema, init, isForce, reportProgress, requiresTransaction, setAlternatives, setApplicationEventPublisher, setApplyToTenants, setAuthenticationContext, setDependsOn, setDescription, setFixesFromSchema, setFixesToSchema, setForce, setId, setNamespaceService, setNodeService, setPatchService, setRequiresTransaction, setSearchService, setTargetSchema, setTenantAdminService, setTransactionService, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CopiedFromAspectPatch
public CopiedFromAspectPatch()
setPatchDAO
public void setPatchDAO(PatchDAO patchDAO)
- Parameters:
patchDAO
- additional queries
setNodeDAO
public void setNodeDAO(NodeDAO nodeDAO)
- Parameters:
nodeDAO
- provides query support
setDictionaryService
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
- Parameters:
dictionaryService
- type and aspect resolution
setBehaviourFilter
public void setBehaviourFilter(BehaviourFilter behaviourFilter)
- Parameters:
behaviourFilter
- used to switch off cm:auditable behaviour
setRuleService
public void setRuleService(RuleService ruleService)
- Parameters:
ruleService
- used to disable rules
setBatchThreads
public void setBatchThreads(int batchThreads)
- Parameters:
batchThreads
- the number of threads that will write child association changes
setBatchSize
public void setBatchSize(int batchSize)
- Parameters:
batchSize
- the number of child associations that will be modified per transaction
setBatchMaxQueryRange
public void setBatchMaxQueryRange(int batchMaxQueryRange)
- Parameters:
batchMaxQueryRange
- the largest ID range that the work provider can query for.
Lower this if the DB resultset retrieval causes memory issues
prior to the query limit
being
applied.
checkProperties
protected void checkProperties()
- Description copied from class:
AbstractPatch
- Check that the schema version properties have been set appropriately. Derived classes can override this method to
perform their own validation provided that this method is called by the derived class.
- Overrides:
checkProperties
in class AbstractPatch
applyInternal
protected java.lang.String applyInternal()
throws java.lang.Exception
- Description copied from class:
AbstractPatch
- This method does the work. All transactions and thread-safety will be taken care of by this class. Any exception
will result in the transaction being rolled back. Integrity checks are downgraded for the duration of the
transaction.
- Specified by:
applyInternal
in class AbstractPatch
- Returns:
- Returns the report (only success messages).
- Throws:
java.lang.Exception
- anything can be thrown. This must be used for all failures.- See Also:
AbstractPatch.apply()
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.