Select all properties of a cmis type
<p>I'd like to list all properties attached to a cmis object such as <code>cmis:document</code>. The idea is to return properties name, id, description just like it is done in opencmis-workbench</p>

<p><a href="https://i.stack.imgur.com/6AiFg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6AiFg.png" alt="enter image description here"></a></p>

<p>Any idea I could get the same result?</p>

<p>UPDATE:
Thanks to @Florian Müller, I found a solution:</p>

<pre><code>String myType = "cmis:document";
ObjectType type = session.getTypeDefinition(myType);
Map&lt;String, PropertyDefinition&lt;?&gt;&gt; propertyDefinitions = type.getPropertyDefinitions();
propertyDefinitions.each { name, value -&gt;
    println "name = ${name}, value = ${value.getDisplayName()}"
}
</code></pre>