org.alfresco.repo.admin.patch.impl
Class MigrateVersionStorePatch

java.lang.Object
  extended by org.alfresco.repo.admin.patch.AbstractPatch
      extended by org.alfresco.repo.admin.patch.impl.MigrateVersionStorePatch
All Implemented Interfaces:
Patch, org.springframework.context.ApplicationEventPublisherAware

public class MigrateVersionStorePatch
extends AbstractPatch

Migrate version store from workspace://lightWeightVersionStore to workspace://version2Store


Nested Class Summary
static class MigrateVersionStorePatch.MigrateVersionStoreJob
          Job to initiate the MigrateVersionStorePatch
 
Field Summary
static org.alfresco.service.namespace.QName LOCK
           
static long LOCK_TTL
           
 
Fields inherited from class org.alfresco.repo.admin.patch.AbstractPatch
applicationEventPublisher, authenticationContext, ERR_PROPERTY_NOT_SET, namespaceService, nodeService, searchService, tenantAdminService, transactionHelper, transactionService
 
Constructor Summary
MigrateVersionStorePatch()
          Default constructor
 
Method Summary
protected  java.lang.String applyInternal()
          Gets a set of work to do and executes it within this transaction.
 void init()
          This ensures that this bean gets registered with the appropriate service.
 void setBatchSize(int batchSize)
           
 void setDeleteImmediately(boolean deleteImmediately)
           
 void setImporterBootstrap(ImporterBootstrap version2ImporterBootstrap)
           
 void setJobLockService(JobLockService jobLockService)
           
 void setLimitPerJobCycle(int limitPerJobCycle)
           
 void setOnlyUseDeprecatedV1(boolean useDeprecatedV1)
           
 void setRunAsScheduledJob(boolean runAsScheduledJob)
          Set whether the patch execution should just bypass any actual work i.e.
 void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
           
 void setThreadCount(int threadCount)
           
 void setVersionMigrator(VersionMigrator versionMigrator)
           
 
Methods inherited from class org.alfresco.repo.admin.patch.AbstractPatch
applies, apply, checkProperties, checkPropertyNotNull, getAlternatives, getDependsOn, getDescription, getFixesFromSchema, getFixesToSchema, getId, getTargetSchema, 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
 

Field Detail

LOCK

public static final org.alfresco.service.namespace.QName LOCK

LOCK_TTL

public static final long LOCK_TTL
See Also:
Constant Field Values
Constructor Detail

MigrateVersionStorePatch

public MigrateVersionStorePatch()
Default constructor

Method Detail

setVersionMigrator

public void setVersionMigrator(VersionMigrator versionMigrator)

setTenantService

public void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)

setImporterBootstrap

public void setImporterBootstrap(ImporterBootstrap version2ImporterBootstrap)

setJobLockService

public void setJobLockService(JobLockService jobLockService)

setBatchSize

public void setBatchSize(int batchSize)

setThreadCount

public void setThreadCount(int threadCount)

setLimitPerJobCycle

public void setLimitPerJobCycle(int limitPerJobCycle)

setDeleteImmediately

public void setDeleteImmediately(boolean deleteImmediately)

setRunAsScheduledJob

public void setRunAsScheduledJob(boolean runAsScheduledJob)
Set whether the patch execution should just bypass any actual work i.e. the admin has chosen to manually trigger the work.

Parameters:
runAsScheduledJob - true to leave all work up to the scheduled job

setOnlyUseDeprecatedV1

public void setOnlyUseDeprecatedV1(boolean useDeprecatedV1)

init

public void init()
Description copied from class: AbstractPatch
This ensures that this bean gets registered with the appropriate service.

Overrides:
init in class AbstractPatch

applyInternal

protected java.lang.String applyInternal()
                                  throws java.lang.Exception
Gets a set of work to do and executes it within this transaction. Can be kicked off via a job or called as a patch. Note that this is not wrapped in a transaction. The patch manages its own transactions.

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.