AnsweredAssumed Answered

Alfresco heirarchy concepts

Question asked by trupoet on Sep 16, 2006
So I'm trying to figure out the Alfresco CMS heirarchy.

I'm just trying to experiment at this point in pulling out CMS content from another portlet in JBoss.

So far, I have it to the point where I can pull out nodes but I'm confused as to what I do once I have a node if I want the actual content of a file to show.

I think the problem is I dont understand the heirarchy…I saw lots of stuff on the wiki about nodes, properties, references, predicates….dont understand how they all fit together.

if someone could paint the big picture that'd be great.

My current portlet code is:

package com.raf.portal.drippy;

/* imports excluded to make it shorter */

public class FirstJCRClient extends GenericPortlet
    protected void doView(RenderRequest rRequest, RenderResponse rResponse)
       throws PortletException, IOException, UnavailableException
       AuthenticationUtils.startSession("admin", "admin");
       EngineConfiguration config = AuthenticationUtils.getEngineConfiguration();
          PrintWriter writer = rResponse.getWriter();
           RepositoryServiceLocator reposServLocator = new RepositoryServiceLocator(config);
           RepositoryServiceSoapPort reposService = (RepositoryServiceSoapPort)reposServLocator.getRepositoryService();
           Reference reference = new Reference(new Store(StoreEnum.workspace, "SpacesStore"), null,
           Predicate predicate = new Predicate(new Reference[]{reference},null,null);
           Node[] nodes = reposService.get(predicate);
           Reference companyHome = nodes[0].getReference();
           String webID = companyHome.getUuid();
           QueryResult rootChildren = reposService.queryChildren(companyHome);
           ResultSet rootChildrenResults = rootChildren.getResultSet();
           ResultSetRow[] rows = rootChildrenResults.getRows();
           ResultSetRowNode rowNode;
           for(int i = 0; i < rows.length; i++)
               rowNode = rows[i].getNode();
       catch(Throwable e)
          Log.error(this,"Something bad happened: ",e);


this of course just shows some weird information:





I'm just not sure where to go next once I have a node even if that node is the file which has the contents I want to display.

Any help appreciated, thanks.