11-15-2014 10:35 AM
TypeDefinition typeDefinition = TypeUtils.readFromXML(Main.class.getResourceAsStream("/example-secondary-type.xml"));
ObjectType createType = session.createType(typeDefinition);
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<ns3:type xmlns="http://docs.oasis-open.org/ns/cmis/core/200908/"
xmlns:ns2="http://docs.oasis-open.org/ns/cmis/messaging/200908/"
xmlns:ns3="http://docs.oasis-open.org/ns/cmis/restatom/200908/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="cmisTypeDocumentDefinitionType">
<id>test-document</id>
<localName>test-document</localName>
<localNamespace>local</localNamespace>
<displayName>Test document</displayName>
<queryName>test</queryName>
<description>Test document.</description>
<baseId>cmis:secondary</baseId>
<parentId>cmis:secondary</parentId>
<createable>false</createable>
<fileable>false</fileable>
<queryable>true</queryable>
<fulltextIndexed>true</fulltextIndexed>
<includedInSuperTypeQuery>true</includedInSuperTypeQuery>
<controllablePolicy>false</controllablePolicy>
<controllableACL>false</controllableACL>
<versionable>true</versionable>
<contentStreamAllowed>allowed</contentStreamAllowed>
<propertyStringDefinition>
<id>test</id>
<localName>test</localName>
<localNamespace>local</localNamespace>
<displayName>Test</displayName>
<queryName>test</queryName>
<description>Test</description>
<propertyType>string</propertyType>
<cardinalityType>multi</cardinalityType>
<updatability>readwrite</updatability>
<inherited>true</inherited>
<required>false</required>
<queryable>true</queryable>
<orderable>false</orderable>
<openChoice>false</openChoice>
<choice>
<value>choice1</value>
</choice>
<choice>
<value>choice2</value>
</choice>
</propertyStringDefinition>
</ns3:type>
Exception in thread "main" org.apache.chemistry.opencmis.commons.exceptions.CmisNotSupportedException: Not supported!
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:477)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.post(AbstractAtomPubService.java:650)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.RepositoryServiceImpl.createType(RepositoryServiceImpl.java:250)
at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.createType(RepositoryServiceImpl.java:192)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl.createType(SessionImpl.java:819)
11-17-2014 08:44 AM
11-17-2014 09:16 AM
11-17-2014 09:26 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.