|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.admin.patch.AbstractPatch
org.alfresco.repo.admin.patch.impl.QNamePatch
public class QNamePatch
A patch to update the value of a QName. This patch will only succeed if the target QName has not been used i.e. if there is no content that actually references the QName.
A property 'reindexClass' can be optionally injected. If it is not injected then the QName is updated and no reindexing is requested by this patch. If it is set to either 'TYPE' or 'ASPECT' (as appropriate) then that String will be used to locate out-of-date references to the old QName and have them reindexed in a targetted way. Please refer to the implementation in this class for the details of how this is achieved.
Field Summary |
---|
Fields inherited from class org.alfresco.repo.admin.patch.AbstractPatch |
---|
applicationEventPublisher, authenticationContext, ERR_PROPERTY_NOT_SET, namespaceService, nodeService, searchService, tenantAdminService, transactionHelper, transactionService |
Constructor Summary | |
---|---|
QNamePatch()
|
Method Summary | |
---|---|
protected java.lang.String |
applyInternal()
This method does the work. |
void |
setImporterBootstrap(ImporterBootstrap importerBootstrap)
Sets the importerBootstrap. |
void |
setIndexerAndSearcher(IndexerAndSearcher indexerAndSearcher)
Sets the IndexerAndSearcher. |
void |
setQnameAfter(java.lang.String qnameStringAfter)
Sets the new QName value to be used. |
void |
setQnameBefore(java.lang.String qnameStringBefore)
Sets the QName to be patched. |
void |
setQnameDAO(QNameDAO qnameDAO)
Sets the QNameDAO. |
void |
setReindexClass(java.lang.String reindexClass)
Sets a value for the class to reindex. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public QNamePatch()
Method Detail |
---|
public void setImporterBootstrap(ImporterBootstrap importerBootstrap)
importerBootstrap.
- public void setIndexerAndSearcher(IndexerAndSearcher indexerAndSearcher)
indexerAndSearcher
- public void setQnameDAO(QNameDAO qnameDAO)
qnameDAO
- public void setQnameBefore(java.lang.String qnameStringBefore)
qnameStringBefore
- the long-form QName to be patched from. {namespaceURI}localNamepublic void setQnameAfter(java.lang.String qnameStringAfter)
qnameStringAfter
- the long-form QName to be patched to. {namespaceURI}localNamepublic void setReindexClass(java.lang.String reindexClass)
reindexClass
- "TYPE" or "ASPECT" or not set.protected java.lang.String applyInternal() throws java.lang.Exception
AbstractPatch
applyInternal
in class AbstractPatch
java.lang.Exception
- anything can be thrown. This must be used for all failures.AbstractPatch.apply()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |