public class XSAccessController
extends java.lang.Object
| Constructor and Description |
|---|
XSAccessController() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkAcl(Session session, AclId acls, java.util.List<java.lang.String> privileges)
Checks for mutiple privileges.
|
static boolean |
checkAcl(Session session, AclId acls, java.lang.String privilege)
Checks for a privilege.
|
static boolean |
checkAcl(Session session, byte[] acls, java.util.List<java.lang.String> privileges)
Checks for multiple privileges.
|
static boolean |
checkAcl(Session session, byte[] acls, java.lang.String privilege)
Checks for a privilege.
|
static java.util.Collection<java.lang.String> |
getPrivileges(Session session, AclId aclId)
Returns a collection of privileges, which is granted in the specified ACL (AclId), based on the specified session.
|
static java.util.Collection<java.lang.String> |
getPrivileges(Session session, byte[] aclId)
Returns a collection of privileges, which is granted in the specified ACL (byte[]), based on the specified session.
|
public static boolean checkAcl(Session session, AclId acls, java.util.List<java.lang.String> privileges) throws java.sql.SQLException, XSException, NotAttachedException
AclId object. This function returns true only when all the privileges are granted in the specified ACLs. It is important to note that all privileges need not be granted in a single ACL.session - Sessionacls - ACLsprivileges - a list of privilege namesjava.sql.SQLException - when a JDBC exception is thrownNotAttachedException - session not attachedXSException - a generic error is detectedpublic static boolean checkAcl(Session session, AclId acls, java.lang.String privilege) throws java.sql.SQLException, XSException, NotAttachedException
AclId objectsession - Sessionacls - ACLsprivilege - the name of the privilege as Stringjava.sql.SQLException - when a JDBC exception is thrownNotAttachedException - session not attachedXSException - a generic error is detectedpublic static boolean checkAcl(Session session, byte[] acls, java.util.List<java.lang.String> privileges) throws java.sql.SQLException, XSException, NotAttachedException
session - Sessionacls - ACLs in raw formatprivileges - list of privilege namesjava.sql.SQLException - when a JDBC exception is thrownNotAttachedException - the session is not attachedXSException - a generic error is detectedpublic static boolean checkAcl(Session session, byte[] acls, java.lang.String privilege) throws java.sql.SQLException, XSException, NotAttachedException
session - Sessionacls - ACLs in raw formatprivilege - the name of the privilege as Stringjava.sql.SQLException - when a JDBC exception is thrownNotAttachedException - the session is not attachedXSException - a generic error is detectedpublic static java.util.Collection<java.lang.String> getPrivileges(Session session, AclId aclId) throws java.sql.SQLException, XSException, NotAttachedException
session - SessionaclId - AclIdjava.sql.SQLException - when a JDBC exception is thrownNotAttachedException - session not attachedXSException - a generic error is detectedpublic static java.util.Collection<java.lang.String> getPrivileges(Session session, byte[] aclId) throws java.sql.SQLException, XSException, NotAttachedException
session - SessionaclId - byte[]java.sql.SQLException - when a JDBC exception is thrownNotAttachedException - session not attachedXSException - a generic error is detected