public class ContentUrlConverterPatch extends AbstractPatch
ServiceRegistry
is used to record progress. The component picks up ranges of node IDs
(DM and AVM) and records the progress. Since new nodes will not need converting, the converter
will stop once it hits the largest node ID that it found upon first initiation. Once completed,
the content store reader will start to pick up orphaned content and schedule it for deletion.
A cluster-wide lock is set so that a single instance of this job will be running per Alfresco
installation.Modifier and Type | Class and Description |
---|---|
static class |
ContentUrlConverterPatch.ContentUrlConverterJob
Job to initiate the
ContentUrlConverterPatch |
applicationEventPublisher, authenticationContext, ERR_PROPERTY_NOT_SET, namespaceService, nodeService, searchService, tenantAdminService, transactionHelper, transactionService
Constructor and Description |
---|
ContentUrlConverterPatch()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
applyInternal()
Gets a set of work to do and executes it within this transaction.
|
protected void |
checkProperties()
Check that the schema version properties have been set appropriately.
|
void |
setBatchSize(int batchSize)
Set the number of URLs that are processed per job pass; this property is ignored
when this component is run as a patch.
|
void |
setContentDataDAO(ContentDataDAO contentDataDAO)
Set the component that will write URLs coming from the
content store . |
void |
setContentStore(ContentStore contentStore)
Set the store containing the content URLs to lift for potential cleaning.
|
void |
setControlDAO(ControlDAO controlDAO)
Component that provides low-level database-specific control to support the patch
|
void |
setJobLockService(JobLockService jobLockService)
Service to prevent concurrent execution
|
void |
setPatchDAO(PatchDAO patchDAO)
Component that provides low-level queries and updates to support this patch
|
void |
setRegistryService(RegistryService registryService)
Service to record progress for later pick-up
|
void |
setRunAsScheduledJob(boolean runAsScheduledJob)
Set whether the patch execution should just bypass any actual work i.e.
|
void |
setThreadCount(int threadCount)
Set the number of threads that will be used process the required work.
|
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
public void setRegistryService(RegistryService registryService)
public void setJobLockService(JobLockService jobLockService)
public void setPatchDAO(PatchDAO patchDAO)
public void setControlDAO(ControlDAO controlDAO)
public void setContentStore(ContentStore contentStore)
contentStore
- the store containing the system's content URLspublic void setContentDataDAO(ContentDataDAO contentDataDAO)
content store
.contentDataDAO
- the DAO to write the URLspublic void setThreadCount(int threadCount)
threadCount
- the number of threadspublic void setBatchSize(int batchSize)
batchSize
- the number of nodes to process per batch when running on a schedulepublic void setRunAsScheduledJob(boolean runAsScheduledJob)
runAsScheduledJob
- true to leave all work up to the scheduled jobprotected void checkProperties()
AbstractPatch
checkProperties
in class AbstractPatch
protected java.lang.String applyInternal() throws java.lang.Exception
applyInternal
in class AbstractPatch
java.lang.Exception
- anything can be thrown. This must be used for all failures.AbstractPatch.apply()
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.