AnsweredAssumed Answered

Get properties from custom model

Question asked by luisg on Jul 24, 2009
Latest reply on Jul 28, 2009 by luisg
Hi there.

I created a custom model in Alfresco. With this model I can create Alfresco documents with specific properties:

                <!– Enterprise-wide generic document type –>
                <type name="sp:myDocument">
                        <title>My Document</title>
                                <property name="sp:identifier">
                                <property name="sp:CreatedDate">
                                        <title>Creation Date</title>
                                <property name="sp:DocumentType">
                                        <title>Document type</title>

This is working fine. I can create this type of documents through a Web Services.
But my problem is, I can't access to the 'My Document' properties. I do a lucene search(using my type, and the ID property), I get the result, but I can see the custom properties…
Here is my code:

   RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();

   Query query = new Query(Constants.QUERY_LANG_LUCENE,
         "TYPE:\"{}myDocument\" AND @sp\\:identifier:\""+idDocument+"\"");
   QueryResult queryResult = repositoryService.query(STORE, query, false);
   ResultSet result = queryResult.getResultSet();
   ResultSetRow[] rows = result.getRows();

if I do a search for a normal Alfresco document, I access the property X like this: row[0].column[X Position].getValue(); But in my custom model, I only have 1 column.

Can Any of you tell me what I'm doing wrong?

Thanks in advance