public interface CustomModelService
Modifier and Type | Method and Description |
---|---|
void |
activateCustomModel(String modelFileName)
Activates custom model
|
CompiledModel |
compileModel(M2Model m2Model)
Compiles the
M2Model . |
CustomModelDefinition |
createCustomModel(M2Model m2Model,
boolean activate)
Creates custom model
|
NodeRef |
createDownloadNode(String modelName,
boolean withAssociatedForm)
Creates a downloadable archive file containing the custom model file and
if specified, its associated Share extension module file.
|
void |
deactivateCustomModel(String modelFileName)
Deactivates custom model
|
void |
deleteCustomModel(String modelFileName)
Deletes custom model.
|
org.alfresco.query.PagingResults<AspectDefinition> |
getAllCustomAspects(org.alfresco.query.PagingRequest pagingRequest)
Get a paged list of custom aspects
|
org.alfresco.query.PagingResults<TypeDefinition> |
getAllCustomTypes(org.alfresco.query.PagingRequest pagingRequest)
Gets a paged list of custom types
|
AspectDefinition |
getCustomAspect(QName name)
Gets custom aspect
|
ConstraintDefinition |
getCustomConstraint(QName name)
Gets custom constraint
|
CustomModelDefinition |
getCustomModel(String modelFileName)
Gets custom model
|
ModelDefinition |
getCustomModelByUri(String namespaceUri)
Gets custom model
|
org.alfresco.query.PagingResults<CustomModelDefinition> |
getCustomModels(org.alfresco.query.PagingRequest pagingRequest)
Gets a paged list of custom models
|
CustomModelsInfo |
getCustomModelsInfo()
Gets custom models' information.
|
TypeDefinition |
getCustomType(QName name)
Gets custom type
|
NodeRef |
getModelNodeRef(String modelFileName)
Gets custom model node reference
|
boolean |
isModelAdmin(String userName)
Indicates whether the specified user is a model-administrator or not.
|
boolean |
isModelExists(String modelFileName)
Whether a model with the given name exists or not
|
boolean |
isNamespacePrefixExists(String modelNamespacePrefix)
Whether the given namespace prefix has already been used or not
|
boolean |
isNamespaceUriExists(String modelNamespaceUri)
Whether the given URI has already been used or not
|
CustomModelDefinition |
updateCustomModel(String modelFileName,
M2Model m2Model,
boolean activate)
Updates custom model
|
CustomModelDefinition getCustomModel(String modelFileName)
modelFileName
- the name of the custom model to retrieveCustomModelDefinition
(or null, if it doesn't exist)ModelDefinition getCustomModelByUri(String namespaceUri)
namespaceUri
- the namespace URI defined within the modelModelDefinition
(or null, if it doesn't exist)org.alfresco.query.PagingResults<CustomModelDefinition> getCustomModels(org.alfresco.query.PagingRequest pagingRequest)
pagingRequest
- paging requestCustomModelDefinition
AspectDefinition getCustomAspect(QName name)
name
- the name of the custom aspect to retrieveAspectDefinition
(or null, if it doesn't exist)org.alfresco.query.PagingResults<AspectDefinition> getAllCustomAspects(org.alfresco.query.PagingRequest pagingRequest)
pagingRequest
- paging requestAspectDefinition
TypeDefinition getCustomType(QName name)
name
- the name of the custom type to retrieveTypeDefinition
(or null, if it doesn't exist)org.alfresco.query.PagingResults<TypeDefinition> getAllCustomTypes(org.alfresco.query.PagingRequest pagingRequest)
pagingRequest
- paging requestTypeDefinition
NodeRef getModelNodeRef(String modelFileName)
modelFileName
- the name of the custom model to retrieveNodeRef
of the custom model (or null, if it doesn't exist)CustomModelDefinition createCustomModel(M2Model m2Model, boolean activate)
m2Model
- the M2Model
objectactivate
- whether the model should be activated or notCustomModelDefinition
objectboolean isModelAdmin(String userName)
Note: The super/repo admin is considered to be a model-administrator too.
userName
- The user namevoid activateCustomModel(String modelFileName)
modelFileName
- the name of the custom modelorg.alfresco.service.cmr.admin.RepoAdminService#activateModel(String)}
void deactivateCustomModel(String modelFileName)
modelFileName
- the name of the custom modelorg.alfresco.service.cmr.admin.RepoAdminService#deactivateModel(String)}
CustomModelDefinition updateCustomModel(String modelFileName, M2Model m2Model, boolean activate)
modelFileName
- the model namem2Model
- the M2Model
objectactivate
- whether the model should be activated or notCustomModelDefinition
objectvoid deleteCustomModel(String modelFileName)
The model can only be deleted if it is inactive
modelFileName
- the model nameboolean isNamespaceUriExists(String modelNamespaceUri)
modelNamespaceUri
- the model namespace URIboolean isModelExists(String modelFileName)
modelFileName
- the model nameboolean isNamespacePrefixExists(String modelNamespacePrefix)
modelNamespaceUri
- the model namespace prefixConstraintDefinition getCustomConstraint(QName name)
name
- the name of the custom constraint to retrieveConstraintDefinition
(or null, if it doesn't exist)NodeRef createDownloadNode(String modelName, boolean withAssociatedForm)
modelName
- the model name to be exportedwithAssociatedForm
- whether Share extension module file should be
included or notCompiledModel compileModel(M2Model m2Model)
M2Model
.m2Model
- the modelCustomModelConstraintException
InvalidCustomModelException
CustomModelsInfo getCustomModelsInfo()
CustomModelsInfo
containing:
Copyright © 2005–2018 Alfresco Software. All rights reserved.