incubator-chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Hubick (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CMIS-110) Broken APP Folder Tree and Descendant Processing
Date Wed, 03 Feb 2010 01:37:18 GMT

     [ https://issues.apache.org/jira/browse/CMIS-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Chris Hubick updated CMIS-110:
------------------------------

    Attachment: chemistry_parent_entity.patch

The attached patch tackles several issues with current Chemistry.

First, EntryReader needs some way to return not just the Entry being processed, but also any
nested children.  This core of this patch is a modification to the EntryReader methods to
return a List of results instead of a single one.

That way, when AbstractObjectReader encounters a nested Entry, it can call itself to process
it recursively, and add those entries to it's own result list.

The second problem, is that when calling the Folder Tree and Descendant methods, all the APPObjectEntry's
are grouped into a single result list, losing the original hierarchical structure.  This isn't
so much of a problem for folders, because the parentId property can be used to infer that
structure, but documents don't use parentId.  I thought about introducing a fake "parentId"
property, but I don't think that's a good idea (complications saving, etc), so this patch
tackles this by introducing an APPObjectEntry 'parent' member.  This enables a method like:

  public static final boolean isChild(final APPObjectEntry folder, final APPObjectEntry object)
{
    if (object.getParent().getId().equals(folder.getId())) return true;
    return folder.getId().equals(object.getValue(Property.PARENT_ID));
  }

Which will work when the 'object' arg is a folder or a document.


> Broken APP Folder Tree and Descendant Processing
> ------------------------------------------------
>
>                 Key: CMIS-110
>                 URL: https://issues.apache.org/jira/browse/CMIS-110
>             Project: Chemistry
>          Issue Type: Bug
>          Components: atompub
>            Reporter: Chris Hubick
>         Attachments: chemistry_parent_entity.patch
>
>
> Hi.
> When using the CMIS Folder Tree and Descendant functions with Alfresco, I get back an
Atom 'feed' containing 'entry' elements, which have a cmis/restatom 'children' element, which
then recursively holds further Atom 'entry' elements for the child documents of the parent
entry.  These recursive 'entry' elements are currently ignored by Chemistry.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message