Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.knowgate.acl
Class ACLGroup

    java.lang.Object
      com.knowgate.dataobjs.DBPersist
          com.knowgate.acl.ACLGroup

All Implemented Interfaces:
  java.io.Serializable, java.util.Map

    public final class ACLGroup

extends DBPersist

Security Role Groups

See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from interface java.util.Map
`java.util.Map.Entry<K,V>`

Field Summary
`static short` | `ClassId`

Fields inherited from class com.knowgate.dataobjs.DBPersist
`AllVals, sAuditCls, sAuditUsr, sTransactId`

Constructor Summary
`ACLGroup()` Default constructor.
`ACLGroup(java.lang.String sGroupUId)` Construct object and set gu_acl_group field.

Method Summary
`int` | `addACLUser(JDCConnection oConn, java.lang.String sIdUser)` Add User to Group.
`int` | `addACLUsers(JDCConnection oConn, java.lang.String sUserList)` Add Users to Group.
`int` | `clearACLUsers(JDCConnection oConn)` Remove all users from this group.
`static boolean` | `delete(JDCConnection oConn, java.lang.String sGroupGUID)` Delete Group Call k_sp_del_group stored procedure
`DBSubset` | `getACLUsers(JDCConnection oConn)` Get users that belong to this group
`static java.lang.String` | `getIdFromName(java.sql.Connection oConn, int iDomainId, java.lang.String sGroupNm)` Get Group Unique Id. from its name.
`static java.lang.String` | `getIdFromName(JDCConnection oConn, int iDomainId, java.lang.String sGroupNm)` Get Group Unique Id. from its name.
`int` | `removeACLUser(JDCConnection oConn, java.lang.String sIdUser)` Remove User from Group.
`boolean` | `store(JDCConnection oConn)` Store a register at database representing this instance of DBPersist Insertions and updates : The store method automatically manages register insertions and updates.

Methods inherited from class com.knowgate.dataobjs.DBPersist
`allcaps, allcaps, changelog, clear, clone, containsKey, containsValue, delete, entrySet, exists, get, get, getAuditClassName, getCreationDate, getDate, getDateFormated, getDateShort, getDateTime, getDateTime24, getDecimal, getDecimalFormated, getDecimalFormated, getDouble, getDoubleFormated, getFloat, getFloatFormated, getInt, getInteger, getIntervalPart, getItemMap, getItems, getMoney, getShort, getSQLDate, getSQLTime, getString, getStringHtml, getStringNull, getTable, getTable, getTableName, getTime, getTimeOfDay, getTimestamp, getUIdFromName, isEmpty, isNull, iterator, keySet, load, load, parseXML, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putAll, putAll, remove, remove, replace, replace, replace, replace, replace, replace, replace, replace, setAuditTransact, setAuditUser, setCreationDate, size, toLowerCase, toUpperCase, toXML, toXML, toXML, toXML, values`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface java.util.Map
`equals, hashCode`

Field Detail

### ClassId

    public static final short ClassId

See Also:
  Constant Field Values

Constructor Detail

### ACLGroup

    public ACLGroup()

  Default constructor.

### ACLGroup

    public ACLGroup(java.lang.String sGroupUId)

  Construct object and set gu_acl_group field. Object is not fully loaded from database.

  Parameters:
    `sGroupUId` - Group Unique Identifier

Method Detail

### store

    public boolean store(JDCConnection oConn)
                  throws java.sql.SQLException

  Description copied from class: `DBPersist`

  Store a register at database representing this instance of DBPersist

  Insertions and updates : The store method automatically manages register insertions and updates. If the stored object already exists at database then it is updated, if it does not exists then it is inserted. A primary key violation error is never thrown so ther is no need to call delete() method before re-writing an existing object.

  NULL fields : All values not set calling put() methods for DBPersist will be assumed to be NULL. If a not nullable field is not set then an SQLException will be raised.
  On storing an already existing object all values will we overwrited, so is a DBPersist is not fully loaded before storing it, values not set by calling put() methods that already were present at database will be lost.

  Overrides:
    `store` in class `DBPersist`
  Parameters:
    `oConn` - Database Connection
  Returns:
    boolean true if register was stored for the first time, false if register already existed.
  Throws:
    `java.sql.SQLException`

### addACLUser

    public int addACLUser(JDCConnection oConn,
                          java.lang.String sIdUser)
                   throws java.sql.SQLException

  Add User to Group.

  Insert new register at k_x_group_user table.

  Parameters:
    `oConn` - Database Connection
    `sIdUser` - User Unique Identifier.
  Throws:
    `java.sql.SQLException` - May throw a primary key constraint violation is user already belongs to group.

### addACLUsers

    public int addACLUsers(JDCConnection oConn,
                           java.lang.String sUserList)
                    throws java.sql.SQLException

  Add Users to Group.

  Insert new registers at k_x_group_user table.

  Parameters:
    `oConn` - Database Connection
    `sUserList` - A string of comma delimited User GUIDs that must be added to this ACLGroup.
  Throws:
    `java.sql.SQLException` - May throw a primary key constraint violation is user already belongs to group.

### removeACLUser

    public int removeACLUser(JDCConnection oConn,
                             java.lang.String sIdUser)
                      throws java.sql.SQLException

  Remove User from Group.

  remove register from k_x_group_user table.

  Parameters:
    `oConn` - Database Connection
    `sIdUser` - User Unique Identifier.
  Throws:
    `java.sql.SQLException`

### clearACLUsers

    public int clearACLUsers(JDCConnection oConn)
                      throws java.sql.SQLException

  Remove all users from this group.

  Delete registers from k_x_group_user

  Parameters:
    `oConn` - Database connection
  Throws:
    `java.sql.SQLException`

### getACLUsers

    public DBSubset getACLUsers(JDCConnection oConn)
                         throws java.sql.SQLException

  Get users that belong to this group

  Parameters:
    `oConn` - JDCConnection
  Returns:
    DBSubset with all the columns from k_users table
  Throws:
    `java.sql.SQLException`
  Since:
    3.0

### getIdFromName

    public static java.lang.String getIdFromName(java.sql.Connection oConn,
                                                 int iDomainId,
                                                 java.lang.String sGroupNm)
                                          throws java.sql.SQLException

  Get Group Unique Id. from its name.

  This method executes a SQL query with a ResultSet

  Parameters:
    `oConn` - Connection Database Connection
    `iDomainId` - int Domain Identifier to with Group belongs
    `sGroupNm` - String Group Name
  Returns:
    Group Unique Identifier or null if no group with such name was found at given domain.
  Throws:
    `java.sql.SQLException`
  Since:
    3.0

### getIdFromName

    public static java.lang.String getIdFromName(JDCConnection oConn,
                                                 int iDomainId,
                                                 java.lang.String sGroupNm)
                                          throws java.sql.SQLException

  Get Group Unique Id. from its name.

  This method calls k_sp_get_group_id stored procedure.

  Parameters:
    `oConn` - JDCConnection
    `iDomainId` - int Domain Identifier to with Group belongs
    `sGroupNm` - Group Name
  Returns:
    Group String Unique Identifier or null if no group with such name was found at given domain.
  Throws:
    `java.sql.SQLException`

### delete

    public static boolean delete(JDCConnection oConn,
                                 java.lang.String sGroupGUID)
                          throws java.sql.SQLException

  Delete Group

  Call k_sp_del_group stored procedure

  Parameters:
    `oConn` - Database Connection
    `sGroupGUID` - Group Unique Identifier
  Throws:
    `java.sql.SQLException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD