Package org.alfresco.repo.dictionary
Class CustomModelDefinitionImpl
- java.lang.Object
-
- org.alfresco.repo.dictionary.CustomModelDefinitionImpl
-
- All Implemented Interfaces:
CustomModelDefinition,ModelDefinition
public class CustomModelDefinitionImpl extends Object implements CustomModelDefinition
Read-only definition of a Custom Model- Author:
- Jamal Kaabi-Mofrad
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.alfresco.service.cmr.dictionary.ModelDefinition
ModelDefinition.XMLBindingType
-
-
Method Summary
-
-
-
Method Detail
-
removeInlineConstraints
public static List<ConstraintDefinition> removeInlineConstraints(CompiledModel compiledModel)
Removes the inline constraints (i.e. defined within the property) from all constraints. The result will be constraints that have been defined within the model (Top level) itself.- Parameters:
compiledModel- the compiled model- Returns:
- list of model defined constraints
-
getDescription
public String getDescription()
Description copied from interface:CustomModelDefinitionReturns the model description- Specified by:
getDescriptionin interfaceCustomModelDefinition- Returns:
- the model description
-
isActive
public boolean isActive()
Description copied from interface:CustomModelDefinitionWhether the model is active or not- Specified by:
isActivein interfaceCustomModelDefinition- Returns:
- true if the model is active, false otherwise
-
getAuthor
public String getAuthor()
- Specified by:
getAuthorin interfaceModelDefinition- Returns:
- the model author
-
getChecksum
public long getChecksum(ModelDefinition.XMLBindingType xmlbindingtype)
- Specified by:
getChecksumin interfaceModelDefinition
-
getDescription
public String getDescription(MessageLookup messagelookup)
- Specified by:
getDescriptionin interfaceModelDefinition- Returns:
- the model description
-
getDictionaryDAO
public DictionaryDAO getDictionaryDAO()
- Specified by:
getDictionaryDAOin interfaceModelDefinition- Returns:
- DictionaryDAO
-
getImportedNamespaces
public Collection<NamespaceDefinition> getImportedNamespaces()
- Specified by:
getImportedNamespacesin interfaceModelDefinition- Returns:
- the namespaces imported by this model
-
getName
public QName getName()
- Specified by:
getNamein interfaceModelDefinition- Returns:
- the model name
-
getNamespaces
public Collection<NamespaceDefinition> getNamespaces()
- Specified by:
getNamespacesin interfaceModelDefinition- Returns:
- the namespaces defined by this model
-
getPublishedDate
public Date getPublishedDate()
- Specified by:
getPublishedDatein interfaceModelDefinition- Returns:
- the date when the model was published
-
getVersion
public String getVersion()
- Specified by:
getVersionin interfaceModelDefinition- Returns:
- the model version
-
isNamespaceDefined
public boolean isNamespaceDefined(String uri)
- Specified by:
isNamespaceDefinedin interfaceModelDefinition- Parameters:
uri- namespace uri- Returns:
- true => model defines the uri
-
isNamespaceImported
public boolean isNamespaceImported(String uri)
- Specified by:
isNamespaceImportedin interfaceModelDefinition- Parameters:
uri- namespace uri- Returns:
- true => model imports the uri
-
toXML
public void toXML(ModelDefinition.XMLBindingType xmlbindingtype, OutputStream xml)
- Specified by:
toXMLin interfaceModelDefinition
-
getTypeDefinitions
public Collection<TypeDefinition> getTypeDefinitions()
Description copied from interface:CustomModelDefinitionReturns aCollectionof the modelTypeDefinitions- Specified by:
getTypeDefinitionsin interfaceCustomModelDefinition- Returns:
- an unmodifiable collection of the model types definitions, or an empty collection
-
getAspectDefinitions
public Collection<AspectDefinition> getAspectDefinitions()
Description copied from interface:CustomModelDefinitionReturns aCollectionof the modelAspectDefinitions- Specified by:
getAspectDefinitionsin interfaceCustomModelDefinition- Returns:
- an unmodifiable collection of the model aspects definitions, or an empty collection
-
getModelDefinedConstraints
public Collection<ConstraintDefinition> getModelDefinedConstraints()
Description copied from interface:CustomModelDefinitionReturns aCollectionof the model definedConstraintDefinitions- Specified by:
getModelDefinedConstraintsin interfaceCustomModelDefinition- Returns:
- an unmodifiable collection of the model constraint definitions, or an empty collection
-
-