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

122919 jphuynh: Merged SAVA/BRANCHES/ACE-5162 (5.1.0) to 5.1.0 (5.1.0)
      122838 sdinuta: ACE-5162: commited the changes for the solution before internal review


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.1.N/root@123118 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-03-04 15:01:45 +00:00
parent 779c0fc241
commit 927878fba2
5 changed files with 327 additions and 19 deletions

View File

@@ -33,6 +33,7 @@ import org.alfresco.repo.virtual.config.NodeRefPathExpression;
import org.alfresco.repo.virtual.ref.GetActualNodeRefMethod;
import org.alfresco.repo.virtual.ref.Reference;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.service.namespace.NamespacePrefixResolver;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.ISO9075;
@@ -59,7 +60,6 @@ public class TemplateFilingRule implements FilingRule
private Map<String, String> stringProperties;
public TemplateFilingRule(ActualEnvironment environment, String path, String type, Set<String> aspects,
Map<String, String> properties)
{
@@ -180,11 +180,16 @@ public class TemplateFilingRule implements FilingRule
String[] pathElements = NodeRefPathExpression.splitAndNormalizePath(path);
for (int i = 0; i < pathElements.length; i++)
{
pathElements[i]=ISO9075.decode(pathElements[i]);
pathElements[i] = ISO9075.decode(pathElements[i]);
}
fParentRef = env.findQNamePath(pathElements);
}
if (!env.hasPermission(fParentRef,
PermissionService.READ_PERMISSIONS))
{
fParentRef = null;
}
if (failIfNotFound && fParentRef == null)
{
throw new VirtualizationException("The filing path " + path + " could not be resolved.");