Merged DEV/SWIFT to HEAD

25834: ALF-7070: more tweaks to node properties serialization
          ALF-7071: initial checkin
          SOLR API client library: node metadata, node text content
   25869: ALF-6862 - When performing XML Metadata Extraction on a file with a DTD,
                     if the DTD cannot be found then re-try the extraction with a parser that ignores DTDs.
          Includes unit tests for a file with and without a DTD, showing we now correctly process both.
   25892: OpenCMIS
          - add multi-filing support to CMIS getObjectParents()
          - update OpenCMIS libraries
   25905: Push the DataList model namespace definition into a constant in NameSpaceService in the usual pattern,
          rather than being hard coded in a util class
   25922: (RECORD ONLY) Fix version number

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28115 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2011-05-30 16:15:56 +00:00
parent a5f1ef9735
commit bdd75588c2
11 changed files with 241 additions and 41 deletions

View File

@@ -148,7 +148,7 @@ public class AlfrescoCmisService extends AbstractCmisService
this.context = context;
AuthenticationUtil.pushAuthentication();
try
{
String currentUser = connector.getAuthenticationService().getCurrentUserName();
@@ -694,30 +694,63 @@ public class AlfrescoCmisService extends AbstractCmisService
// versions are filed in the same folder -> cut off version suffix
String currentVersionId = connector.getCurrentVersionId(objectId);
NodeRef nodeRef = connector.getNodeRef(currentVersionId);
NodeRef rootNodeRef = connector.getRootNodeRef();
if (!nodeRef.equals(rootNodeRef))
TypeDefinitionWrapper type = connector.getType(nodeRef);
if (type instanceof FolderTypeDefintionWrapper)
{
ChildAssociationRef parent = connector.getNodeService().getPrimaryParent(nodeRef);
if (parent != null)
NodeRef rootNodeRef = connector.getRootNodeRef();
if (!nodeRef.equals(rootNodeRef))
{
ObjectData object = connector.createCMISObject(parent.getParentRef(), filter,
includeAllowableActions, includeRelationships, renditionFilter, false, false);
if (context.isObjectInfoRequired())
ChildAssociationRef parent = connector.getNodeService().getPrimaryParent(nodeRef);
if (parent != null)
{
getObjectInfo(repositoryId, object.getId());
ObjectData object = connector.createCMISObject(parent.getParentRef(), filter,
includeAllowableActions, includeRelationships, renditionFilter, false, false);
if (context.isObjectInfoRequired())
{
getObjectInfo(repositoryId, object.getId());
}
ObjectParentDataImpl objectParent = new ObjectParentDataImpl();
objectParent.setObject(object);
// include relative path segment
if (includeRelativePathSegment)
{
objectParent.setRelativePathSegment(connector.getName(nodeRef));
}
result.add(objectParent);
}
ObjectParentDataImpl objectParent = new ObjectParentDataImpl();
objectParent.setObject(object);
// include relative path segment
if (includeRelativePathSegment)
}
} else
{
List<ChildAssociationRef> parents = connector.getNodeService().getParentAssocs(nodeRef,
ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);
if (parents != null)
{
for (ChildAssociationRef parent : parents)
{
objectParent.setRelativePathSegment(connector.getName(nodeRef));
}
ObjectData object = connector.createCMISObject(parent.getParentRef(), filter,
includeAllowableActions, includeRelationships, renditionFilter, false, false);
if (context.isObjectInfoRequired())
{
getObjectInfo(repositoryId, object.getId());
}
result.add(objectParent);
ObjectParentDataImpl objectParent = new ObjectParentDataImpl();
objectParent.setObject(object);
// include relative path segment
if (includeRelativePathSegment)
{
objectParent.setRelativePathSegment(connector.getName(nodeRef));
}
result.add(objectParent);
}
}
}
}