org.infoglue.cms.security
Class CombinedJDBCBasicAuthorizationModule

java.lang.Object
  extended by org.infoglue.cms.security.CombinedJDBCBasicAuthorizationModule
All Implemented Interfaces:
java.io.Serializable, AuthorizationModule

public class CombinedJDBCBasicAuthorizationModule
extends java.lang.Object
implements AuthorizationModule, java.io.Serializable

Author:
Mattias Bogeblad This authorization module works firstly against an JDBC source and second against the ordinary infoglue database.
See Also:
Serialized Form

Field Summary
protected  java.util.Properties extraProperties
           
 
Constructor Summary
CombinedJDBCBasicAuthorizationModule()
           
 
Method Summary
 java.util.List authorizeUser(java.lang.String userName)
          This method gets a users roles
 void createInfoGlueGroup(GroupVO groupVO)
          This method is used to create a new group.
 void createInfoGluePrincipal(SystemUserVO systemUserVO)
          This method is used to create a new user.
 void createInfoGlueRole(RoleVO roleVO)
          This method is used to create a new rol.
 void deleteInfoGlueGroup(java.lang.String groupName)
          This method is used to delete an existing group.
 void deleteInfoGluePrincipal(java.lang.String userName)
          This method is used to delete an existing user.
 void deleteInfoGlueRole(java.lang.String roleName)
          This method is used to delete an existing role.
 InfoGlueGroup getAuthorizedInfoGlueGroup(java.lang.String groupName)
          Gets an authorized InfoGlueGroup.
 InfoGluePrincipal getAuthorizedInfoGluePrincipal(java.lang.String userName)
          Gets an authorized InfoGluePrincipal.
 InfoGlueRole getAuthorizedInfoGlueRole(java.lang.String roleName)
          Gets an authorized InfoGlueRole.
 java.util.Properties getExtraProperties()
           
 java.util.List getFilteredUsers(java.lang.String firstName, java.lang.String lastName, java.lang.String userName, java.lang.String email, java.lang.String[] roleIds)
          This method is used to get a filtered list of all users.
 java.util.List getGroups()
          This method gets a list of groups
 java.util.List getGroupUsers(java.lang.String groupName)
          This method is used to fetch all users part of the named group.
 java.util.List getRoles()
          This method gets a list of roles
 java.util.List getRoleUsers(java.lang.String roleName)
          This method is used to fetch all users part of the named role.
 boolean getSupportCreate()
          Gets is the implementing class can create as well as read
 boolean getSupportDelete()
          Gets is the implementing class can delete as well as read
 boolean getSupportUpdate()
          Gets is the implementing class can update as well as read
 java.lang.Object getTransactionObject()
           
 java.util.List getUsers()
          This method gets a list of users
 java.util.List getUsers(java.lang.String roleName)
          This method is used to fetch all users part of the named role.
 void setExtraProperties(java.util.Properties properties)
           
 void setTransactionObject(java.lang.Object transactionObject)
           
 void updateInfoGlueGroup(GroupVO groupVO, java.lang.String[] userNames)
          This method is used to update an existing group.
 void updateInfoGluePrincipal(SystemUserVO systemUserVO, java.lang.String[] roleNames, java.lang.String[] groupNames)
          This method is used to update an existing user.
 void updateInfoGluePrincipalPassword(java.lang.String userName)
          This method is used to send out a newpassword to an existing users.
 void updateInfoGluePrincipalPassword(java.lang.String userName, java.lang.String oldPassword, java.lang.String newPassword)
          This method is used to let a user update his password by giving his/her old one first.
 void updateInfoGlueRole(RoleVO roleVO, java.lang.String[] userNames)
          This method is used to update an existing role.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

extraProperties

protected java.util.Properties extraProperties
Constructor Detail

CombinedJDBCBasicAuthorizationModule

public CombinedJDBCBasicAuthorizationModule()
Method Detail

getAuthorizedInfoGluePrincipal

public InfoGluePrincipal getAuthorizedInfoGluePrincipal(java.lang.String userName)
                                                 throws java.lang.Exception
Gets an authorized InfoGluePrincipal. If the user has logged in with the root-account we immediately return - otherwise we populate it.

Specified by:
getAuthorizedInfoGluePrincipal in interface AuthorizationModule
Throws:
java.lang.Exception

getAuthorizedInfoGlueRole

public InfoGlueRole getAuthorizedInfoGlueRole(java.lang.String roleName)
                                       throws java.lang.Exception
Gets an authorized InfoGlueRole.

Specified by:
getAuthorizedInfoGlueRole in interface AuthorizationModule
Throws:
java.lang.Exception

getAuthorizedInfoGlueGroup

public InfoGlueGroup getAuthorizedInfoGlueGroup(java.lang.String groupName)
                                         throws java.lang.Exception
Gets an authorized InfoGlueGroup.

Specified by:
getAuthorizedInfoGlueGroup in interface AuthorizationModule
Throws:
java.lang.Exception

authorizeUser

public java.util.List authorizeUser(java.lang.String userName)
                             throws java.lang.Exception
This method gets a users roles

Specified by:
authorizeUser in interface AuthorizationModule
Throws:
java.lang.Exception

getRoles

public java.util.List getRoles()
                        throws java.lang.Exception
This method gets a list of roles

Specified by:
getRoles in interface AuthorizationModule
Throws:
java.lang.Exception

getGroups

public java.util.List getGroups()
                         throws java.lang.Exception
This method gets a list of groups

Specified by:
getGroups in interface AuthorizationModule
Throws:
java.lang.Exception

getUsers

public java.util.List getUsers()
                        throws java.lang.Exception
This method gets a list of users

Specified by:
getUsers in interface AuthorizationModule
Throws:
java.lang.Exception

getUsers

public java.util.List getUsers(java.lang.String roleName)
                        throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to fetch all users part of the named role.

Specified by:
getUsers in interface AuthorizationModule
Throws:
java.lang.Exception

getRoleUsers

public java.util.List getRoleUsers(java.lang.String roleName)
                            throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to fetch all users part of the named role.

Specified by:
getRoleUsers in interface AuthorizationModule
Throws:
java.lang.Exception

getGroupUsers

public java.util.List getGroupUsers(java.lang.String groupName)
                             throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to fetch all users part of the named group.

Specified by:
getGroupUsers in interface AuthorizationModule
Throws:
java.lang.Exception

createInfoGluePrincipal

public void createInfoGluePrincipal(SystemUserVO systemUserVO)
                             throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to create a new user.

Specified by:
createInfoGluePrincipal in interface AuthorizationModule
Throws:
java.lang.Exception

updateInfoGluePrincipal

public void updateInfoGluePrincipal(SystemUserVO systemUserVO,
                                    java.lang.String[] roleNames,
                                    java.lang.String[] groupNames)
                             throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to update an existing user.

Specified by:
updateInfoGluePrincipal in interface AuthorizationModule
Throws:
java.lang.Exception

updateInfoGluePrincipalPassword

public void updateInfoGluePrincipalPassword(java.lang.String userName)
                                     throws java.lang.Exception
This method is used to send out a newpassword to an existing users.

Specified by:
updateInfoGluePrincipalPassword in interface AuthorizationModule
Throws:
java.lang.Exception

updateInfoGluePrincipalPassword

public void updateInfoGluePrincipalPassword(java.lang.String userName,
                                            java.lang.String oldPassword,
                                            java.lang.String newPassword)
                                     throws java.lang.Exception
This method is used to let a user update his password by giving his/her old one first.

Specified by:
updateInfoGluePrincipalPassword in interface AuthorizationModule
Throws:
java.lang.Exception

deleteInfoGluePrincipal

public void deleteInfoGluePrincipal(java.lang.String userName)
                             throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to delete an existing user.

Specified by:
deleteInfoGluePrincipal in interface AuthorizationModule
Throws:
java.lang.Exception

createInfoGlueRole

public void createInfoGlueRole(RoleVO roleVO)
                        throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to create a new rol.

Specified by:
createInfoGlueRole in interface AuthorizationModule
Throws:
java.lang.Exception

deleteInfoGlueRole

public void deleteInfoGlueRole(java.lang.String roleName)
                        throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to delete an existing role.

Specified by:
deleteInfoGlueRole in interface AuthorizationModule
Throws:
java.lang.Exception

updateInfoGlueRole

public void updateInfoGlueRole(RoleVO roleVO,
                               java.lang.String[] userNames)
                        throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to update an existing role.

Specified by:
updateInfoGlueRole in interface AuthorizationModule
Throws:
java.lang.Exception

createInfoGlueGroup

public void createInfoGlueGroup(GroupVO groupVO)
                         throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to create a new group.

Specified by:
createInfoGlueGroup in interface AuthorizationModule
Throws:
java.lang.Exception

deleteInfoGlueGroup

public void deleteInfoGlueGroup(java.lang.String groupName)
                         throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to delete an existing group.

Specified by:
deleteInfoGlueGroup in interface AuthorizationModule
Throws:
java.lang.Exception

updateInfoGlueGroup

public void updateInfoGlueGroup(GroupVO groupVO,
                                java.lang.String[] userNames)
                         throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to update an existing group.

Specified by:
updateInfoGlueGroup in interface AuthorizationModule
Throws:
java.lang.Exception

getSupportUpdate

public boolean getSupportUpdate()
Description copied from interface: AuthorizationModule
Gets is the implementing class can update as well as read

Specified by:
getSupportUpdate in interface AuthorizationModule

getSupportDelete

public boolean getSupportDelete()
Description copied from interface: AuthorizationModule
Gets is the implementing class can delete as well as read

Specified by:
getSupportDelete in interface AuthorizationModule

getSupportCreate

public boolean getSupportCreate()
Description copied from interface: AuthorizationModule
Gets is the implementing class can create as well as read

Specified by:
getSupportCreate in interface AuthorizationModule

getFilteredUsers

public java.util.List getFilteredUsers(java.lang.String firstName,
                                       java.lang.String lastName,
                                       java.lang.String userName,
                                       java.lang.String email,
                                       java.lang.String[] roleIds)
                                throws java.lang.Exception
Description copied from interface: AuthorizationModule
This method is used to get a filtered list of all users.

Specified by:
getFilteredUsers in interface AuthorizationModule
Returns:
Throws:
SystemException
java.lang.Exception

getExtraProperties

public java.util.Properties getExtraProperties()
Specified by:
getExtraProperties in interface AuthorizationModule

setExtraProperties

public void setExtraProperties(java.util.Properties properties)
Specified by:
setExtraProperties in interface AuthorizationModule

setTransactionObject

public void setTransactionObject(java.lang.Object transactionObject)
Specified by:
setTransactionObject in interface AuthorizationModule

getTransactionObject

public java.lang.Object getTransactionObject()
Specified by:
getTransactionObject in interface AuthorizationModule


Copyright © 2005 InfoGlue.org All Rights Reserved.