Merged 5.2.N (5.2.1) to HEAD (5.2)

128812 dhulley: Whitespace fixes found during investigation


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@129301 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alexandru Epure
2016-08-09 14:06:33 +00:00
parent ee47e0f91b
commit 1e3e31592a
2 changed files with 39 additions and 39 deletions

View File

@@ -24,7 +24,7 @@
<view:authority>ROLE_OWNER</view:authority> <view:authority>ROLE_OWNER</view:authority>
<view:permission>FullControl</view:permission> <view:permission>FullControl</view:permission>
</view:ace> </view:ace>
</view:acl> </view:acl>
</sys:container> </sys:container>
</view:view> </view:view>

View File

@@ -80,16 +80,16 @@ public class FilenameFilteringInterceptor implements MethodInterceptor
{ {
} }
/** /**
* A list of regular expressions that represent patterns of temporary files. * A list of regular expressions that represent patterns of temporary files.
* *
*/ */
public void setTemporaryFiles(PatternFilter temporaryFiles) public void setTemporaryFiles(PatternFilter temporaryFiles)
{ {
this.temporaryFiles = temporaryFiles; this.temporaryFiles = temporaryFiles;
} }
public void setHiddenAspect(HiddenAspect hiddenAspect) public void setHiddenAspect(HiddenAspect hiddenAspect)
{ {
this.hiddenAspect = hiddenAspect; this.hiddenAspect = hiddenAspect;
} }
@@ -103,17 +103,17 @@ public class FilenameFilteringInterceptor implements MethodInterceptor
* A list of regular expressions that represent patterns of system paths. * A list of regular expressions that represent patterns of system paths.
* *
*/ */
public void setSystemPaths(PatternFilter systemPaths) public void setSystemPaths(PatternFilter systemPaths)
{ {
this.systemPaths = systemPaths; this.systemPaths = systemPaths;
} }
public Mode getMode() public Mode getMode()
{ {
return FileFilterMode.getMode(); return FileFilterMode.getMode();
} }
public Client getClient() public Client getClient()
{ {
return FileFilterMode.getClient(); return FileFilterMode.getClient();
} }
@@ -125,11 +125,11 @@ public class FilenameFilteringInterceptor implements MethodInterceptor
{ {
this.nodeService = nodeService; this.nodeService = nodeService;
} }
public void setPermissionService(PermissionService permissionService) public void setPermissionService(PermissionService permissionService)
{ {
this.permissionService = permissionService; this.permissionService = permissionService;
} }
public void setContentService(ContentService contentService) public void setContentService(ContentService contentService)
{ {
@@ -145,7 +145,7 @@ public class FilenameFilteringInterceptor implements MethodInterceptor
{ {
checkTemporaryAspect(isTemporary, fileInfo.getNodeRef()); checkTemporaryAspect(isTemporary, fileInfo.getNodeRef());
} }
private void checkTemporaryAspect(boolean isTemporary, NodeRef nodeRef) private void checkTemporaryAspect(boolean isTemporary, NodeRef nodeRef)
{ {
if(isTemporary) if(isTemporary)
@@ -177,7 +177,7 @@ public class FilenameFilteringInterceptor implements MethodInterceptor
private Object runAsSystem(MethodInvocation invocation) throws Throwable private Object runAsSystem(MethodInvocation invocation) throws Throwable
{ {
Object ret = null; Object ret = null;
// We're creating in enhanced mode and have a matching filename or path. Switch to // We're creating in enhanced mode and have a matching filename or path. Switch to
// the system user to do the operation. // the system user to do the operation.
@@ -185,7 +185,7 @@ public class FilenameFilteringInterceptor implements MethodInterceptor
AuthenticationUtil.pushAuthentication(); AuthenticationUtil.pushAuthentication();
try try
{ {
AuthenticationUtil.setRunAsUserSystem(); AuthenticationUtil.setRunAsUserSystem();
ret = invocation.proceed(); ret = invocation.proceed();
} }
finally finally
@@ -198,19 +198,19 @@ public class FilenameFilteringInterceptor implements MethodInterceptor
private boolean isSystemPath(NodeRef parentNodeRef, String filename) private boolean isSystemPath(NodeRef parentNodeRef, String filename)
{ {
boolean ret = false; boolean ret = false;
Path path = nodeService.getPath(parentNodeRef); Path path = nodeService.getPath(parentNodeRef);
Iterator<Element> it = path.iterator(); Iterator<Element> it = path.iterator();
while(it.hasNext()) while(it.hasNext())
{ {
Path.ChildAssocElement elem = (Path.ChildAssocElement)it.next(); Path.ChildAssocElement elem = (Path.ChildAssocElement)it.next();
QName qname = elem.getRef().getQName(); QName qname = elem.getRef().getQName();
if(qname != null && systemPaths.isFiltered(qname.getLocalName())) if(qname != null && systemPaths.isFiltered(qname.getLocalName()))
{ {
ret = true; ret = true;
break; break;
} }
} }
return ret; return ret;
@@ -251,10 +251,10 @@ public class FilenameFilteringInterceptor implements MethodInterceptor
ret = runAsSystem(invocation); ret = runAsSystem(invocation);
FileInfoImpl fileInfo = (FileInfoImpl)ret; FileInfoImpl fileInfo = (FileInfoImpl)ret;
permissionService.setPermission(fileInfo.getNodeRef(), PermissionService.ALL_AUTHORITIES, PermissionService.FULL_CONTROL, true); permissionService.setPermission(fileInfo.getNodeRef(), PermissionService.ALL_AUTHORITIES, PermissionService.FULL_CONTROL, true);
// it's always marked temporary and hidden // it's always marked temporary and hidden
checkTemporaryAspect(true, fileInfo); checkTemporaryAspect(true, fileInfo);
hiddenAspect.hideNode(fileInfo, getSystemFileVisibilityMask(), false, false, false); hiddenAspect.hideNode(fileInfo, getSystemFileVisibilityMask(), false, false, false);
} }
else else
{ {
@@ -267,7 +267,7 @@ public class FilenameFilteringInterceptor implements MethodInterceptor
{ {
// it's on a system path, check whether temporary, hidden and noindex aspects need to be applied // it's on a system path, check whether temporary, hidden and noindex aspects need to be applied
checkTemporaryAspect(true, fileInfo); checkTemporaryAspect(true, fileInfo);
hiddenAspect.hideNode(fileInfo, getSystemFileVisibilityMask(), false, false, false); hiddenAspect.hideNode(fileInfo, getSystemFileVisibilityMask(), false, false, false);
} }
else else
{ {
@@ -275,8 +275,8 @@ public class FilenameFilteringInterceptor implements MethodInterceptor
FileInfo sourceInfo = (FileInfo)ret; FileInfo sourceInfo = (FileInfo)ret;
boolean isTmp = isTemporaryObject(filename, sourceInfo.getNodeRef()); boolean isTmp = isTemporaryObject(filename, sourceInfo.getNodeRef());
checkTemporaryAspect(isTmp, sourceInfo); checkTemporaryAspect(isTmp, sourceInfo);
boolean isHidden = hiddenAspect.checkHidden(fileInfo, false, false); boolean isHidden = hiddenAspect.checkHidden(fileInfo, false, false);
if(isHidden && fileInfo instanceof FileInfoImpl) if(isHidden && fileInfo instanceof FileInfoImpl)
{ {
((FileInfoImpl)fileInfo).setHidden(true); ((FileInfoImpl)fileInfo).setHidden(true);
} }