Fixed content model to avoid confusion, remove property named property etc

This commit is contained in:
Martin Bergljung 2016-08-22 07:42:45 +01:00
parent 8968f8227b
commit a49c657441
4 changed files with 112 additions and 48 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<model name="myc:contentModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<model name="acme:contentModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!-- Optional meta-data about the model -->
<description>Document Model for Repo Extension X</description>
<description>Sample Document Model</description>
<author>My Name</author>
<version>1.0</version>
@ -15,40 +15,72 @@
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>
</imports>
<!-- Custom namespace for your domain -->
<!-- Custom namespace for the ACME company -->
<namespaces>
<namespace uri="http://www.mycompany.com/model/content/1.0" prefix="myc"/>
<namespace uri="http://www.acme.org/model/content/1.0" prefix="acme"/>
</namespaces>
<constraints>
<constraint name="acme:securityClassificationOptions" type="LIST">
<parameter name="allowedValues">
<list>
<value></value>
<!-- Empty for default search-->
<value>Public</value>
<value>Client Confidential</value>
<value>Company Confidential</value>
<value>Strictly Confidential</value>
</list>
</parameter>
</constraint>
</constraints>
<!-- ===============================================================================================================
Constraints, Types, and Aspects go here...
-->
<types>
<type name="myc:doc">
<!--
ACME Enterprise-wide Document root type.
All other custom document types would extend this one.
-->
<type name="acme:document">
<title>Sample Document Type</title>
<parent>cm:content</parent>
<properties>
<property name="myc:property">
<title>Sample Property</title>
<property name="acme:documentId">
<title>Document Identification Number</title>
<type>d:text</type>
</property>
</properties>
<associations>
<association name="myc:association">
<title>Sample Association</title>
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>myc:doc</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
<mandatory-aspects>
<aspect>acme:securityClassified</aspect>
</mandatory-aspects>
</type>
</types>
<aspects>
<!-- A document can have security classification applied and
faceted search is specifically enabled for best performance and we change
default index config to not tokenize the value. -->
<aspect name="acme:securityClassified">
<title>ACME Security Classified</title>
<description>Content has been security classified</description>
<properties>
<property name="acme:securityClassification">
<type>d:text</type>
<index enabled="true">
<atomic>true</atomic>
<stored>false</stored>
<tokenised>false</tokenised>
<facetable>true</facetable>
</index>
<constraints>
<constraint ref="acme:securityClassificationOptions"/>
</constraints>
</property>
</properties>
</aspect>
</aspects>
</model>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<model name="myw:workflowModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<model name="acmew:workflowModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!-- Optional meta-data about the model -->
<description>Workflow Model for Repo Extension X</description>
<description>Sample Workflow Model</description>
<author>My Name</author>
<version>1.0</version>
@ -16,7 +16,7 @@
<!-- Custom namespace for your domain -->
<namespaces>
<namespace uri="http://www.mycompany.com/model/workflow/1.0" prefix="myw"/>
<namespace uri="http://www.acme.org/model/workflow/1.0" prefix="acmew"/>
</namespaces>
<!-- ===============================================================================================================

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<model name="myc:contentModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<model name="acme:contentModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!-- Optional meta-data about the model -->
<description>Document Model for Repo Extension X</description>
<description>Sample Document Model</description>
<author>My Name</author>
<version>1.0</version>
@ -15,40 +15,72 @@
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>
</imports>
<!-- Custom namespace for your domain -->
<!-- Custom namespace for the ACME company -->
<namespaces>
<namespace uri="http://www.mycompany.com/model/content/1.0" prefix="myc"/>
<namespace uri="http://www.acme.org/model/content/1.0" prefix="acme"/>
</namespaces>
<constraints>
<constraint name="acme:securityClassificationOptions" type="LIST">
<parameter name="allowedValues">
<list>
<value></value>
<!-- Empty for default search-->
<value>Public</value>
<value>Client Confidential</value>
<value>Company Confidential</value>
<value>Strictly Confidential</value>
</list>
</parameter>
</constraint>
</constraints>
<!-- ===============================================================================================================
Constraints, Types, and Aspects go here...
-->
<types>
<type name="myc:doc">
<!--
ACME Enterprise-wide Document root type.
All other custom document types would extend this one.
-->
<type name="acme:document">
<title>Sample Document Type</title>
<parent>cm:content</parent>
<properties>
<property name="myc:property">
<title>Sample Property</title>
<property name="acme:documentId">
<title>Document Identification Number</title>
<type>d:text</type>
</property>
</properties>
<associations>
<association name="myc:association">
<title>Sample Association</title>
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>myc:doc</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
<mandatory-aspects>
<aspect>acme:securityClassified</aspect>
</mandatory-aspects>
</type>
</types>
<aspects>
<!-- A document can have security classification applied and
faceted search is specifically enabled for best performance and we change
default index config to not tokenize the value. -->
<aspect name="acme:securityClassified">
<title>ACME Security Classified</title>
<description>Content has been security classified</description>
<properties>
<property name="acme:securityClassification">
<type>d:text</type>
<index enabled="true">
<atomic>true</atomic>
<stored>false</stored>
<tokenised>false</tokenised>
<facetable>true</facetable>
</index>
<constraints>
<constraint ref="acme:securityClassificationOptions"/>
</constraints>
</property>
</properties>
</aspect>
</aspects>
</model>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<model name="myw:workflowModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<model name="acmew:workflowModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!-- Optional meta-data about the model -->
<description>Workflow Model for Repo Extension X</description>
<description>Sample Workflow Model</description>
<author>My Name</author>
<version>1.0</version>
@ -16,7 +16,7 @@
<!-- Custom namespace for your domain -->
<namespaces>
<namespace uri="http://www.mycompany.com/model/workflow/1.0" prefix="myw"/>
<namespace uri="http://www.acme.org/model/workflow/1.0" prefix="acmew"/>
</namespaces>
<!-- ===============================================================================================================