Merged HEAD (5.1) to 5.1.N (5.1.1)

119945 jphuynh: Merged 5.1-MC1 (5.1.0) to HEAD (5.1)
      119558 gcornwell: Merged code coverage improvements to 5.1-MC1 (5.1.0)
         r117774 gjames: RA-567: Increase /workflow/processes API code coverage
         r117773 gjames: RA-567: /workflow/processes coverage, removed unused ActivitiTypeConverter
         r116883 gjames: RA-531: reapplied change after merge, for MultiTServiceImpl test coverage
         r116629 gjames: RA-568 Increase /workflow/process-definitions API code coverage
         r116574 gjames: RA-569 Increase /workflow/tasks API code coverage
         r116286 gjames: RA-567: Increase /workflow/processes API code coverage
         r115853 gjames: RA-566: Increasing /people api coverage (description field)
         r115811 gjames: RA-566: Increasing /people api coverage
         r113007 gjames: Adding additional test coverage for DictionaryNamespaceComponent and DynamicNamespacePrefixResolver RA-521
         r113006 gjames: Adding additional test coverage for DictionaryNamespaceComponent and DictionaryComponent RA-514
         r112969 gjames: Adding additional test coverage for TemplateServiceImpl RA-530
         r112960 gjames: Alternative test approach for ModuleServiceImpl RA-520
         r112703 gjames: Adding additional test coverage for NodeLocatorService RA-522
         r112702 gjames: Adding additional test coverage for JobLockServiceImpl RA-516
         r112699 gjames: Adding additional test coverage for ModuleServiceImpl RA-520
         r112508 gjames: Adding additional test coverage for RenditionServiceImpl RA-526
         r112476 gjames: Adding additional test coverage for ContentServiceImpl RA-513
         r112475 gjames: Adding additional test coverage for MimetypeMap RA-519
         r112238 gjames: Adding additional test coverage for MimetypeMap RA-519
         r112237 gjames: Adding additional test coverage for TaggingService RA-529
         r112236 gjames: Adding additional test coverage for MultiTServiceImpl RA-531
         r112206 gjames: Adding additional test coverage for ContentServiceImpl RA-513
         r112167 gcornwell: RA-523: Increase NodeService code coverage (removed redundant code that was testing a version store we no longer use)
         r112102 gjames: Reverted changes to PermissionServiceImpl for RA-524
         r112048 gjames: Temporarily removed some PermissionServiceImpl code. I need to put it back.
         r111620 gjames: Adding additional test coverage for PermissionService RA-524
         r111619 gjames: Added some @Override to make Sonar happier
         r111456 gjames: Adding additional test coverage for AuthenticationService RA-509
         r111427 gjames: Adding additional test coverage for AttributeService RA-509
         r111317 gjames: Adding additional test coverage for WorkflowService RA-533


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.1.N/root@120192 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andreea Dragoi
2015-12-15 13:26:39 +00:00
parent db6475fae6
commit 2c82c256cb
19 changed files with 780 additions and 100 deletions

View File

@@ -51,12 +51,7 @@ public class Node2ServiceImpl extends NodeServiceImpl implements NodeService, Ve
* Type translation for version store
*/
public QName getType(NodeRef nodeRef) throws InvalidNodeRefException
{
if (nodeRef.getStoreRef().getIdentifier().equals(VersionModel.STORE_ID))
{
return super.getType(nodeRef);
}
{
// frozen node type -> replaced by actual node type of the version node
return (QName)this.dbNodeService.getType(VersionUtil.convertNodeRef(nodeRef));
}
@@ -66,11 +61,6 @@ public class Node2ServiceImpl extends NodeServiceImpl implements NodeService, Ve
*/
public Set<QName> getAspects(NodeRef nodeRef) throws InvalidNodeRefException
{
if (nodeRef.getStoreRef().getIdentifier().equals(VersionModel.STORE_ID))
{
return super.getAspects(nodeRef);
}
Set<QName> aspects = this.dbNodeService.getAspects(VersionUtil.convertNodeRef(nodeRef));
aspects.remove(Version2Model.ASPECT_VERSION);
return aspects;
@@ -81,11 +71,6 @@ public class Node2ServiceImpl extends NodeServiceImpl implements NodeService, Ve
*/
public Map<QName, Serializable> getProperties(NodeRef nodeRef) throws InvalidNodeRefException
{
if (nodeRef.getStoreRef().getIdentifier().equals(VersionModel.STORE_ID))
{
return super.getProperties(nodeRef);
}
Map<QName, Serializable> props = dbNodeService.getProperties(VersionUtil.convertNodeRef(nodeRef));
VersionUtil.convertFrozenToOriginalProps(props);
@@ -97,11 +82,6 @@ public class Node2ServiceImpl extends NodeServiceImpl implements NodeService, Ve
*/
public Serializable getProperty(NodeRef nodeRef, QName qname) throws InvalidNodeRefException
{
if (nodeRef.getStoreRef().getIdentifier().equals(VersionModel.STORE_ID))
{
return super.getProperty(nodeRef, qname);
}
// TODO optimise - get property directly and convert if needed
Map<QName, Serializable> properties = getProperties(VersionUtil.convertNodeRef(nodeRef));
return properties.get(qname);
@@ -114,11 +94,6 @@ public class Node2ServiceImpl extends NodeServiceImpl implements NodeService, Ve
*/
public List<ChildAssociationRef> getParentAssocs(NodeRef nodeRef, QNamePattern typeQNamePattern, QNamePattern qnamePattern)
{
if (nodeRef.getStoreRef().getIdentifier().equals(VersionModel.STORE_ID))
{
return super.getParentAssocs(nodeRef, typeQNamePattern, qnamePattern);
}
List<ChildAssociationRef> result = new ArrayList<ChildAssociationRef>();
if (qnamePattern.isMatch(rootAssocName) == true)
{
@@ -136,11 +111,6 @@ public class Node2ServiceImpl extends NodeServiceImpl implements NodeService, Ve
*/
public List<ChildAssociationRef> getChildAssocs(NodeRef nodeRef, QNamePattern typeQNamePattern, QNamePattern qnamePattern) throws InvalidNodeRefException
{
if (nodeRef.getStoreRef().getIdentifier().equals(VersionModel.STORE_ID))
{
return super.getChildAssocs(nodeRef, typeQNamePattern, qnamePattern);
}
// Get the child assoc references from the version store
List<ChildAssociationRef> childAssocRefs = this.dbNodeService.getChildAssocs(
VersionUtil.convertNodeRef(nodeRef),
@@ -183,11 +153,6 @@ public class Node2ServiceImpl extends NodeServiceImpl implements NodeService, Ve
*/
public ChildAssociationRef getPrimaryParent(NodeRef nodeRef) throws InvalidNodeRefException
{
if (nodeRef.getStoreRef().getIdentifier().equals(VersionModel.STORE_ID))
{
return super.getPrimaryParent(nodeRef);
}
return new ChildAssociationRef(
ContentModel.ASSOC_CHILDREN,
dbNodeService.getRootNode(new StoreRef(StoreRef.PROTOCOL_WORKSPACE, Version2Model.STORE_ID)),
@@ -203,11 +168,6 @@ public class Node2ServiceImpl extends NodeServiceImpl implements NodeService, Ve
@Override
public List<AssociationRef> getTargetAssocs(NodeRef sourceRef, QNamePattern qnamePattern)
{
if (sourceRef.getStoreRef().getIdentifier().equals(VersionModel.STORE_ID))
{
return super.getTargetAssocs(sourceRef, qnamePattern);
}
// Get the assoc references from the version store
List<ChildAssociationRef> childAssocRefs = this.dbNodeService.getChildAssocs(
VersionUtil.convertNodeRef(sourceRef),