public class CustomModelServiceImpl extends Object implements org.alfresco.service.cmr.dictionary.CustomModelService
Modifier and Type | Field and Description |
---|---|
static String |
ALFRESCO_MODEL_ADMINISTRATORS_AUTHORITY |
static org.alfresco.service.namespace.QName |
ASPECT_CUSTOM_MODEL |
static String |
DEFAULT_CUSTOM_MODEL_ASPECT |
static String |
GROUP_ALFRESCO_MODEL_ADMINISTRATORS_AUTHORITY |
static String |
SHARE_EXT_MODULE_SUFFIX |
Constructor and Description |
---|
CustomModelServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
activateCustomModel(String modelName) |
org.alfresco.repo.dictionary.CompiledModel |
compileModel(org.alfresco.repo.dictionary.M2Model m2Model) |
org.alfresco.service.cmr.dictionary.CustomModelDefinition |
createCustomModel(org.alfresco.repo.dictionary.M2Model m2Model,
boolean activate) |
protected org.alfresco.service.cmr.repository.NodeRef |
createCustomModelCopy(String newName,
org.alfresco.service.cmr.repository.NodeRef modelNodeRef)
Creates a copy of the custom model where the created node will be a child
of download container.
|
protected org.alfresco.service.cmr.repository.NodeRef |
createCustomModelShareExtModuleRef(String modelName)
Finds the
module element within the Share persisted-extension
XML file and then writes the XML fragment as the content of a newly created node. |
org.alfresco.service.cmr.repository.NodeRef |
createDownloadNode(String modelFileName,
boolean withAssociatedForm) |
void |
deactivateCustomModel(String modelName) |
void |
deleteCustomModel(String modelName) |
org.alfresco.query.PagingResults<org.alfresco.service.cmr.dictionary.AspectDefinition> |
getAllCustomAspects(org.alfresco.query.PagingRequest pagingRequest) |
protected List<org.alfresco.service.cmr.dictionary.CustomModelDefinition> |
getAllCustomModels() |
org.alfresco.query.PagingResults<org.alfresco.service.cmr.dictionary.TypeDefinition> |
getAllCustomTypes(org.alfresco.query.PagingRequest pagingRequest) |
org.alfresco.service.cmr.dictionary.AspectDefinition |
getCustomAspect(org.alfresco.service.namespace.QName name) |
protected org.alfresco.util.Pair<org.alfresco.repo.dictionary.CompiledModel,Boolean> |
getCustomCompiledModel(String modelName)
Returns compiled custom model and whether the model is active or not as a
Pair object |
org.alfresco.service.cmr.dictionary.ConstraintDefinition |
getCustomConstraint(org.alfresco.service.namespace.QName name) |
org.alfresco.service.cmr.dictionary.CustomModelDefinition |
getCustomModel(String modelName) |
org.alfresco.service.cmr.dictionary.ModelDefinition |
getCustomModelByUri(String namespaceUri) |
org.alfresco.query.PagingResults<org.alfresco.service.cmr.dictionary.CustomModelDefinition> |
getCustomModels(org.alfresco.query.PagingRequest pagingRequest) |
org.alfresco.repo.dictionary.CustomModelsInfo |
getCustomModelsInfo() |
org.alfresco.service.cmr.dictionary.TypeDefinition |
getCustomType(org.alfresco.service.namespace.QName name) |
org.alfresco.service.cmr.repository.NodeRef |
getModelNodeRef(String modelName) |
protected org.alfresco.service.cmr.repository.NodeRef |
getShareExtModule()
Gets Share persisted-extension nodeRef
|
void |
init()
Checks that all necessary properties and services have been provided.
|
boolean |
isModelAdmin(String userName) |
boolean |
isModelExists(String modelFileName) |
boolean |
isNamespacePrefixExists(String modelNamespacePrefix) |
boolean |
isNamespaceUriExists(String modelNamespaceUri) |
void |
setAuthorityService(AuthorityService authorityService) |
void |
setContentService(ContentService contentService) |
void |
setDictionaryDAO(org.alfresco.repo.dictionary.DictionaryDAOImpl dictionaryDAO) |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setDownloadService(DownloadService downloadSerivce) |
void |
setDownloadStorage(DownloadStorage downloadStorage) |
void |
setHiddenAspect(HiddenAspect hiddenAspect) |
void |
setNamespaceDAO(org.alfresco.repo.dictionary.NamespaceDAO namespaceDAO) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setRepoAdminService(RepoAdminService repoAdminService) |
void |
setRepositoryModelsLocation(RepositoryLocation repoModelsLocation) |
void |
setRetryingTransactionHelper(RetryingTransactionHelper retryingTransactionHelper) |
void |
setSearchService(org.alfresco.service.cmr.search.SearchService searchService) |
void |
setShareExtModulePath(String shareExtModulePath) |
org.alfresco.service.cmr.dictionary.CustomModelDefinition |
updateCustomModel(String modelFileName,
org.alfresco.repo.dictionary.M2Model m2Model,
boolean activate) |
protected <T> org.alfresco.query.PagingResults<T> |
wrapResult(org.alfresco.query.PagingRequest pagingRequest,
List<T> result) |
public static final String DEFAULT_CUSTOM_MODEL_ASPECT
public static final org.alfresco.service.namespace.QName ASPECT_CUSTOM_MODEL
public static final String ALFRESCO_MODEL_ADMINISTRATORS_AUTHORITY
public static final String GROUP_ALFRESCO_MODEL_ADMINISTRATORS_AUTHORITY
public static final String SHARE_EXT_MODULE_SUFFIX
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setDictionaryDAO(org.alfresco.repo.dictionary.DictionaryDAOImpl dictionaryDAO)
public void setContentService(ContentService contentService)
public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
public void setRepositoryModelsLocation(RepositoryLocation repoModelsLocation)
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
public void setNamespaceDAO(org.alfresco.repo.dictionary.NamespaceDAO namespaceDAO)
public void setRetryingTransactionHelper(RetryingTransactionHelper retryingTransactionHelper)
public void setRepoAdminService(RepoAdminService repoAdminService)
public void setAuthorityService(AuthorityService authorityService)
public void setHiddenAspect(HiddenAspect hiddenAspect)
public void setDownloadService(DownloadService downloadSerivce)
public void setDownloadStorage(DownloadStorage downloadStorage)
public void setShareExtModulePath(String shareExtModulePath)
public void init()
public org.alfresco.service.cmr.repository.NodeRef getModelNodeRef(String modelName)
getModelNodeRef
in interface org.alfresco.service.cmr.dictionary.CustomModelService
public org.alfresco.service.cmr.dictionary.CustomModelDefinition getCustomModel(String modelName)
getCustomModel
in interface org.alfresco.service.cmr.dictionary.CustomModelService
public org.alfresco.service.cmr.dictionary.ModelDefinition getCustomModelByUri(String namespaceUri)
getCustomModelByUri
in interface org.alfresco.service.cmr.dictionary.CustomModelService
protected org.alfresco.util.Pair<org.alfresco.repo.dictionary.CompiledModel,Boolean> getCustomCompiledModel(String modelName)
Pair
objectmodelName
- the name of the custom model to retrievePair<CompiledModel, Boolean>
(or null, if it doesn't exist)public org.alfresco.query.PagingResults<org.alfresco.service.cmr.dictionary.CustomModelDefinition> getCustomModels(org.alfresco.query.PagingRequest pagingRequest)
getCustomModels
in interface org.alfresco.service.cmr.dictionary.CustomModelService
protected List<org.alfresco.service.cmr.dictionary.CustomModelDefinition> getAllCustomModels()
public org.alfresco.service.cmr.dictionary.AspectDefinition getCustomAspect(org.alfresco.service.namespace.QName name)
getCustomAspect
in interface org.alfresco.service.cmr.dictionary.CustomModelService
public org.alfresco.query.PagingResults<org.alfresco.service.cmr.dictionary.AspectDefinition> getAllCustomAspects(org.alfresco.query.PagingRequest pagingRequest)
getAllCustomAspects
in interface org.alfresco.service.cmr.dictionary.CustomModelService
public org.alfresco.service.cmr.dictionary.TypeDefinition getCustomType(org.alfresco.service.namespace.QName name)
getCustomType
in interface org.alfresco.service.cmr.dictionary.CustomModelService
public org.alfresco.query.PagingResults<org.alfresco.service.cmr.dictionary.TypeDefinition> getAllCustomTypes(org.alfresco.query.PagingRequest pagingRequest)
getAllCustomTypes
in interface org.alfresco.service.cmr.dictionary.CustomModelService
public org.alfresco.service.cmr.dictionary.ConstraintDefinition getCustomConstraint(org.alfresco.service.namespace.QName name)
getCustomConstraint
in interface org.alfresco.service.cmr.dictionary.CustomModelService
public org.alfresco.service.cmr.dictionary.CustomModelDefinition createCustomModel(org.alfresco.repo.dictionary.M2Model m2Model, boolean activate)
createCustomModel
in interface org.alfresco.service.cmr.dictionary.CustomModelService
public org.alfresco.service.cmr.dictionary.CustomModelDefinition updateCustomModel(String modelFileName, org.alfresco.repo.dictionary.M2Model m2Model, boolean activate)
updateCustomModel
in interface org.alfresco.service.cmr.dictionary.CustomModelService
public org.alfresco.repo.dictionary.CompiledModel compileModel(org.alfresco.repo.dictionary.M2Model m2Model)
compileModel
in interface org.alfresco.service.cmr.dictionary.CustomModelService
protected <T> org.alfresco.query.PagingResults<T> wrapResult(org.alfresco.query.PagingRequest pagingRequest, List<T> result)
public boolean isModelAdmin(String userName)
isModelAdmin
in interface org.alfresco.service.cmr.dictionary.CustomModelService
public void activateCustomModel(String modelName)
activateCustomModel
in interface org.alfresco.service.cmr.dictionary.CustomModelService
public void deactivateCustomModel(String modelName)
deactivateCustomModel
in interface org.alfresco.service.cmr.dictionary.CustomModelService
public void deleteCustomModel(String modelName)
deleteCustomModel
in interface org.alfresco.service.cmr.dictionary.CustomModelService
public boolean isNamespaceUriExists(String modelNamespaceUri)
isNamespaceUriExists
in interface org.alfresco.service.cmr.dictionary.CustomModelService
public boolean isNamespacePrefixExists(String modelNamespacePrefix)
isNamespacePrefixExists
in interface org.alfresco.service.cmr.dictionary.CustomModelService
public boolean isModelExists(String modelFileName)
isModelExists
in interface org.alfresco.service.cmr.dictionary.CustomModelService
public org.alfresco.service.cmr.repository.NodeRef createDownloadNode(String modelFileName, boolean withAssociatedForm)
createDownloadNode
in interface org.alfresco.service.cmr.dictionary.CustomModelService
protected org.alfresco.service.cmr.repository.NodeRef createCustomModelShareExtModuleRef(String modelName)
module
element within the Share persisted-extension
XML file and then writes the XML fragment as the content of a newly created node.modelName
- the model nameprotected org.alfresco.service.cmr.repository.NodeRef getShareExtModule()
protected org.alfresco.service.cmr.repository.NodeRef createCustomModelCopy(String newName, org.alfresco.service.cmr.repository.NodeRef modelNodeRef)
newName
- the model new namemodelNodeRef
- existing model nodeRefpublic org.alfresco.repo.dictionary.CustomModelsInfo getCustomModelsInfo()
getCustomModelsInfo
in interface org.alfresco.service.cmr.dictionary.CustomModelService
Copyright © 2005–2017 Alfresco Software. All rights reserved.