private boolean isMandatory(ClassAttributeDefinition definition) { if(definition instanceof PropertyDefinition) { PropertyDefinition propDef = (PropertyDefinition) definition; return propDef.isMandatory(); } AssociationDefinition assocDSef = (AssociationDefinition) definition; return assocDSef.isTargetMandatory(); }
public static DataTypeDefinition getDataTypeDefinition(DictionaryService dictionaryService, QName propertyQname) { if(propertyQname == null) { return null; } PropertyDefinition propDef = dictionaryService.getProperty(propertyQname); if(propDef == null) { return null; } return propDef.getDataType(); }
@Override public boolean isDefinitionExists(QName qName) { return (null != dictionaryService.getAspect(qName)); } });
private boolean isTextProperty(PropertyDefinition propDef) { return propDef.getDataType().getName().equals(DataTypeDefinition.TEXT) || propDef.getDataType().getName().equals(DataTypeDefinition.MLTEXT); }
/** * @param className the class name * @return the super class or <code>null</code> */ private QName generaliseClass(QName className) { ClassDefinition classDefinition = dictionaryService.getClass(className); if (classDefinition == null) { // The class definition doesn't exist return null; } QName parentClassName = classDefinition.getParentName(); return parentClassName; }
/** * @return true if this Node is a container (i.e. a folder) */ private boolean getIsContainer(QName type) { boolean isContainer = dictionaryService.isSubClass(type, ContentModel.TYPE_FOLDER) && !dictionaryService.isSubClass(type, ContentModel.TYPE_SYSTEM_FOLDER); return isContainer; }
/** * Gets the association definition from the dictionary. If the source node type is * provided then the association particular to the subtype is attempted. * * @param eventResults results to add a violation message to * @param assocTypeQName the type of the association * @return Returns the association definition, or null if not found */ protected AssociationDefinition getAssocDef(List<IntegrityRecord> eventResults, QName assocTypeQName) { return dictionaryService.getAssociation(assocTypeQName); }
@Override public boolean isDefinitionExists(QName qName) { return (null != dictionaryService.getType(qName)); } });
protected AlfrescoModel(ModelDefinition modelDef) { this.modelDef = modelDef; this.checksum = modelDef.getChecksum(ModelDefinition.XMLBindingType.DEFAULT); }
public QName getFullName() { if (classDefinition == null) { return null; } return classDefinition.getName(); }
public Void execute() throws Exception { customModelService.deactivateCustomModel(am); return null; } });
public Void execute() throws Exception { customModelService.deleteCustomModel(am); return null; } });
public PagingResults<TypeDefinition> execute() throws Exception { return customModelService.getAllCustomTypes(pagingRequest); } });
public CustomModelDefinition execute() throws Exception { return customModelService.updateCustomModel(modelName, m2Model, activate); } });
public static DataTypeDefinition getDataTypeDefinition(DictionaryService dictionaryService, QName propertyQname) { if(propertyQname == null) { return null; } PropertyDefinition propDef = dictionaryService.getProperty(propertyQname); if(propDef == null) { return null; } return propDef.getDataType(); }
private boolean isMandatory(ClassAttributeDefinition definition) { if(definition instanceof PropertyDefinition) { PropertyDefinition propDef = (PropertyDefinition) definition; return propDef.isMandatory(); } AssociationDefinition assocDSef = (AssociationDefinition) definition; return assocDSef.isTargetMandatory(); }
/** * @return true if this Node is a container (i.e. a folder) */ private boolean getIsContainer(QName type) { boolean isContainer = dictionaryService.isSubClass(type, ContentModel.TYPE_FOLDER) && !dictionaryService.isSubClass(type, ContentModel.TYPE_SYSTEM_FOLDER); return isContainer; }
@Override public boolean isDefinitionExists(QName qName) { return (null != dictionaryService.getAspect(qName)); } });
protected AlfrescoModel(ModelDefinition modelDef) { this.modelDef = modelDef; this.checksum = modelDef.getChecksum(ModelDefinition.XMLBindingType.DEFAULT); }
/** * @return true if this Node is a Document (i.e. with content) */ private boolean getIsDocument(QName type) { boolean isDocument = dictionaryService.isSubClass(type, ContentModel.TYPE_CONTENT); return isDocument; }