简体   繁体   中英

Is it possible to get a list of node types (or even property types) in Alfresco?

Is there a way that I can call alfresco via webscript and get back a list of node types or list of node properties that are available? So if there are three different node types (cm:content, cm:folder, and cm:foo), I'd get that three returned to me (and not actually nodes that are one of these three types)?

Reason why I'm asking is that I would like to query the server for available search fields to be used in a database search. If it helps, I'm using extjs library with Alfresco (opsoro), and using lucene search atm. Any help into the right direction would be greatly appreciated. Thanks!

I don't think such a webscript exists. You can find all the webscripts provided by alfresco looking at the url http://host/alfresco/service/index .

What you can do is implement the webscript yourself and then just access it normaly like you would any other webscript. More info on how to implement webscripts here .

You can use Get Class Definitions web script, it returns all the metadata related to the given content type. The url is as follows, just pass the name of the class you want, eg cm_content .

http://your.host/alfresco/service/api/classes/{className}

It will dump the metadata as JSON. I actually answered a very similar question, see How to get list of aspects in the systems

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM