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 Properties |
bootstrapView |
protected String |
checkPath |
protected static String |
ERR_MULTIPLE_FOUND |
protected ImporterBootstrap |
importerBootstrap |
protected static String |
MSG_CREATED |
protected static String |
MSG_DEFERRED |
protected static String |
MSG_EXISTS |
applicationEventPublisher, authenticationContext, ERR_PROPERTY_NOT_SET, namespaceService, nodeService, patchService, searchService, tenantAdminService, transactionHelper, transactionService| Constructor and Description |
|---|
GenericBootstrapPatch() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
applyInternal()
This method does the work.
|
protected void |
checkProperties()
Check that the schema version properties have been set appropriately.
|
void |
setBootstrapView(Properties bootstrapView) |
void |
setCheckPath(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 String MSG_EXISTS
protected static final String MSG_CREATED
protected static final String MSG_DEFERRED
protected static final String ERR_MULTIPLE_FOUND
protected ImporterBootstrap importerBootstrap
protected String checkPath
protected Properties bootstrapView
public void setImporterBootstrap(ImporterBootstrap importerBootstrap)
importerBootstrap - the bootstrap bean that performs the user store bootstrappublic void setCheckPath(String checkPath)
checkPath - an XPath statementpublic void setBootstrapView(Properties bootstrapView)
bootstrapView - the bootstrap locationImporterBootstrap.setBootstrapViews(List)protected void checkProperties()
AbstractPatchcheckProperties in class AbstractPatchprotected String applyInternal() throws Exception
AbstractPatchapplyInternal in class AbstractPatchException - anything can be thrown. This must be used for all failures.AbstractPatch.apply()Copyright © 2005–2018 Alfresco Software. All rights reserved.