As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<?xml version="1.0" encoding="UTF-8"?> <!– Definition of Hotel Solution Model –> <model name="hs:HotelSolution" xmlns="http://www.alfresco.org/model/dictionary/1.0"> <!– Optional meta-data about the model –> <description>Hotel Solution Content Model</description> <author>Development Team</author> <version>1.0</version> <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.ihgmerlin.com/hotelSolution" prefix="hs"/> </namespaces> <types> <!– Definition of new Content Type: Idea Content –> <type name="hs:IdeaContent"> <title>Hotel Solution Idea Content</title> <parent>cm:content</parent> <properties> <property name="hs:name"> <type>d:text</type> </property> <property name="hs:hotel"> <type>d:text</type> </property> <property name="hs:title"> <type>d:text</type> </property> </properties> <associations/> </type> </types> <aspects/> </model>
Map<String, Object> properties = new HashMap<String, Object>(); properties.put(PropertyIds.NAME, "myDocument"); properties.put(PropertyIds.OBJECT_TYPE_ID, "D:hs:IdeaContent"); properties.put("hs:hotel", "A hotel"); … ContentStream contentStream = … Document doc = session.getRootFolder().createDocument(properties, contentStream, VersioningState.MAJOR);