Programming with Content Services ES > Creating Custom Actions > Defining your application logic > Creating a custom model

Creating a custom model
If you would like to define a custom model, in some cases you must first create a custom model to contain the new aspect and tags to be assigned by the user. In this example, the model uses a prefix of tag, the aspect is called tag:taggable, and the property is called tag:tags.
Example: Creating custom tags model
This example contains a sample implementation of the tags custom model and is defined in the tagsModel.xml file.
<?xml version="1.0" encoding="UTF-8"?>
 
<!-- Definition of new Model -->
<model name="tag:tagsmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
 
   <!-- Optional meta-data about the model -->   
   <description>Tagging Model</description>
   <author>Gavin Cornwell</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="extension.tags" prefix="tag"/>
   </namespaces>
  
    <aspects>
      
      <!-- Definition of new Taggable Aspect -->
      <aspect name="tag:taggable">
      	<title>Taggable</title>
      	<properties>
      		<property name="tag:tags">
               <title>Tags</title>
      			<type>d:text</type>
      			<multiple>true</multiple>
      		</property>
      	</properties>
      </aspect>
      
   </aspects>
   
</model>

Programming with Content Services ES > Creating Custom Actions > Defining your application logic > Creating a custom model

Programming with LiveCycle ES (LiveDocs)
Adobe LiveCycle ES Update 1

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/001565.html