use of org.alfresco.repo.security.permissions.impl.SimpleNodePermissionEntry in project alfresco-repository by Alfresco.
the class AbstractPermissionsDaoComponentImpl method getPermissions.
public NodePermissionEntry getPermissions(NodeRef nodeRef) {
// Create the object if it is not found.
// Null objects are not cached in hibernate
// If the object does not exist it will repeatedly query to check its
// non existence.
NodePermissionEntry npe = null;
Acl acl = null;
try {
acl = getAccessControlList(nodeRef);
} catch (InvalidNodeRefException e) {
// Do nothing.
}
if (acl == null) {
// there isn't an access control list for the node - spoof a null one
SimpleNodePermissionEntry snpe = new SimpleNodePermissionEntry(nodeRef, true, Collections.<SimplePermissionEntry>emptyList());
npe = snpe;
} else {
npe = createSimpleNodePermissionEntry(nodeRef);
}
// done
if (logger.isDebugEnabled()) {
logger.debug("Got NodePermissionEntry for node: \n" + " node: " + nodeRef + "\n" + " acl: " + npe);
}
return npe;
}
Aggregations