1 17 package org.jahia.services.acl; 18 19 import org.jahia.services.usermanager.JahiaUser; 20 21 22 29 public final class ACLResourceWrapper { 30 31 private ACLResourceInterface res; 33 34 35 public ACLResourceWrapper (ACLResourceInterface res) { 37 this.res = res; 38 } 39 40 46 public JahiaBaseACL getACL () { 47 return res.getACL (); 48 } 49 50 56 public int getAclID () { 57 int id = -1; 58 try { 59 id = getACL ().getID (); 60 } catch (JahiaACLException ex) { 61 } 63 return id; 64 } 65 66 75 public final boolean checkAdminAccess (JahiaUser user) { 76 return ACLResource.checkAdminAccess (res, user); 77 } 78 79 80 89 public final boolean checkReadAccess (JahiaUser user) { 90 return ACLResource.checkReadAccess (res, user); 91 } 92 93 94 103 public final boolean checkWriteAccess (JahiaUser user) { 104 return ACLResource.checkWriteAccess (res, user); 105 } 106 107 108 } 109 110 | Popular Tags |