mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (4.3/Cloud)
74253: Merged V4.2-BUG-FIX (4.2.3) to HEAD-BUG-FIX (5.0/Cloud) 74025: Merged DEV to V4.2-BUG-FIX (4.2.3) 74013: MNT-11653 : Content Model <override> doesnt allow overriding "enforcement" Changed the mandatory type validation. Added model validation against xsd in the test. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@74886 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,15 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||||
targetNamespace="http://www.alfresco.org/model/dictionary/1.0"
|
targetNamespace="http://www.alfresco.org/model/dictionary/1.0"
|
||||||
xmlns:dd="http://www.alfresco.org/model/dictionary/1.0"
|
xmlns:dd="http://www.alfresco.org/model/dictionary/1.0"
|
||||||
elementFormDefault="qualified" version="0.1">
|
elementFormDefault="qualified" version="0.1">
|
||||||
|
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Alfresco Data Dictionary Schema for Alfresco M2Model
|
<xs:documentation>Alfresco Data Dictionary Schema for Alfresco M2Model
|
||||||
</xs:documentation>
|
</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
|
|
||||||
<xs:element name="model">
|
<xs:element name="model">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
@@ -65,15 +65,15 @@
|
|||||||
</xs:element>
|
</xs:element>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:element name="constraints" maxOccurs="1"
|
<xs:element name="constraints" maxOccurs="1"
|
||||||
minOccurs="0">
|
minOccurs="0">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="constraint" type="dd:constraint"
|
<xs:element name="constraint" type="dd:constraint"
|
||||||
maxOccurs="unbounded" minOccurs="1" />
|
maxOccurs="unbounded" minOccurs="1" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:element name="types" maxOccurs="1" minOccurs="0">
|
<xs:element name="types" maxOccurs="1" minOccurs="0">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
maxOccurs="unbounded" minOccurs="1" />
|
maxOccurs="unbounded" minOccurs="1" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attributeGroup ref="dd:name" />
|
<xs:attributeGroup ref="dd:name" />
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
@@ -101,10 +101,10 @@
|
|||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:group ref="dd:TextualDescription"></xs:group>
|
<xs:group ref="dd:TextualDescription"></xs:group>
|
||||||
<xs:element name="parent" type="xs:string"
|
<xs:element name="parent" type="xs:string"
|
||||||
maxOccurs="1" minOccurs="0" />
|
|
||||||
<xs:element name="archive" type="xs:boolean"
|
|
||||||
maxOccurs="1" minOccurs="0" />
|
maxOccurs="1" minOccurs="0" />
|
||||||
<xs:element name="includedInSuperTypeQuery" type="xs:boolean"
|
<xs:element name="archive" type="xs:boolean"
|
||||||
|
maxOccurs="1" minOccurs="0" />
|
||||||
|
<xs:element name="includedInSuperTypeQuery" type="xs:boolean"
|
||||||
maxOccurs="1" minOccurs="0" />
|
maxOccurs="1" minOccurs="0" />
|
||||||
<xs:element name="properties" maxOccurs="1"
|
<xs:element name="properties" maxOccurs="1"
|
||||||
minOccurs="0">
|
minOccurs="0">
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
maxOccurs="unbounded" minOccurs="0" />
|
maxOccurs="unbounded" minOccurs="0" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|
||||||
<xs:element name="overrides" maxOccurs="1"
|
<xs:element name="overrides" maxOccurs="1"
|
||||||
minOccurs="0">
|
minOccurs="0">
|
||||||
@@ -136,17 +136,17 @@
|
|||||||
minOccurs="1" />
|
minOccurs="1" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|
||||||
<xs:element name="mandatory-aspects" maxOccurs="1"
|
<xs:element name="mandatory-aspects" maxOccurs="1"
|
||||||
minOccurs="0">
|
minOccurs="0">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="aspect" type="xs:string"
|
<xs:element name="aspect" type="xs:string"
|
||||||
maxOccurs="unbounded" minOccurs="1" />
|
maxOccurs="unbounded" minOccurs="1" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attributeGroup ref="dd:name" />
|
<xs:attributeGroup ref="dd:name" />
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
@@ -154,11 +154,11 @@
|
|||||||
<xs:complexType name="property">
|
<xs:complexType name="property">
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:group ref="dd:TextualDescription" />
|
<xs:group ref="dd:TextualDescription" />
|
||||||
<xs:element name="type" type="xs:string"/>
|
<xs:element name="type" type="xs:string"/>
|
||||||
<xs:element name="protected" type="xs:boolean"
|
<xs:element name="protected" type="xs:boolean"
|
||||||
maxOccurs="1" minOccurs="0" />
|
maxOccurs="1" minOccurs="0" />
|
||||||
<xs:element name="mandatory"
|
<xs:element name="mandatory"
|
||||||
maxOccurs="1" minOccurs="0" type="dd:mandatoryDef" >
|
maxOccurs="1" minOccurs="0" type="dd:mandatoryDef" >
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:element name="multiple" type="xs:boolean"
|
<xs:element name="multiple" type="xs:boolean"
|
||||||
maxOccurs="1" minOccurs="0" />
|
maxOccurs="1" minOccurs="0" />
|
||||||
@@ -172,32 +172,32 @@
|
|||||||
<xs:element name="stored" type="xs:boolean"
|
<xs:element name="stored" type="xs:boolean"
|
||||||
maxOccurs="1" minOccurs="0" />
|
maxOccurs="1" minOccurs="0" />
|
||||||
<xs:element name="tokenised"
|
<xs:element name="tokenised"
|
||||||
maxOccurs="1" minOccurs="0" >
|
maxOccurs="1" minOccurs="0" >
|
||||||
<xs:simpleType>
|
<xs:simpleType>
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:string">
|
||||||
<xs:enumeration value="true"/>
|
<xs:enumeration value="true"/>
|
||||||
<xs:enumeration value="false"/>
|
<xs:enumeration value="false"/>
|
||||||
<xs:enumeration value="both"/>
|
<xs:enumeration value="both"/>
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attribute name="enabled" type="xs:boolean"
|
<xs:attribute name="enabled" type="xs:boolean"
|
||||||
use="required" />
|
use="required" />
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
|
||||||
|
|
||||||
<xs:element name="constraints" maxOccurs="1"
|
|
||||||
minOccurs="0">
|
|
||||||
<xs:complexType>
|
|
||||||
<xs:sequence>
|
|
||||||
<xs:element name="constraint" type="dd:constraint"
|
|
||||||
maxOccurs="unbounded" minOccurs="1" />
|
|
||||||
</xs:sequence>
|
|
||||||
</xs:complexType>
|
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
|
||||||
<xs:element name="encrypted" maxOccurs="1" minOccurs="0" type="xs:boolean">
|
<xs:element name="constraints" maxOccurs="1"
|
||||||
|
minOccurs="0">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="constraint" type="dd:constraint"
|
||||||
|
maxOccurs="unbounded" minOccurs="1" />
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
|
||||||
|
<xs:element name="encrypted" maxOccurs="1" minOccurs="0" type="xs:boolean">
|
||||||
</xs:element>
|
</xs:element>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attributeGroup ref="dd:name" />
|
<xs:attributeGroup ref="dd:name" />
|
||||||
@@ -207,78 +207,84 @@
|
|||||||
<xs:complexContent>
|
<xs:complexContent>
|
||||||
<xs:extension base="dd:class">
|
<xs:extension base="dd:class">
|
||||||
</xs:extension>
|
</xs:extension>
|
||||||
</xs:complexContent>
|
</xs:complexContent>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<xs:complexType name="aspect">
|
<xs:complexType name="aspect">
|
||||||
<xs:complexContent>
|
<xs:complexContent>
|
||||||
<xs:extension base="dd:class"></xs:extension>
|
<xs:extension base="dd:class"></xs:extension>
|
||||||
</xs:complexContent>
|
</xs:complexContent>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
|
||||||
<xs:complexType name="constraint">
|
<xs:complexType name="constraint">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Constraint for Alfresco M2Model
|
<xs:documentation>Constraint for Alfresco M2Model
|
||||||
</xs:documentation>
|
</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="parameter" maxOccurs="unbounded" type="dd:namedValue"
|
<xs:element name="parameter" maxOccurs="unbounded" type="dd:namedValue"
|
||||||
minOccurs="0">
|
minOccurs="0">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:documentation>Parameter for Alfresco M2Model
|
<xs:documentation>Parameter for Alfresco M2Model
|
||||||
</xs:documentation>
|
</xs:documentation>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attribute name="type" use="optional">
|
<xs:attribute name="type" use="optional">
|
||||||
<xs:simpleType>
|
<xs:simpleType>
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:string">
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
</xs:attribute>
|
</xs:attribute>
|
||||||
|
|
||||||
<xs:attribute name="ref" use="optional" type="xs:string" />
|
<xs:attribute name="ref" use="optional" type="xs:string" />
|
||||||
<xs:attribute name="name" use="optional" type="xs:string" />
|
<xs:attribute name="name" use="optional" type="xs:string" />
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
|
||||||
<xs:complexType name="namedValue">
|
<xs:complexType name="namedValue">
|
||||||
<xs:choice>
|
<xs:choice>
|
||||||
<xs:element name="value" type="xs:string" maxOccurs="1"
|
<xs:element name="value" type="xs:string" maxOccurs="1"
|
||||||
minOccurs="0" />
|
minOccurs="0" />
|
||||||
<xs:element name="list" maxOccurs="1" minOccurs="0">
|
<xs:element name="list" maxOccurs="1" minOccurs="0">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="value" type="xs:string"
|
<xs:element name="value" type="xs:string"
|
||||||
maxOccurs="unbounded" minOccurs="0" />
|
maxOccurs="unbounded" minOccurs="0" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
</xs:choice>
|
</xs:choice>
|
||||||
<xs:attributeGroup ref="dd:name" />
|
<xs:attributeGroup ref="dd:name" />
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
|
||||||
<xs:complexType name="association">
|
<xs:complexType name="association">
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:group ref="dd:TextualDescription"></xs:group>
|
<xs:group ref="dd:TextualDescription"></xs:group>
|
||||||
<xs:element name="source" maxOccurs="1" minOccurs="0">
|
<xs:element name="source" maxOccurs="1" minOccurs="0">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="role" type="xs:string" maxOccurs="1"
|
<xs:element name="role" type="xs:string" maxOccurs="1"
|
||||||
minOccurs="0" />
|
minOccurs="0" />
|
||||||
<xs:element name="mandatory" type="xs:boolean"
|
<xs:element name="mandatory" type="xs:boolean"
|
||||||
maxOccurs="1" minOccurs="0" />
|
maxOccurs="1" minOccurs="0" />
|
||||||
<xs:element name="many" type="xs:boolean"
|
<xs:element name="many" type="xs:boolean"
|
||||||
|
maxOccurs="1" minOccurs="0" />
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
</xs:sequence>
|
<xs:element name="target">
|
||||||
</xs:complexType>
|
<xs:complexType>
|
||||||
</xs:element>
|
<xs:sequence>
|
||||||
<xs:element name="target">
|
<xs:element name="class" type="xs:string" maxOccurs="1" minOccurs="1" />
|
||||||
<xs:complexType>
|
<xs:element name="role" type="xs:string" maxOccurs="1" minOccurs="0" />
|
||||||
<xs:sequence>
|
<xs:element name="mandatory" type="dd:mandatoryDef"
|
||||||
<xs:element name="class" type="xs:string" maxOccurs="1" minOccurs="1" />
|
maxOccurs="1" minOccurs="0" />
|
||||||
<xs:element name="role" type="xs:string" maxOccurs="1" minOccurs="0" />
|
<xs:element name="many" type="xs:boolean"
|
||||||
|
maxOccurs="1" minOccurs="0" />
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attributeGroup ref="dd:name" />
|
<xs:attributeGroup ref="dd:name" />
|
||||||
@@ -291,8 +297,8 @@
|
|||||||
<xs:element name="child-name" type="xs:string"
|
<xs:element name="child-name" type="xs:string"
|
||||||
maxOccurs="1" minOccurs="0" />
|
maxOccurs="1" minOccurs="0" />
|
||||||
<xs:element name="duplicate" type="xs:boolean"
|
<xs:element name="duplicate" type="xs:boolean"
|
||||||
<xs:complexContent>
|
maxOccurs="1" minOccurs="0" />
|
||||||
<xs:extension base="dd:association">
|
<xs:element name="propagateTimestamps" type="xs:boolean"
|
||||||
maxOccurs="1" minOccurs="0" />
|
maxOccurs="1" minOccurs="0" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:extension>
|
</xs:extension>
|
||||||
@@ -301,18 +307,18 @@
|
|||||||
|
|
||||||
<xs:complexType name="propertyOverride">
|
<xs:complexType name="propertyOverride">
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
</xs:extension>
|
<xs:element name="mandatory" type="dd:mandatoryDef"
|
||||||
maxOccurs="1" minOccurs="0" />
|
maxOccurs="1" minOccurs="0" />
|
||||||
<xs:element name="default" type="xs:string"
|
<xs:element name="default" type="xs:string"
|
||||||
|
maxOccurs="1" minOccurs="0" />
|
||||||
<xs:complexType name="propertyOverride">
|
<xs:element name="constraints" maxOccurs="1"
|
||||||
<xs:sequence>
|
minOccurs="0">
|
||||||
<xs:element name="mandatory" type="xs:boolean"
|
<xs:complexType>
|
||||||
maxOccurs="1" minOccurs="0" />
|
<xs:sequence>
|
||||||
<xs:element name="default" type="xs:string"
|
<xs:element name="constraint" type="dd:constraint"
|
||||||
maxOccurs="1" minOccurs="0" />
|
maxOccurs="unbounded" minOccurs="1" />
|
||||||
<xs:element name="constraints" maxOccurs="1"
|
</xs:sequence>
|
||||||
minOccurs="0">
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attributeGroup ref="dd:name" />
|
<xs:attributeGroup ref="dd:name" />
|
||||||
@@ -334,10 +340,10 @@
|
|||||||
<xs:element name="description" type="xs:string"
|
<xs:element name="description" type="xs:string"
|
||||||
maxOccurs="1" minOccurs="0" />
|
maxOccurs="1" minOccurs="0" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:sequence>
|
</xs:group>
|
||||||
<xs:element name="title" type="xs:string" maxOccurs="1"
|
|
||||||
minOccurs="0" />
|
<xs:complexType name="mandatoryDef" mixed="true">
|
||||||
<xs:element name="description" type="xs:string"
|
<xs:attribute name="enforced" use="optional" type="xs:boolean"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
|
||||||
</xs:schema>
|
</xs:schema>
|
||||||
|
@@ -25,6 +25,13 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.xml.XMLConstants;
|
||||||
|
import javax.xml.transform.Source;
|
||||||
|
import javax.xml.transform.stream.StreamSource;
|
||||||
|
import javax.xml.validation.Schema;
|
||||||
|
import javax.xml.validation.SchemaFactory;
|
||||||
|
import javax.xml.validation.Validator;
|
||||||
|
|
||||||
import org.alfresco.error.AlfrescoRuntimeException;
|
import org.alfresco.error.AlfrescoRuntimeException;
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.repo.content.MimetypeMap;
|
import org.alfresco.repo.content.MimetypeMap;
|
||||||
@@ -36,6 +43,7 @@ import org.alfresco.service.cmr.dictionary.ConstraintDefinition;
|
|||||||
import org.alfresco.service.cmr.dictionary.DictionaryException;
|
import org.alfresco.service.cmr.dictionary.DictionaryException;
|
||||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||||
import org.alfresco.service.cmr.dictionary.ModelDefinition;
|
import org.alfresco.service.cmr.dictionary.ModelDefinition;
|
||||||
|
import org.alfresco.service.cmr.repository.ContentReader;
|
||||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
import org.alfresco.service.cmr.repository.NodeService;
|
import org.alfresco.service.cmr.repository.NodeService;
|
||||||
@@ -46,6 +54,7 @@ import org.alfresco.test_category.OwnJVMTestsCategory;
|
|||||||
import org.alfresco.util.BaseAlfrescoSpringTest;
|
import org.alfresco.util.BaseAlfrescoSpringTest;
|
||||||
import org.alfresco.util.PropertyMap;
|
import org.alfresco.util.PropertyMap;
|
||||||
import org.junit.experimental.categories.Category;
|
import org.junit.experimental.categories.Category;
|
||||||
|
import org.springframework.util.ResourceUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dictionary model type unit test
|
* Dictionary model type unit test
|
||||||
@@ -975,6 +984,22 @@ public class DictionaryModelTypeTest extends BaseAlfrescoSpringTest
|
|||||||
setComplete();
|
setComplete();
|
||||||
endTransaction();
|
endTransaction();
|
||||||
|
|
||||||
|
transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionCallback<Object>()
|
||||||
|
{
|
||||||
|
public Object execute() throws Exception
|
||||||
|
{
|
||||||
|
// Validate the model
|
||||||
|
ContentReader reader = DictionaryModelTypeTest.this.contentService.getReader(modelNode, ContentModel.PROP_CONTENT);
|
||||||
|
Source transferReportSource = new StreamSource(reader.getContentInputStream());
|
||||||
|
SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
|
||||||
|
final String schemaLocation = "classpath:alfresco/model/modelSchema.xsd";
|
||||||
|
Schema schema = sf.newSchema(ResourceUtils.getURL(schemaLocation));
|
||||||
|
Validator validator = schema.newValidator();
|
||||||
|
validator.validate(transferReportSource);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// create node using new type
|
// create node using new type
|
||||||
final NodeRef node1 = transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionCallback<NodeRef>()
|
final NodeRef node1 = transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionCallback<NodeRef>()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user