Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.0.0.CR3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbpm.services.task.identity
Class DBUserGroupCallbackImpl

    java.lang.Object
      org.jbpm.services.task.identity.DBUserGroupCallbackImpl

All Implemented Interfaces:
  org.kie.internal.task.api.UserGroupCallback

    @Alternative
    public class DBUserGroupCallbackImpl

extends Object
implements org.kie.internal.task.api.UserGroupCallback

Data base server user group callback implementation that utilizes SQL queries to get information about user, groups and relationship of these two.
There are four configuration parameters required by this callback:

- db.ds.jndi.name - JNDI name of the data source to be used for connections
- db.user.query - query used to verify existence of the user (case sensitive, expects a single parameter on position 1)
- db.roles.query - query user to check group existence (case sensitive, expects single parameter on position 1)
- db.user.roles.query - query used to collect group for given user (case sensitive, expects single parameter on position 1, retrieves group name from position 1 of returned result set)

Field Summary
`protected static String` | `DEFAULT_PROPERTIES_NAME`
`static String` | `DS_JNDI_NAME`
`static String` | `PRINCIPAL_QUERY`
`static String` | `ROLES_QUERY`
`static String` | `USER_ROLES_QUERY`

Constructor Summary
`DBUserGroupCallbackImpl()`
`DBUserGroupCallbackImpl(Properties config)`

Method Summary
`protected boolean` | `checkExistence(String querySql, String parameter)`
`boolean` | `existsGroup(String groupId)`
`boolean` | `existsUser(String userId)`
`protected Connection` | `getConnection()`
`List<String>` | `getGroupsForUser(String userId, List<String> groupIds, List<String> allExistingGroupIds)`

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

Field Detail

### DEFAULT_PROPERTIES_NAME

    protected static final String DEFAULT_PROPERTIES_NAME

See Also:
  Constant Field Values

### DS_JNDI_NAME

    public static final String DS_JNDI_NAME

See Also:
  Constant Field Values

### PRINCIPAL_QUERY

    public static final String PRINCIPAL_QUERY

See Also:
  Constant Field Values

### USER_ROLES_QUERY

    public static final String USER_ROLES_QUERY

See Also:
  Constant Field Values

### ROLES_QUERY

    public static final String ROLES_QUERY

See Also:
  Constant Field Values

Constructor Detail

### DBUserGroupCallbackImpl

    public DBUserGroupCallbackImpl()

### DBUserGroupCallbackImpl

    public DBUserGroupCallbackImpl(Properties config)

Method Detail

### existsUser

    public boolean existsUser(String userId)

  Specified by:
    `existsUser` in interface `org.kie.internal.task.api.UserGroupCallback`

### existsGroup

    public boolean existsGroup(String groupId)

  Specified by:
    `existsGroup` in interface `org.kie.internal.task.api.UserGroupCallback`

### getGroupsForUser

    public List<String> getGroupsForUser(String userId,
                                         List<String> groupIds,
                                         List<String> allExistingGroupIds)

  Specified by:
    `getGroupsForUser` in interface `org.kie.internal.task.api.UserGroupCallback`

### getConnection

    protected Connection getConnection()
                                throws SQLException

  Throws:
    `SQLException`

### checkExistence

    protected boolean checkExistence(String querySql,
                                     String parameter)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.0.0.CR3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.