public class CustomModelsImpl extends Object implements CustomModels
Modifier and Type | Class and Description |
---|---|
static class |
CustomModelsImpl.ConstraintValidator
Constraint validator
|
class |
CustomModelsImpl.ModelDetails |
Modifier and Type | Field and Description |
---|---|
static String |
ASPECT_NAME_NULL_ERR |
static String |
CONSTRAINT_NAME_NULL_ERR |
protected org.alfresco.service.cmr.dictionary.CustomModelService |
customModelService |
protected org.alfresco.service.cmr.dictionary.DictionaryService |
dictionaryService |
static String |
MODEL_NAME_NULL_ERR |
static Pattern |
NAME_PATTERN |
protected org.alfresco.service.namespace.NamespaceService |
namespaceService |
protected org.alfresco.service.cmr.repository.NodeService |
nodeService |
protected PersonService |
personService |
static String |
TYPE_NAME_NULL_ERR |
static Pattern |
URI_PATTERN |
protected ValueDataTypeValidator |
valueDataTypeValidator |
Constructor and Description |
---|
CustomModelsImpl() |
Modifier and Type | Method and Description |
---|---|
CustomAspect |
createCustomAspect(String modelName,
CustomAspect aspect)
Creates custom model's aspect
|
CustomModel |
createCustomModel(CustomModel model)
Creates custom model
|
CustomModel |
createCustomModel(org.alfresco.repo.dictionary.M2Model m2Model)
Creates custom model from the imported
M2Model . |
CustomModelConstraint |
createCustomModelConstraint(String modelName,
CustomModelConstraint constraint)
Creates custom model's constraint
|
CustomType |
createCustomType(String modelName,
CustomType type)
Creates custom model's type
|
CustomModelDownload |
createDownload(String modelName,
Parameters parameters)
Starts the creation of a downloadable archive file containing the
custom model file and its associated Share extension module file (if requested).
|
void |
deleteCustomAspect(String modelName,
String aspectName)
Deletes the custom model's aspect
|
void |
deleteCustomModel(String modelName)
Deletes the custom model
|
void |
deleteCustomType(String modelName,
String typeName)
Deletes the custom model's type
|
protected String |
getCurrentUserFullName()
Gets the fully authenticated user's full name
|
CustomAspect |
getCustomAspect(String modelName,
String aspectName,
Parameters parameters)
Gets the
org.alfresco.rest.api.model.CustomAspect representation of
the given model's aspect |
CollectionWithPagingInfo<CustomAspect> |
getCustomAspects(String modelName,
Parameters parameters)
Gets a paged list of all the given custom model's aspects
|
CustomModel |
getCustomModel(String modelName,
Parameters parameters)
Gets the
org.alfresco.rest.api.model.CustomModel representation for the given model |
CustomModelConstraint |
getCustomModelConstraint(String modelName,
String constraintName,
Parameters parameters)
Gets the
org.alfresco.rest.api.model.CustomModelConstraint
representation of the given model's constraint |
CollectionWithPagingInfo<CustomModelConstraint> |
getCustomModelConstraints(String modelName,
Parameters parameters)
Gets a paged list of all of the given custom model's constraints
|
CollectionWithPagingInfo<CustomModel> |
getCustomModels(Parameters parameters)
Gets a paged list of all custom models
|
CustomType |
getCustomType(String modelName,
String typeName,
Parameters parameters)
Gets the
org.alfresco.rest.api.model.CustomType representation of
the given model's type |
CollectionWithPagingInfo<CustomType> |
getCustomTypes(String modelName,
Parameters parameters)
Gets a paged list of all the given custom model's types
|
protected org.alfresco.util.Pair<String,String> |
resolveToUriAndPrefix(String parentName)
Gets the namespace URI and prefix from the parent's name, provided that the
given name is of a valid format.
|
void |
setCustomModelService(org.alfresco.service.cmr.dictionary.CustomModelService customModelService) |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setPersonService(PersonService personService) |
void |
setValueDataTypeValidator(ValueDataTypeValidator valueDataTypeValidator) |
CustomAspect |
updateCustomAspect(String modelName,
CustomAspect aspect,
Parameters parameters)
Updates the custom model's aspect
|
CustomModel |
updateCustomModel(String modelName,
CustomModel model,
Parameters parameters)
Updates or activates/deactivates the custom model
|
CustomType |
updateCustomType(String modelName,
CustomType type,
Parameters parameters)
Updates the custom model's type
|
public static final Pattern NAME_PATTERN
public static final Pattern URI_PATTERN
public static final String MODEL_NAME_NULL_ERR
public static final String TYPE_NAME_NULL_ERR
public static final String ASPECT_NAME_NULL_ERR
public static final String CONSTRAINT_NAME_NULL_ERR
protected org.alfresco.service.cmr.dictionary.CustomModelService customModelService
protected org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService
protected PersonService personService
protected org.alfresco.service.cmr.repository.NodeService nodeService
protected org.alfresco.service.namespace.NamespaceService namespaceService
protected ValueDataTypeValidator valueDataTypeValidator
public void setCustomModelService(org.alfresco.service.cmr.dictionary.CustomModelService customModelService)
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
public void setPersonService(PersonService personService)
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
public void setValueDataTypeValidator(ValueDataTypeValidator valueDataTypeValidator)
public CustomModel getCustomModel(String modelName, Parameters parameters)
CustomModels
org.alfresco.rest.api.model.CustomModel
representation for the given modelgetCustomModel
in interface CustomModels
modelName
- the model nameparameters
- the Parameters
object to get the parameters passed into the requestorg.alfresco.rest.api.model.CustomModel
objectpublic CollectionWithPagingInfo<CustomModel> getCustomModels(Parameters parameters)
CustomModels
getCustomModels
in interface CustomModels
parameters
- the Parameters
object to get the parameters passed into the requestorg.alfresco.rest.api.model.CustomModel
objectspublic CustomModel createCustomModel(CustomModel model)
CustomModels
createCustomModel
in interface CustomModels
model
- the custom model to createorg.alfresco.rest.api.model.CustomModel
objectpublic CustomModel updateCustomModel(String modelName, CustomModel model, Parameters parameters)
CustomModels
updateCustomModel
in interface CustomModels
modelName
- the model namemodel
- the custom model to update (JSON payload)parameters
- the Parameters
object to get the parameters passed into the requestorg.alfresco.rest.api.model.CustomModel
objectpublic void deleteCustomModel(String modelName)
CustomModels
deleteCustomModel
in interface CustomModels
modelName
- the model namepublic CustomType getCustomType(String modelName, String typeName, Parameters parameters)
CustomModels
org.alfresco.rest.api.model.CustomType
representation of
the given model's typegetCustomType
in interface CustomModels
modelName
- the model nametypeName
- the model's type nameparameters
- the Parameters
object to get the parameters passed into the requestorg.alfresco.rest.api.model.CustomType
objectpublic CollectionWithPagingInfo<CustomType> getCustomTypes(String modelName, Parameters parameters)
CustomModels
getCustomTypes
in interface CustomModels
modelName
- the model nameparameters
- the Parameters
object to get the parameters passed into the requestorg.alfresco.rest.api.model.CustomType
objectspublic CustomType createCustomType(String modelName, CustomType type)
CustomModels
createCustomType
in interface CustomModels
modelName
- the model nametype
- the custom type to create within the given modelorg.alfresco.rest.api.model.CustomType
objectpublic CustomType updateCustomType(String modelName, CustomType type, Parameters parameters)
CustomModels
updateCustomType
in interface CustomModels
modelName
- the model nametype
- the custom model's type to update (JSON payload)parameters
- the Parameters
object to get the parameters passed into the requestorg.alfresco.rest.api.model.CustomType
objectpublic void deleteCustomType(String modelName, String typeName)
CustomModels
deleteCustomType
in interface CustomModels
modelName
- the model nametypeName
- the model's type namepublic CustomAspect getCustomAspect(String modelName, String aspectName, Parameters parameters)
CustomModels
org.alfresco.rest.api.model.CustomAspect
representation of
the given model's aspectgetCustomAspect
in interface CustomModels
modelName
- the model nameaspectName
- the model's aspect nameparameters
- the Parameters
object to get the parameters passed into the requestorg.alfresco.rest.api.model.CustomAspect
objectpublic CollectionWithPagingInfo<CustomAspect> getCustomAspects(String modelName, Parameters parameters)
CustomModels
getCustomAspects
in interface CustomModels
modelName
- the model nameparameters
- the Parameters
object to get the parameters passed into the requestorg.alfresco.rest.api.model.CustomAspect
objectspublic CustomAspect createCustomAspect(String modelName, CustomAspect aspect)
CustomModels
createCustomAspect
in interface CustomModels
modelName
- the model nameaspect
- the custom aspect to create within the given modelorg.alfresco.rest.api.model.CustomAspect
objectpublic CustomAspect updateCustomAspect(String modelName, CustomAspect aspect, Parameters parameters)
CustomModels
updateCustomAspect
in interface CustomModels
modelName
- the model nameaspect
- the custom model's aspect to update (JSON payload)parameters
- the Parameters
object to get the parameters passed into the requestorg.alfresco.rest.api.model.CustomAspect
objectpublic void deleteCustomAspect(String modelName, String aspectName)
CustomModels
deleteCustomAspect
in interface CustomModels
modelName
- the model nameaspectName
- the model's aspect namepublic CollectionWithPagingInfo<CustomModelConstraint> getCustomModelConstraints(String modelName, Parameters parameters)
CustomModels
getCustomModelConstraints
in interface CustomModels
modelName
- the model nameparameters
- the Parameters
object to get the parameters passed into the requestorg.alfresco.rest.api.model.CustomModelConstraint
objectspublic CustomModelConstraint getCustomModelConstraint(String modelName, String constraintName, Parameters parameters)
CustomModels
org.alfresco.rest.api.model.CustomModelConstraint
representation of the given model's constraintgetCustomModelConstraint
in interface CustomModels
modelName
- the model nameconstraintName
- the model's constraint nameparameters
- the Parameters
object to get the parameters passed into the requestorg.alfresco.rest.api.model.CustomModelConstraint
objectpublic CustomModelConstraint createCustomModelConstraint(String modelName, CustomModelConstraint constraint)
CustomModels
createCustomModelConstraint
in interface CustomModels
modelName
- the model nameconstraint
- the custom constraint to create within the given modelorg.alfresco.rest.api.model.CustomModelConstraint
objectpublic CustomModelDownload createDownload(String modelName, Parameters parameters)
CustomModels
createDownload
in interface CustomModels
modelName
- the model nameparameters
- the Parameters
object to get the parameters
passed into the requestorg.alfresco.rest.api.model.CustomModelDownload
object
containing the archive node referenceprotected String getCurrentUserFullName()
protected org.alfresco.util.Pair<String,String> resolveToUriAndPrefix(String parentName)
parentName
- the parent namepublic CustomModel createCustomModel(org.alfresco.repo.dictionary.M2Model m2Model)
CustomModels
M2Model
.createCustomModel
in interface CustomModels
m2Model
- the modelorg.alfresco.rest.api.model.CustomModel
objectCopyright © 2005–2017 Alfresco Software. All rights reserved.