diff --git a/rm-server/config/alfresco/module/org_alfresco_module_rm/classified-content-context.xml b/rm-server/config/alfresco/module/org_alfresco_module_rm/classified-content-context.xml index 0fb83bd483..19a684a701 100644 --- a/rm-server/config/alfresco/module/org_alfresco_module_rm/classified-content-context.xml +++ b/rm-server/config/alfresco/module/org_alfresco_module_rm/classified-content-context.xml @@ -1,12 +1,12 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:aop="http://www.springframework.org/schema/aop" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-3.0.xsd + http://www.springframework.org/schema/aop + http://www.springframework.org/schema/aop/spring-aop-3.0.xsd "> @@ -60,13 +60,17 @@ + + + + , Pair> cache; + /** * @return the nodeService */ @@ -71,6 +80,14 @@ public abstract class BasePostMethodInvocationProcessor return this.contentClassificationService; } + /** + * @return the securityClearanceService + */ + protected SecurityClearanceService getSecurityClearanceService() + { + return this.securityClearanceService; + } + /** * @return the postMethodInvocationProcessor */ @@ -79,6 +96,14 @@ public abstract class BasePostMethodInvocationProcessor return this.postMethodInvocationProcessor; } + /** + * @return the cache + */ + protected SimpleCache, Pair> getCache() + { + return this.cache; + } + /** * @param nodeService the nodeService to set */ @@ -103,6 +128,14 @@ public abstract class BasePostMethodInvocationProcessor this.contentClassificationService = contentClassificationService; } + /** + * @param securityClearanceService the securityClearanceService to set + */ + public void setSecurityClearanceService(SecurityClearanceService securityClearanceService) + { + this.securityClearanceService = securityClearanceService; + } + /** * @param postMethodInvocationProcessor the postMethodInvocationProcessor to set */ @@ -111,6 +144,14 @@ public abstract class BasePostMethodInvocationProcessor this.postMethodInvocationProcessor = postMethodInvocationProcessor; } + /** + * @param cache the cache to set + */ + public void setCache(SimpleCache, Pair> cache) + { + this.cache = cache; + } + /** * Gets the class name * @@ -164,6 +205,29 @@ public abstract class BasePostMethodInvocationProcessor filter = null; } +// if (filter != null) +// { +// String uniqueCacheKey = getFullyAuthenticatedUser() /*+ userClearance?*/; +// +// Pair cacheKey = new Pair(uniqueCacheKey, filter); +// Pair cacheValue = getCache().get(cacheKey); +// +// if (cacheValue == null || !cacheValue.getFirst().booleanValue()) +// { +// if (getNodeService().exists(nodeRef) && +// getDictionaryService().isSubClass(getNodeService().getType(nodeRef), TYPE_CONTENT) && +// !getContentClassificationService().hasClearance(nodeRef)) +// { +// filter = null; +// } +// getCache().put(new Pair(uniqueCacheKey, nodeRef), new Pair(true, filter)); +// } +// else +// { +// filter = getCache().get(cacheKey).getSecond(); +// } +// } + return filter; } }