cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with getting node description via AVMRemote

mcmagi
Champ in-the-making
Champ in-the-making
Hello,

I am using AVM Remote to access the descriptions of directories from within our web application.  Say I create a directory, 'exercise', in the root of the webapp and attempt to access the attributes of that directory with:


String realPath = servletContext.getRealPath("/exercise");
JNDIPath jndiPath = new JNDIPath(AVMFileDirContext.getAVMFileDirMountPoint(), realPath);
Map propMap = AVMRemote.getNodeAttributes(-1, jndiPath.getAvmPath());

I find that the description entry is present in the property map, but it's corresponding property value is empty.  If I print out all the properties on a newly created directory in a name=value fashion, I see this:

{http://www.alfresco.org/model/content/1.0}description=null

This code worked fine under the 2.0 preview, but the same code no longer appears to get me the description in the final release.  Is this a bug, or is there now another way to get at the description?

Thanks,
- Michael C. Maggio
6 REPLIES 6

mcmagi
Champ in-the-making
Champ in-the-making
Oh, forgot to mention.  The description field was populated with 'Exercise' when the directory was created.  I can verify that it is still populated by viewing the properties of the folder.

britt
Champ in-the-making
Champ in-the-making
Seems like a bug to me.  I'll look into it and report when I know more.

britt
Champ in-the-making
Champ in-the-making
Well, I did a simple test using AVMRemote.setNodeProperty() and AVMRemote.getNodeProperties() and it worked as expected.  Could you perhaps give me a little more detail about how you're setting the property?

Cheers,

mcmagi
Champ in-the-making
Champ in-the-making
Hi Brett.  I am setting the property from the Alfresco CMS GUI.  I log in as 'admin', open up the web project, choose 'Browse Website' in the admin sandbox, and select 'Create Folder' from the Create menu.  I created all folders this way (with descriptions) but I can get none of them to show with AVMRemote.

Also - I'm not sure if this is related, but it seems relevant - I found that if I try to clear the description by editing the folder's properties, the GUI gives me the following error message (and clears the name field too):

Failed to create new space due to error: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1

- Mike

mcmagi
Champ in-the-making
Champ in-the-making
Hi Brett.  Any update on this issue?

- Mike

britt
Champ in-the-making
Champ in-the-making
I figured it out.  The property is of actual type Serializable, so use getSerializableValue() for now.