How to read aspect properties?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2008 03:21 PM
I must be missing something or else I've hit yet another frustrating limitation of web services…
I'm using WebServiceFactory.getRepositoryService().get() to retrieve a node. The node has several custom aspects of which I want to retrieve the properties of.
But, I can't see any way to extract the custom aspect properties. Is this possible? I've looked in the web service wiki section, the examples, and on the web with no success.
Kevin
I'm using WebServiceFactory.getRepositoryService().get() to retrieve a node. The node has several custom aspects of which I want to retrieve the properties of.
But, I can't see any way to extract the custom aspect properties. Is this possible? I've looked in the web service wiki section, the examples, and on the web with no success.
Kevin
Labels:
- Labels:
-
Archive
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2008 08:34 AM
In the web client, you can use the node browser to discover the full names of the the Alfresco objects' properties. You can find the node-browser in the administration console, and then following "workspace://SpacesStore"/ link and next ones.
Then you can retrieve the node properties by their (exact) names: "{http://www.alfresco.org/model/content/1.0}title", "{http://www.alfresco.org/model/content/1.0}author",…
Then you can retrieve the node properties by their (exact) names: "{http://www.alfresco.org/model/content/1.0}title", "{http://www.alfresco.org/model/content/1.0}author",…
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2008 11:19 AM
Thanks, that is a good way to get the full name of the properties. My problem now is that even though I know the property name, I don't know the method to call to retrieve the property value. In the foundation services, I have used the NodeService to do this. However, I don't think NodeService is implemented in the WebService client. Therefore I don't see a way to get the property values.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2008 01:42 PM
In the Repository Service there is a get() method which returns a Node object. Then you can call Node.getProperties() that returns a list of NamedValue objects, one per node property (note they can be multivalued).
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2008 01:44 PM
Forget this post. I figured the problem out.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2008 11:10 AM
In the Repository Service there is a get() method which returns a Node object. Then you can call Node.getProperties() that returns a list of NamedValue objects, one per node property (note they can be multivalued).
What I was seeing was that node.getProperties() was only returning the base Alfresco properties, not the properties for my custom aspects. It turns out the node I chose for testing didn't have the properties I was looking for. Silly mistake….

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-10-2013 09:49 PM
Is there any way to get node.getProperties() by it's name rather than iterating it ?
