Note that there are some explanatory texts on larger screens.

plurals
  1. POUpdate alfresco content type through chemistry OpenCMIS
    primarykey
    data
    text
    <p>I am trying to update the content type of files in alfresco through OpenCMIS.</p> <p>The CMIS workbench shows the type in the types windows, with as only disabled switch 'Policy controlable'. Its local name is <code>document</code>, queryname is <code>prefix:document</code> and Base type is <code>cmis:document</code>.</p> <p>In the groovy console, I tried the following:</p> <pre><code>Folder folder = (Folder) session.getObjectByPath("/Sites/mySite"); CmisObject o = session.getObject(aNodeRef); cmis.printObjectSummary(o); Map&lt;String, Object&gt; properties = new HashMap&lt;String, Object&gt;(); properties.put(PropertyIds.OBJECT_TYPE_ID, "D:prefix:document"); properties.put(PropertyIds.NAME, "itsanewname!"); println("\n\nFrom "+PropertyIds.OBJECT_TYPE_ID+" cmis:document to " + " D:prefix:document:\n\n\n"); o.updateProperties(properties); cmis.printObjectSummary(o); </code></pre> <p>The name is updated alright, but the content type remains <code>cmis:document</code>.</p> <p>This code was written to the following example of mister Potts himself:</p> <pre><code>properties.put(PropertyIds.OBJECT_TYPE_ID, "D:sc:whitepaper,P:sc:webable,P:sc:productRelated"); properties.put(PropertyIds.NAME, filename); properties.put("sc:isActive", true); GregorianCalendar publishDate = new GregorianCalendar(2007,4,1,5,0); properties.put("sc:published", publishDate); </code></pre> <p>However, he uses this example snippet to <strong>create</strong> a node, not <strong>update</strong> it.</p> <p>I also tried this code in a java application that is linked to alfresco, to no avail.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload