09-21-2009 09:24 AM
<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200901">
<title>ReallyMyFOLDER1253535827322</title>
<summary>ReallyMyFOLDER1253535827322 (summary)</summary>
<cmis:object>
<cmis:properties>
<cmis:propertyString cmis:name="ObjectTypeId"><cmis:value>folder</cmis:value></cmis:propertyString>
</cmis:properties>
</cmis:object>
</entry>
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns:cmis="http://www.cmis.org/2008/05" xmlns:alf="http://www.alfresco.org">
<author><name>admin</name></author>
<content type="application/octet-stream" src="http://localhost:8080/alfresco/service/api/node/workspace/SpacesStore/e42dea28-e2cb-4037-9f59-0839c1...><id>urn:uuid:e42dea28-e2cb-4037-9f59-0839c18794a4</id>
<link rel="self" href="http://localhost:8080/alfresco/service/api/node/workspace/SpacesStore/e42dea28-e2cb-4037-9f59-0839c1...>
<link rel="enclosure" type="application/octet-stream" href="http://localhost:8080/alfresco/service/api/node/workspace/SpacesStore/e42dea28-e2cb-4037-9f59-0839c1...><link rel="edit" href="http://localhost:8080/alfresco/service/api/node/workspace/SpacesStore/e42dea28-e2cb-4037-9f59-0839c1...>
<link rel="edit-media" type="application/octet-stream" href="http://localhost:8080/alfresco/service/api/node/workspace/SpacesStore/e42dea28-e2cb-4037-9f59-0839c1...><link rel="cmis-allowableactions" href="http://localhost:8080/alfresco/service/api/node/workspace/SpacesStore/e42dea28-e2cb-4037-9f59-0839c1...>
<link rel="cmis-relationships" href="http://localhost:8080/alfresco/service/api/node/workspace/SpacesStore/e42dea28-e2cb-4037-9f59-0839c1...>
<link rel="cmis-parents" href="http://localhost:8080/alfresco/service/api/node/workspace/SpacesStore/e42dea28-e2cb-4037-9f59-0839c1...>
<link rel="cmis-allversions" href="http://localhost:8080/alfresco/service/api/node/workspace/SpacesStore/e42dea28-e2cb-4037-9f59-0839c1...>
<link rel="cmis-stream" type="application/octet-stream" href="http://localhost:8080/alfresco/service/api/node/workspace/SpacesStore/e42dea28-e2cb-4037-9f59-0839c1...><link rel="cmis-type" href="http://localhost:8080/alfresco/service/api/type/document'/>
<link rel="cmis-repository" href="http://localhost:8080/alfresco/service/api/repository'/>
<published>2009-09-21T12:23:47.836Z</published>
<summary>ReallyMyFOLDER1253535827322 (summary)</summary>
<title>ReallyMyFOLDER1253535827322</title>
<updated>2009-09-21T12:23:48.061Z</updated>
<cmis:object>
<cmis:properties>
<cmis:propertyId cmis:name="ObjectId"><cmis:value>workspace://SpacesStore/e42dea28-e2cb-4037-9f59-0839c18794a4</cmis:value></cmis:propertyId>
<cmis:propertyString cmis:name="BaseType"><cmis:value>document</cmis:value></cmis:propertyString>
<cmis:propertyString cmis:name="ObjectTypeId"><cmis:value>document</cmis:value></cmis:propertyString>
<cmis:propertyString cmis:name="CreatedBy"><cmis:value>admin</cmis:value></cmis:propertyString>
<cmis:propertyDateTime cmis:name="CreationDate"><cmis:value>2009-09-21T12:23:47.836Z</cmis:value></cmis:propertyDateTime>
<cmis:propertyString cmis:name="LastModifiedBy"><cmis:value>admin</cmis:value></cmis:propertyString>
<cmis:propertyDateTime cmis:name="LastModificationDate"><cmis:value>2009-09-21T12:23:48.061Z</cmis:value></cmis:propertyDateTime>
<cmis:propertyString cmis:name="Name"><cmis:value>ReallyMyFOLDER1253535827322</cmis:value></cmis:propertyString>
<cmis:propertyBoolean cmis:name="IsImmutable"><cmis:value>false</cmis:value></cmis:propertyBoolean>
<cmis:propertyBoolean cmis:name="IsLatestVersion"><cmis:value>true</cmis:value></cmis:propertyBoolean>
<cmis:propertyBoolean cmis:name="IsMajorVersion"><cmis:value>false</cmis:value></cmis:propertyBoolean>
<cmis:propertyBoolean cmis:name="IsLatestMajorVersion"><cmis:value>false</cmis:value></cmis:propertyBoolean>
<cmis:propertyString cmis:name="VersionLabel"/>
<cmis:propertyId cmis:name="VersionSeriesId"><cmis:value>workspace://SpacesStore/e42dea28-e2cb-4037-9f59-0839c18794a4</cmis:value></cmis:propertyId>
<cmis:propertyBoolean cmis:name="IsVersionSeriesCheckedOut"><cmis:value>false</cmis:value></cmis:propertyBoolean>
<cmis:propertyString cmis:name="VersionSeriesCheckedOutBy"/>
<cmis:propertyId cmis:name="VersionSeriesCheckedOutId"/>
<cmis:propertyString cmis:name="CheckinComment"/>
<cmis:propertyInteger cmis:name="ContentStreamLength"><cmis:value>0</cmis:value></cmis:propertyInteger>
<cmis:propertyString cmis:name="ContentStreamMimeType"><cmis:value>application/octet-stream</cmis:value></cmis:propertyString>
<cmis:propertyString cmis:name="ContentStreamFilename"><cmis:value>ReallyMyFOLDER1253535827322</cmis:value></cmis:propertyString>
<cmis:propertyString cmis:name="ContentStreamURI"><cmis:value>http://localhost:8080/alfresco/service/api/node/workspace/SpacesStore/e42dea28-e2cb-4037-9f59-0839c1...</cmis:value></cmis:propertyString>
</cmis:properties>
</cmis:object>
<cmis:terminator/>
<app:edited>2009-09-21T12:23:48.061Z</app:edited>
<alf:icon>http://localhost:8080/alfresco/images/filetypes/_default.gif</alf:icon>
</entry>
public Entry createFolder(IRI parent, String name, String atomEntryFile) throws Exception {
String createFolder = templates.load(atomEntryFile == null ? "createfolder.atomentry.xml" : atomEntryFile);
createFolder = createFolder.replace("${NAME}", name);
Request req = new PostRequest(parent.toString(), createFolder, CMISConstants.MIMETYPE_ATOMENTRY); //the constant is "application/atom+xml;type=entry"
Response res = executeRequest(req, 201, cmisValidator.getCMISAtomValidator());
String xml = res.getContentAsString();
Entry entry = appModel.parseEntry(new StringReader(xml), null);
CMISObject object = entry.getExtension(CMISConstants.OBJECT);
String testFolderHREF = (String) res.getHeader("Location");
return entry;
}
09-21-2009 09:35 AM
xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200901"
whereas the more recent Alfresco versions employ xmlns:cmis="http://www.cmis.org/2008/05"
11-24-2009 06:57 AM
IRI queryHREF = client.getQueryCollection(client.getWorkspace());
I suppose it is because the namespace.
<cmis:query xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/">
<cmis:statement><![CDATA[${STATEMENT}]]></cmis:statement>
<cmis:skipCount>${SKIPCOUNT}</cmis:skipCount>
<cmis:maxItems>${MAXITEMS}</cmis:maxItems>
</cmis:query>
Then … There are any java client library that we can use out of the box?11-25-2009 05:44 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.