}
return node.hasPermission("Delete");
}
public void afterPropertiesSet() throws Exception {
argumentsResolver.registerRequestParamResolver("folderId", new RequestParamArgumentResolver() {
public void addToArgumentsCache(ArgumentCandidatesCache cache, Object paramValue) {
if (paramValue != null) {
CMFolder folder = repositoryService.fetch(CMFolder.class, new NodeRef((String) paramValue));
cache.add(CMFolder.class, folder);
}
}
});
argumentsResolver.registerRequestParamResolver("contentId", new RequestParamArgumentResolver() {
public void addToArgumentsCache(ArgumentCandidatesCache cache, Object paramValue) {
if (paramValue != null) {
CMContent content = repositoryService.fetch(CMContent.class, new NodeRef((String) paramValue));
cache.add(CMContent.class, content);
}
}
});
argumentsResolver.registerRequestParamResolver("nodeId", new RequestParamArgumentResolver() {
public void addToArgumentsCache(ArgumentCandidatesCache cache, Object paramValue) {
if (paramValue != null) {
CMObject node = repositoryService.fetch(CMObject.class, new NodeRef((String) paramValue));
cache.add(CMObject.class, node);
}
}
});
argumentsResolver.registerRequestParamResolver("nodes", new RequestParamArgumentResolver() {
@SuppressWarnings("unchecked")
public void addToArgumentsCache(ArgumentCandidatesCache cache, Object paramValue) {
if (paramValue != null) {
List<CMObject> nodes = new ArrayList<CMObject>();
for (String nr : (List<String>) paramValue) {