com.xmlserv.app.user
Class Acl

java.lang.Object
  |
  +--com.xmlserv.app.user.Acl

public class Acl
extends java.lang.Object

ACL abstraction class.


Constructor Summary
Acl(java.sql.Connection con, int id)
           
Acl(int resourceid, int roleid)
          Create new ACL.
Acl(int resource, int role, boolean can_select, boolean can_insert, boolean can_update, boolean can_delete)
          Create new ACL with given access rights.
 
Method Summary
 void delete(java.sql.Connection con)
           
 int getId()
           
 int getResource()
           
 int getRole()
           
 boolean isCan_delete()
           
 boolean isCan_insert()
           
 boolean isCan_select()
           
 boolean isCan_update()
           
static org.jdom.Element list(java.sql.Connection con, int resource)
          return ACLs for the given resource.
static org.jdom.Element list(java.sql.Connection con, java.lang.String resourcename)
          List ACLs by resource name.
 void save(java.sql.Connection con)
           
 void setCan_delete(boolean can_delete)
           
 void setCan_insert(boolean can_insert)
           
 void setCan_select(boolean can_select)
           
 void setCan_update(boolean can_update)
           
 void setResource(int resource)
           
 void setRole(int role)
           
 org.jdom.Element toElement()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Acl

public Acl(int resourceid,
           int roleid)
    throws XMLServException
Create new ACL.

Acl

public Acl(int resource,
           int role,
           boolean can_select,
           boolean can_insert,
           boolean can_update,
           boolean can_delete)
    throws XMLServException
Create new ACL with given access rights.

Acl

public Acl(java.sql.Connection con,
           int id)
    throws XMLServException
Method Detail

save

public void save(java.sql.Connection con)
          throws XMLServException

delete

public void delete(java.sql.Connection con)
            throws XMLServException

toElement

public org.jdom.Element toElement()

list

public static org.jdom.Element list(java.sql.Connection con,
                                    java.lang.String resourcename)
                             throws XMLServException
List ACLs by resource name.

list

public static org.jdom.Element list(java.sql.Connection con,
                                    int resource)
                             throws XMLServException
return ACLs for the given resource.

getId

public int getId()

getResource

public int getResource()

setResource

public void setResource(int resource)

getRole

public int getRole()

setRole

public void setRole(int role)

isCan_select

public boolean isCan_select()

setCan_select

public void setCan_select(boolean can_select)

isCan_insert

public boolean isCan_insert()

setCan_insert

public void setCan_insert(boolean can_insert)

isCan_update

public boolean isCan_update()

setCan_update

public void setCan_update(boolean can_update)

isCan_delete

public boolean isCan_delete()

setCan_delete

public void setCan_delete(boolean can_delete)