Package org.alfresco.repo.admin
Class RepoAdminServiceImpl
- java.lang.Object
-
- org.alfresco.repo.admin.RepoAdminServiceImpl
-
- All Implemented Interfaces:
RepoAdminService
public class RepoAdminServiceImpl extends java.lang.Object implements RepoAdminService
Repository Admin Service Implementation.- See Also:
interface
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCRITERIA_ALLstatic java.lang.StringdefaultSubtypeOfContentstatic java.lang.StringdefaultSubtypeOfDictionaryModel
-
Constructor Summary
Constructors Constructor Description RepoAdminServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.alfresco.service.namespace.QNameactivateModel(java.lang.String modelFileName)Activate custom model.org.alfresco.service.namespace.QNamedeactivateModel(java.lang.String modelFileName)Deactivate custom model.java.lang.StringdeployMessageBundle(java.lang.String resourceClasspath)Deploy custom message resource bundle (to the 'Messages' space).voiddeployModel(java.io.InputStream modelStream, java.lang.String modelFileName)Deploy custom model (to the 'Models' space).org.alfresco.service.cmr.repository.NodeRefdeployModel(java.io.InputStream modelStream, java.lang.String modelFileName, boolean activate)Deploy custom model (to the 'Models' space).java.util.List<java.lang.String>getMessageBundles()Get deployed custom messages resource bundles.java.util.List<RepoModelDefinition>getModels()Get list of deployed custom model.RepoUsagegetRestrictions()Get the currently-active restrictions to the repository usageRepoUsagegetUsage()Get the repository usage, where knownRepoUsageStatusgetUsageStatus()Get full information on the state of the usage limits, including errors and warnings about limits in play.voidreloadMessageBundle(java.lang.String bundleBaseName)Reload custom message resource bundle.voidsetContentService(ContentService contentService)voidsetDictionaryDAO(org.alfresco.repo.dictionary.DictionaryDAO dictionaryDAO)voidsetMessageService(MessageService messageService)voidsetNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)voidsetNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)voidsetRepositoryMessagesLocation(RepositoryLocation repoMessagesLocation)voidsetRepositoryModelsLocation(RepositoryLocation repoModelsLocation)voidsetRepoUsageComponent(RepoUsageComponent repoUsageComponent)voidsetSearchService(org.alfresco.service.cmr.search.SearchService searchService)voidundeployMessageBundle(java.lang.String bundleBaseName)Undeploy custom message resource bundle (from the 'Messages' space).org.alfresco.service.namespace.QNameundeployModel(java.lang.String modelFileName)Undeploy custom model (from the 'Models' space).booleanupdateUsage(RepoUsage.UsageType usageType)Force an update of the usages, providing a hint on the specific updates required.
-
-
-
Field Detail
-
CRITERIA_ALL
public static final java.lang.String CRITERIA_ALL
- See Also:
- Constant Field Values
-
defaultSubtypeOfDictionaryModel
public static final java.lang.String defaultSubtypeOfDictionaryModel
- See Also:
- Constant Field Values
-
defaultSubtypeOfContent
public static final java.lang.String defaultSubtypeOfContent
- See Also:
- Constant Field Values
-
-
Method Detail
-
setDictionaryDAO
public void setDictionaryDAO(org.alfresco.repo.dictionary.DictionaryDAO dictionaryDAO)
-
setSearchService
public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
-
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
-
setContentService
public void setContentService(ContentService contentService)
-
setNamespaceService
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
-
setMessageService
public void setMessageService(MessageService messageService)
-
setRepoUsageComponent
public void setRepoUsageComponent(RepoUsageComponent repoUsageComponent)
-
setRepositoryModelsLocation
public void setRepositoryModelsLocation(RepositoryLocation repoModelsLocation)
-
setRepositoryMessagesLocation
public void setRepositoryMessagesLocation(RepositoryLocation repoMessagesLocation)
-
getModels
public java.util.List<RepoModelDefinition> getModels()
Description copied from interface:RepoAdminServiceGet list of deployed custom model.- Specified by:
getModelsin interfaceRepoAdminService
-
deployModel
public org.alfresco.service.cmr.repository.NodeRef deployModel(java.io.InputStream modelStream, java.lang.String modelFileName, boolean activate)Description copied from interface:RepoAdminServiceDeploy custom model (to the 'Models' space). Allows creation of new models and incremental update of existing models.- Specified by:
deployModelin interfaceRepoAdminService- Parameters:
modelStream- the model input streammodelFileName- modelFileName the model file nameactivate- whether the model should be activated or not- Returns:
- the nodeRef of the created model
-
deployModel
public void deployModel(java.io.InputStream modelStream, java.lang.String modelFileName)Description copied from interface:RepoAdminServiceDeploy custom model (to the 'Models' space). Allows creation of new models and incremental update of existing models.- Specified by:
deployModelin interfaceRepoAdminService
-
activateModel
public org.alfresco.service.namespace.QName activateModel(java.lang.String modelFileName)
Description copied from interface:RepoAdminServiceActivate custom model.- Specified by:
activateModelin interfaceRepoAdminService
-
deactivateModel
public org.alfresco.service.namespace.QName deactivateModel(java.lang.String modelFileName)
Description copied from interface:RepoAdminServiceDeactivate custom model.- Specified by:
deactivateModelin interfaceRepoAdminService
-
undeployModel
public org.alfresco.service.namespace.QName undeployModel(java.lang.String modelFileName)
Description copied from interface:RepoAdminServiceUndeploy custom model (from the 'Models' space). Allows delete of existing models, if not used. Permanently removes the model definition from the repository (all versions).- Specified by:
undeployModelin interfaceRepoAdminService
-
getMessageBundles
public java.util.List<java.lang.String> getMessageBundles()
Description copied from interface:RepoAdminServiceGet deployed custom messages resource bundles.- Specified by:
getMessageBundlesin interfaceRepoAdminService
-
deployMessageBundle
public java.lang.String deployMessageBundle(java.lang.String resourceClasspath)
Description copied from interface:RepoAdminServiceDeploy custom message resource bundle (to the 'Messages' space).- Specified by:
deployMessageBundlein interfaceRepoAdminService
-
undeployMessageBundle
public void undeployMessageBundle(java.lang.String bundleBaseName)
Description copied from interface:RepoAdminServiceUndeploy custom message resource bundle (from the 'Messages' space).- Specified by:
undeployMessageBundlein interfaceRepoAdminService
-
reloadMessageBundle
public void reloadMessageBundle(java.lang.String bundleBaseName)
Description copied from interface:RepoAdminServiceReload custom message resource bundle.- Specified by:
reloadMessageBundlein interfaceRepoAdminService
-
getRestrictions
public RepoUsage getRestrictions()
Description copied from interface:RepoAdminServiceGet the currently-active restrictions to the repository usage- Specified by:
getRestrictionsin interfaceRepoAdminService
-
getUsage
public RepoUsage getUsage()
Description copied from interface:RepoAdminServiceGet the repository usage, where known- Specified by:
getUsagein interfaceRepoAdminService- Returns:
- the currently-known repository usage
-
updateUsage
public boolean updateUsage(RepoUsage.UsageType usageType)
Description copied from interface:RepoAdminServiceForce an update of the usages, providing a hint on the specific updates required. If another client is already performing the update, then the calling code will need to determine the severity i.e. is an updated value really needed. Generally clients should accept that the data might be slightly stale, especially since there is no way to guarantee visibility of data being put into the database by other transactions.- Specified by:
updateUsagein interfaceRepoAdminService- Parameters:
usageType- the type of usage update to perform- Returns:
- true if the update succeeded or false if some other client was already performing the same update
-
getUsageStatus
public RepoUsageStatus getUsageStatus()
Description copied from interface:RepoAdminServiceGet full information on the state of the usage limits, including errors and warnings about limits in play.- Specified by:
getUsageStatusin interfaceRepoAdminService- Returns:
- the object containing all the information
-
-