09-20-2015 11:46 PM
<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="sc:somecomodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional meta-data about the model –>
<description>Someco Model</description>
<author>Jeff Potts</author>
<version>1.0</version>
<!– Imports are required to allow references to definitions in other models –>
<imports>
<!– Import Alfresco Dictionary Definitions –>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
<!– Import Alfresco Content Domain Model Definitions –>
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
</imports>
<!– Introduction of new namespaces defined by this model –>
<namespaces>
<namespace uri="http://www.someco.com/model/content/1.0" prefix="sc" />
</namespaces>
<constraints>
<constraint name="sc:campaignList" type="LIST">
<parameter name="allowedValues">
<list>
<value>Application Syndication</value>
<value>Private Event Retailing</value>
<value>Social Shopping</value>
</list>
</parameter>
</constraint>
</constraints>
<types>
<!– Enterprise-wide generic document type –>
<type name="sc:doc">
<title>Someco Document</title>
<parent>cm:content</parent>
<associations>
<association name="sc:relatedDocuments">
<title>Related Documents</title>
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>sc:doc</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
<mandatory-aspects>
<aspect>cm:generalclassifiable</aspect>
</mandatory-aspects>
</type>
<type name="sc:whitepaper">
<title>Someco Whitepaper</title>
<parent>sc:doc</parent>
</type>
<type name="sc:marketingDoc">
<title>Someco Marketing Document</title>
<parent>sc:doc</parent>
<properties>
<property name="sc:campaign">
<type>d:text</type>
<multiple>true</multiple>
<constraints>
<constraint ref="sc:campaignList" />
</constraints>
</property>
</properties>
</type>
</types>
<aspects>
<aspect name="sc:webable">
<title>Someco Webable</title>
<properties>
<property name="sc:published">
<type>d:date</type>
</property>
<property name="sc:isActive">
<type>d:boolean</type>
<default>false</default>
</property>
</properties>
</aspect>
<aspect name="sc:productRelated">
<title>Someco Product Metadata</title>
<properties>
<property name="sc:product">
<type>d:text</type>
<mandatory>true</mandatory>
<multiple>true</multiple>
</property>
<property name="sc:version">
<type>d:text</type>
<mandatory>true</mandatory>
<multiple>true</multiple>
</property>
</properties>
</aspect>
</aspects>
</model>
<beans>
<!– A simple class that is initialized by Spring –>
<bean id="changeme.exampleBean" class="org.alfresco.demoamp.Demo" init-method="init" />
<!– A simple module component that will be executed once –>
<bean id="changeme.exampleComponent" class="org.alfresco.demoamp.DemoComponent" parent="module.baseComponent" >
<property name="moduleId" value="${project.artifactId}" /> <!– See module.properties –>
<property name="name" value="exampleComponent" />
<property name="description" value="A demonstration component" />
<property name="sinceVersion" value="2.0" />
<property name="appliesFromVersion" value="2.0" />
<property name="nodeService" ref="NodeService" />
<property name="nodeLocatorService" ref="nodeLocatorService" />
</bean>
<!– Registration of new models –>
<bean id="${project.artifactId}_dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/module/${project.artifactId}/model/scModel.xml</value>
</list>
</property>
</bean>
</beans>
<alfresco-config>
<!– Document Library config section –>
<config evaluator="string-compare" condition="DocumentLibrary">
<aspects>
<!– Aspects that a user can see –>
<visible>
<aspect name="sc:webable" />
<aspect name="sc:productRelated" />
</visible>
<!– Aspects that a user can add. Same as "visible" if left empty –>
<addable>
</addable>
<!– Aspects that a user can remove. Same as "visible" if left empty –>
<removeable>
</removeable>
</aspects>
<types>
<type name="cm:content">
<subtype name="sc:doc" />
<subtype name="sc:whitepaper" />
</type>
<type name="sc:doc">
<subtype name="sc:whitepaper" />
</type>
</types>
</config>
<config evaluator="aspect" condition="sc:webable">
<forms>
<form>
<field-visibility>
<show id="sc:published" />
<show id="sc:isActive" />
<!– surf:widget aspect –>
<show id="surf:widgetType"/>
<show id="surf:mid"/>
<show id="surf:label"/>
<!– sc:doc –>
<show id="sc:relatedDocuments" />
</field-visibility>
<appearance>
<field id="sc:published" label-id="prop.sc_published" />
<field id="sc:isActive" label-id="prop.sc_isActive" />
<field id="cm:addressees" read-only="true" />
<field id="cm:sentdate" read-only="true" />
<field id="cm:subjectline" read-only="true" />
<field id="sc:relatedDocuments" label-id="assoc.sc_relatedDocuments" />
</appearance>
</form>
</forms>
</config>
<config evaluator="aspect" condition="sc:productRelated">
<forms>
<form>
<field-visibility>
<show id="sc:product" />
<show id="sc:version" />
<!– surf:widget aspect –>
<show id="surf:widgetType"/>
<show id="surf:mid"/>
<show id="surf:label"/>
<!– sc:doc –>
<show id="sc:relatedDocuments" />
</field-visibility>
<appearance>
<field id="sc:product" label-id="prop.sc_product" />
<field id="sc:version" label-id="prop.sc_version" />
<field id="cm:addressees" read-only="true" />
<field id="cm:sentdate" read-only="true" />
<field id="cm:subjectline" read-only="true" />
<field id="sc:relatedDocuments" label-id="assoc.sc_relatedDocuments" />
</appearance>
</form>
</forms>
</config>
<config replace="true" evaluator="string-compare" condition="AdvancedSearch">
<advanced-search>
<!– Forms for the advanced search type list –>
<forms>
<form labelId="search.form.label.cm_content" descriptionId="search.form.desc.cm_content">cm:content</form>
<form labelId="search.form.label.cm_folder" descriptionId="search.form.desc.cm_folder">cm:folder</form>
<form labelId="type.sc_whitepaper" descriptionId="search.form.desc.sc_whitepaper">sc:whitepaper</form>
</forms>
</advanced-search>
</config>
<!– sc:whitepaper type (new nodes) –>
<config evaluator="model-type" condition="sc:whitepaper">
<forms>
<!– Search form –>
<form id="search">
<field-visibility>
<show id="cm:name" />
<show id="cm:title" force="true" />
<show id="cm:description" force="true" />
<show id="mimetype" />
<show id="cm:modified" />
<show id="cm:modifier" />
<!– sc:productRelated –>
<show id="sc:product" />
<show id="sc:version" />
<!– sc:webable –>
<show id="sc:isActive" />
<show id="sc:published" />
</field-visibility>
<appearance>
<field id="mimetype">
<control template="/org/alfresco/components/form/controls/mimetype.ftl" />
</field>
<field id="cm:modifier">
<control>
<control-param name="forceEditable">true</control-param>
</control>
</field>
<field id="cm:modified">
<control template="/org/alfresco/components/form/controls/daterange.ftl" />
</field>
<!– sc:productRelated –>
<field id="sc:product" label-id="prop.sc_product">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="sc:version" label-id="prop.sc_version">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<!– sc:webable –>
<field id="sc:isActive" label-id="prop.sc_isActive">
<control template="/org/alfresco/components/form/controls/checkbox.ftl" />
</field>
<field id="sc:published" label-id="prop.sc_published">
<control template="/org/alfresco/components/form/controls/daterange.ftl" />
</field>
</appearance>
</form>
</forms>
</config>
</alfresco-config>
09-21-2015 10:52 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.