org.rbtdata.rbt.security
Class JdbcSecurity
java.lang.Object
org.rbtdata.rbt.security.JdbcSecurity
- All Implemented Interfaces:
- SecurityInterface
public class JdbcSecurity
- extends java.lang.Object
- implements SecurityInterface
- Author:
- Rob Tucker
Method Summary |
boolean |
authenticate(javax.xml.soap.SOAPHeader sh)
evaluates incoming SOAP header to determine access |
java.lang.String |
buildSecurityTableName(java.lang.String tname)
|
void |
deleteDocument(java.lang.String groupName,
java.lang.String ownerName,
java.lang.String documentName)
|
void |
deleteForeignKey(java.lang.String foreignKeyName)
|
void |
deleteGroup(java.lang.String groupName)
|
void |
deleteRole(java.lang.String roleName)
|
void |
deleteUser(java.lang.String userName)
|
java.util.List<SecurityObject> |
getAllDatasources()
|
java.util.List<SecurityObject> |
getAllForeignKeys()
|
java.util.List<SecurityObject> |
getAllGroups()
|
java.util.List<SecurityObject> |
getAllRoles()
|
java.util.List<SecurityObject> |
getAllUsers()
|
java.lang.String |
getCurrentUserName()
|
SecurityObject |
getDatasource(java.lang.String jndiName)
|
RbtDocument |
getDocument(java.lang.String groupName,
java.lang.String ownerName,
java.lang.String documentName)
|
java.util.List<QueryParameters> |
getDrillDownDocumentConfig(java.lang.String drillDownDocumentList,
java.lang.String documentColumnValues)
|
SecurityObject |
getForeignKey(java.lang.String foreignKeyName)
|
SecurityObject |
getGroup(java.lang.String groupName)
|
java.util.List<SecurityObject> |
getGroupRoles(java.lang.String groupName)
|
SecurityObject |
getRole(java.lang.String roleName)
|
MembersType |
getTableColumns(java.lang.String jndiName,
java.lang.String tableName)
|
SecurityObject |
getTableSetup(java.lang.String jndiName,
java.lang.String tableName)
|
SecurityObject |
getUser(java.lang.String userName)
|
java.util.List<UserDocument> |
getUserDocuments(java.lang.String userName)
|
java.util.List<SecurityObject> |
getUserGroups(java.lang.String userName)
|
static java.lang.String |
getValidDMDString(java.lang.String in)
|
void |
init(java.util.Map initparams)
Used to pass configuration parameters to the specific SecurityInterface
implementation. |
boolean |
isAdministrator(java.lang.String userName)
|
boolean |
isDesigner(java.lang.String userName)
|
boolean |
isMember(java.lang.String parentType,
java.lang.String parentName,
java.lang.String memberType,
java.lang.String memberName)
|
RbtDocument |
saveDocument(RbtDocument docData)
|
SecurityObject |
saveForeignKey(SecurityObject foreignKeyData)
|
SecurityObject |
saveGroup(SecurityObject groupData)
|
SecurityObject |
saveRole(SecurityObject roleData)
|
void |
saveTableSetup(MemberType tableData)
|
SecurityObject |
saveUser(SecurityObject userData)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JdbcSecurity
public JdbcSecurity()
init
public void init(java.util.Map initparams)
throws BaseException
- Description copied from interface:
SecurityInterface
- Used to pass configuration parameters to the specific SecurityInterface
implementation.
- Specified by:
init
in interface SecurityInterface
- Throws:
BaseException
buildSecurityTableName
public java.lang.String buildSecurityTableName(java.lang.String tname)
authenticate
public boolean authenticate(javax.xml.soap.SOAPHeader sh)
throws BaseException
- Description copied from interface:
SecurityInterface
- evaluates incoming SOAP header to determine access
- Specified by:
authenticate
in interface SecurityInterface
- Returns:
- true if SOAP header credentials are granted access
- Throws:
BaseException
isAdministrator
public boolean isAdministrator(java.lang.String userName)
throws BaseException
- Specified by:
isAdministrator
in interface SecurityInterface
- Returns:
- true if the input username is in the administrators group
- Throws:
BaseException
isDesigner
public boolean isDesigner(java.lang.String userName)
throws BaseException
- Specified by:
isDesigner
in interface SecurityInterface
- Returns:
- true if input username is member of the designers group
- Throws:
BaseException
isMember
public boolean isMember(java.lang.String parentType,
java.lang.String parentName,
java.lang.String memberType,
java.lang.String memberName)
throws BaseException
- Specified by:
isMember
in interface SecurityInterface
- Returns:
- true if entity defined by memberType (user, group, table etc) and
memberName is a child of the entity defined by parentType and parentName
- Throws:
BaseException
getCurrentUserName
public java.lang.String getCurrentUserName()
- Specified by:
getCurrentUserName
in interface SecurityInterface
- Returns:
- the username of the currently logged in user
getAllUsers
public java.util.List<SecurityObject> getAllUsers()
throws BaseException
- Specified by:
getAllUsers
in interface SecurityInterface
- Returns:
- SecurityObjects list of all RBT users
- Throws:
BaseException
getDatasource
public SecurityObject getDatasource(java.lang.String jndiName)
throws BaseException
- Specified by:
getDatasource
in interface SecurityInterface
- Returns:
- datasource record associated with input JNDI name
- Throws:
BaseException
getAllDatasources
public java.util.List<SecurityObject> getAllDatasources()
throws BaseException
- Specified by:
getAllDatasources
in interface SecurityInterface
- Returns:
- SecuritObject list of all datasources available to the RBT application
- does not include the security datasource containing RBT security tables.
- Throws:
BaseException
getTableSetup
public SecurityObject getTableSetup(java.lang.String jndiName,
java.lang.String tableName)
throws BaseException
- Specified by:
getTableSetup
in interface SecurityInterface
- Returns:
- table record associated with input JNDI datasource and tableName
- Throws:
BaseException
getAllGroups
public java.util.List<SecurityObject> getAllGroups()
throws BaseException
- Specified by:
getAllGroups
in interface SecurityInterface
- Returns:
- SecurityObject list of all RBT groups.
- Throws:
BaseException
getAllRoles
public java.util.List<SecurityObject> getAllRoles()
throws BaseException
- Specified by:
getAllRoles
in interface SecurityInterface
- Returns:
- SecurityObject list of all RBT roles.
- Throws:
BaseException
getAllForeignKeys
public java.util.List<SecurityObject> getAllForeignKeys()
throws BaseException
- Specified by:
getAllForeignKeys
in interface SecurityInterface
- Returns:
- SecurityObject list of all custom-created foreign key relationships
- Throws:
BaseException
getUser
public SecurityObject getUser(java.lang.String userName)
throws BaseException
- Specified by:
getUser
in interface SecurityInterface
- Returns:
- SecurityObject containing user record for input userName or null if no data found.
- Throws:
BaseException
getGroup
public SecurityObject getGroup(java.lang.String groupName)
throws BaseException
- Specified by:
getGroup
in interface SecurityInterface
- Returns:
- SecurityObject containing group record for input groupName or null if no data found
- Throws:
BaseException
getRole
public SecurityObject getRole(java.lang.String roleName)
throws BaseException
- Specified by:
getRole
in interface SecurityInterface
- Returns:
- SecurityObject containing role record for input roleName or null if no data found
- Throws:
BaseException
getForeignKey
public SecurityObject getForeignKey(java.lang.String foreignKeyName)
throws BaseException
- Specified by:
getForeignKey
in interface SecurityInterface
- Returns:
- SecurityObject containing foreignKey record for input foreignKeyName or null if no data found
- Throws:
BaseException
getUserGroups
public java.util.List<SecurityObject> getUserGroups(java.lang.String userName)
throws BaseException
- Specified by:
getUserGroups
in interface SecurityInterface
- Returns:
- SecurityObject list of groups in which input user is a member.
- Throws:
BaseException
getGroupRoles
public java.util.List<SecurityObject> getGroupRoles(java.lang.String groupName)
throws BaseException
- Specified by:
getGroupRoles
in interface SecurityInterface
- Returns:
- SecurityObject list of roles in which input group is a member
- Throws:
BaseException
saveUser
public SecurityObject saveUser(SecurityObject userData)
throws BaseException
- Specified by:
saveUser
in interface SecurityInterface
- Parameters:
userData
- input user record
- Returns:
- SecurityObject with updated user information after save.
- Throws:
BaseException
saveGroup
public SecurityObject saveGroup(SecurityObject groupData)
throws BaseException
- Specified by:
saveGroup
in interface SecurityInterface
- Returns:
- SecurityObject with updated group information after save.
- Throws:
BaseException
saveRole
public SecurityObject saveRole(SecurityObject roleData)
throws BaseException
- Specified by:
saveRole
in interface SecurityInterface
- Returns:
- SecurityObject with updated role information after save.
- Throws:
BaseException
saveForeignKey
public SecurityObject saveForeignKey(SecurityObject foreignKeyData)
throws BaseException
- Specified by:
saveForeignKey
in interface SecurityInterface
- Returns:
- SecurityObject with updated foreignKey information after save.
- Throws:
BaseException
deleteUser
public void deleteUser(java.lang.String userName)
throws BaseException
- Specified by:
deleteUser
in interface SecurityInterface
- Parameters:
userName
- user to delete
- Throws:
BaseException
deleteGroup
public void deleteGroup(java.lang.String groupName)
throws BaseException
- Specified by:
deleteGroup
in interface SecurityInterface
- Parameters:
groupName
- group to delete
- Throws:
BaseException
deleteRole
public void deleteRole(java.lang.String roleName)
throws BaseException
- Specified by:
deleteRole
in interface SecurityInterface
- Parameters:
roleName
- role to delete
- Throws:
BaseException
deleteForeignKey
public void deleteForeignKey(java.lang.String foreignKeyName)
throws BaseException
- Specified by:
deleteForeignKey
in interface SecurityInterface
- Parameters:
foreignKeyName
- foreign key to delete
- Throws:
BaseException
getDocument
public RbtDocument getDocument(java.lang.String groupName,
java.lang.String ownerName,
java.lang.String documentName)
throws BaseException
- Specified by:
getDocument
in interface SecurityInterface
- Returns:
-
- Throws:
BaseException
getUserDocuments
public java.util.List<UserDocument> getUserDocuments(java.lang.String userName)
throws BaseException
- Specified by:
getUserDocuments
in interface SecurityInterface
- Returns:
- RbtDocument defined by key docGroup, docOwner and docName
- Throws:
BaseException
deleteDocument
public void deleteDocument(java.lang.String groupName,
java.lang.String ownerName,
java.lang.String documentName)
throws BaseException
- Specified by:
deleteDocument
in interface SecurityInterface
- Throws:
BaseException
saveDocument
public RbtDocument saveDocument(RbtDocument docData)
throws BaseException
- Specified by:
saveDocument
in interface SecurityInterface
- Returns:
- save an RbtDocument
- Throws:
BaseException
saveTableSetup
public void saveTableSetup(MemberType tableData)
throws BaseException
- Specified by:
saveTableSetup
in interface SecurityInterface
- Parameters:
tableData
- MemberType record containing table and column display name setup
- Throws:
BaseException
getTableColumns
public MembersType getTableColumns(java.lang.String jndiName,
java.lang.String tableName)
throws BaseException
- Specified by:
getTableColumns
in interface SecurityInterface
- Parameters:
jndiName
- - datasource JNDI name for RBT database connectiontableName
- - desired table name
- Returns:
- MembersType object containing a MemberType list of column information.
- Throws:
BaseException
getValidDMDString
public static java.lang.String getValidDMDString(java.lang.String in)
getDrillDownDocumentConfig
public java.util.List<QueryParameters> getDrillDownDocumentConfig(java.lang.String drillDownDocumentList,
java.lang.String documentColumnValues)
throws BaseException
- Specified by:
getDrillDownDocumentConfig
in interface SecurityInterface
- Returns:
- QueryParameter list containing available documents and their input parameters that are available for drilldown
- Throws:
BaseException