public class GenericBootstrapPatch extends AbstractPatch
importers
to import snippets into the system. These snippets would otherwise have been bootstrapped by
a clean install.
By providing this class with a bootstrap view and an importer, it can check whether the path exists and perform the import if it doesn't.
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Properties |
bootstrapView |
protected java.lang.String |
checkPath |
protected static java.lang.String |
ERR_MULTIPLE_FOUND |
protected ImporterBootstrap |
importerBootstrap |
protected static java.lang.String |
MSG_CREATED |
protected static java.lang.String |
MSG_DEFERRED |
protected static java.lang.String |
MSG_EXISTS |
applicationEventPublisher, authenticationContext, ERR_PROPERTY_NOT_SET, namespaceService, nodeService, searchService, tenantAdminService, transactionHelper, transactionService| Constructor and Description |
|---|
GenericBootstrapPatch() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
applyInternal()
This method does the work.
|
protected void |
checkProperties()
Check that the schema version properties have been set appropriately.
|
void |
setBootstrapView(java.util.Properties bootstrapView) |
void |
setCheckPath(java.lang.String checkPath)
Set the XPath statement that must be executed to check whether the import data is
already present or not.
|
void |
setImporterBootstrap(ImporterBootstrap importerBootstrap) |
applies, apply, applyAsync, checkPropertyNotNull, getAlternatives, getDependsOn, getDescription, getFixesFromSchema, getFixesToSchema, getId, getTargetSchema, init, isDeferred, isForce, isIgnored, reportProgress, requiresTransaction, setAlternatives, setApplicationEventPublisher, setApplyToTenants, setAuthenticationContext, setDeferred, setDependsOn, setDescription, setFixesFromSchema, setFixesToSchema, setForce, setId, setIgnored, setNamespaceService, setNodeService, setPatchService, setRequiresTransaction, setSearchService, setTargetSchema, setTenantAdminService, setTransactionService, toStringprotected static final java.lang.String MSG_EXISTS
protected static final java.lang.String MSG_CREATED
protected static final java.lang.String MSG_DEFERRED
protected static final java.lang.String ERR_MULTIPLE_FOUND
protected ImporterBootstrap importerBootstrap
protected java.lang.String checkPath
protected java.util.Properties bootstrapView
public void setImporterBootstrap(ImporterBootstrap importerBootstrap)
importerBootstrap - the bootstrap bean that performs the user store bootstrappublic void setCheckPath(java.lang.String checkPath)
checkPath - an XPath statementpublic void setBootstrapView(java.util.Properties bootstrapView)
bootstrapView - the bootstrap locationImporterBootstrap.setBootstrapViews(List)protected void checkProperties()
AbstractPatchcheckProperties in class AbstractPatchprotected java.lang.String applyInternal()
throws java.lang.Exception
AbstractPatchapplyInternal in class AbstractPatchjava.lang.Exception - anything can be thrown. This must be used for all failures.AbstractPatch.apply()Copyright © 2005 - 2013 Alfresco Software, Inc. All Rights Reserved.