|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.management.NotificationBroadcasterSupport
org.objectweb.jonas.management.ReconfigDispatcher
org.objectweb.jonas.security.realm.factory.JResource
org.objectweb.jonas.security.realm.factory.JResourceDS
public class JResourceDS
This class extends the JResource class for the Datasource implementation.
| Field Summary |
|---|
| Fields inherited from class org.objectweb.jonas.management.ReconfigDispatcher |
|---|
RECONFIG_TYPE, SAVE_RECONFIG_TYPE |
| Constructor Summary | |
|---|---|
JResourceDS()
Constructor. |
|
| Method Summary | |
|---|---|
User |
findUser(java.lang.String username)
Check if a user is found and return it |
java.lang.String |
getAlgorithm()
Get the default algorithm |
java.util.ArrayList |
getArrayListCombinedRoles(User user)
Get all the roles (from the roles and from the groups) of the given user |
java.lang.String |
getDsName()
Get the name of the resource to use |
javax.naming.Reference |
getReference()
Retrieves the Reference of the object. |
java.lang.String |
getRoleTable()
Get the name of table which have the username/role |
java.lang.String |
getRoleTableRolenameCol()
Get the name of the column of the role of the role table |
java.lang.String |
getRoleTableUsernameCol()
Get the name of the column of the username of the role table |
java.lang.String |
getUserTable()
Get the name of the table which have the username/password |
java.lang.String |
getUserTablePasswordCol()
Get the name of column of the password of the user table |
java.lang.String |
getUserTableUsernameCol()
Get the name of the column of the username of the user table |
boolean |
isValidUser(User user,
java.lang.String credentials)
Check if the given credential is the right credential for the given user |
void |
removeMBeans()
Remove all the Mbeans used by this resource |
void |
setAlgorithm(java.lang.String algorithm)
Set the default algorithm to use |
void |
setDsName(java.lang.String dsName)
Set the name of the resource to use |
void |
setRoleTable(java.lang.String roleTable)
Set the name of table which have the username/role |
void |
setRoleTableRolenameCol(java.lang.String roleTableRolenameCol)
Set the name of the column of the role of the role table |
void |
setRoleTableUsernameCol(java.lang.String roleTableUsernameCol)
Set the name of the column of the username of the role table |
java.lang.String |
setUserPrincipalsQuery()
Gets the user defined query for retrieving principals |
void |
setUserPrincipalsQuery(java.lang.String userPrincipalsQuery)
Set the user defined query for retrieving principals |
java.lang.String |
setUserRolesQuery()
Gets the user defined query for retrieving roles |
void |
setUserRolesQuery(java.lang.String userRolesQuery)
Set the user defined query for retrieving roles |
void |
setUserTable(java.lang.String userTable)
Set the name of the table which have the username/password |
void |
setUserTablePasswordCol(java.lang.String userTablePasswordCol)
Set the name of column of the password of the user table |
void |
setUserTableUsernameCol(java.lang.String userTableUsernameCol)
Set the name of the column of the username of the user table |
java.lang.String |
toString()
The string representation of this realm is the XML |
java.lang.String |
toXML()
String representation of the MemoryRealm |
| Methods inherited from class org.objectweb.jonas.security.realm.factory.JResource |
|---|
clearCache, getLogger, getMBeanServer, getName, getSequenceNumber, getUsers, saveConfig, setLogger, setName, setUsers |
| Methods inherited from class org.objectweb.jonas.management.ReconfigDispatcher |
|---|
addNotificationListener, getFilter, getHandback, getListener, getNotificationInfo, initLogger, removeNotificationListener, sendReconfigNotification, sendSaveNotification |
| Methods inherited from class javax.management.NotificationBroadcasterSupport |
|---|
handleNotification, removeNotificationListener, sendNotification |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.objectweb.jonas.security.realm.factory.JResourceDSMBean |
|---|
clearCache |
| Methods inherited from interface org.objectweb.jonas.security.realm.factory.JResourceMBean |
|---|
getName, saveConfig |
| Constructor Detail |
|---|
public JResourceDS()
throws java.lang.Exception
java.lang.Exception - if super constructor fail| Method Detail |
|---|
public void setDsName(java.lang.String dsName)
setDsName in interface JResourceDSMBeandsName - name of the resourcepublic void setUserTable(java.lang.String userTable)
setUserTable in interface JResourceDSMBeanuserTable - name of the table which have the username/passwordpublic void setUserTableUsernameCol(java.lang.String userTableUsernameCol)
setUserTableUsernameCol in interface JResourceDSMBeanuserTableUsernameCol - name of the column of the username of the
user tablepublic void setUserTablePasswordCol(java.lang.String userTablePasswordCol)
setUserTablePasswordCol in interface JResourceDSMBeanuserTablePasswordCol - name of column of the password of the user
tablepublic void setRoleTable(java.lang.String roleTable)
setRoleTable in interface JResourceDSMBeanroleTable - name of table which have the username/rolepublic void setRoleTableUsernameCol(java.lang.String roleTableUsernameCol)
setRoleTableUsernameCol in interface JResourceDSMBeanroleTableUsernameCol - name of the column of the username of the
role tablepublic void setRoleTableRolenameCol(java.lang.String roleTableRolenameCol)
setRoleTableRolenameCol in interface JResourceDSMBeanroleTableRolenameCol - name of the column of the role of the role
tablepublic void setAlgorithm(java.lang.String algorithm)
setAlgorithm in interface JResourceDSMBeanalgorithm - algorithm to be usedpublic void setUserPrincipalsQuery(java.lang.String userPrincipalsQuery)
userPrincipalsQuery - the user defined query for retrieving
principalspublic void setUserRolesQuery(java.lang.String userRolesQuery)
userRolesQuery - the user defined query for retrieving rolespublic java.lang.String getDsName()
getDsName in interface JResourceDSMBeanpublic java.lang.String getUserTable()
getUserTable in interface JResourceDSMBeanpublic java.lang.String getUserTableUsernameCol()
getUserTableUsernameCol in interface JResourceDSMBeanpublic java.lang.String getUserTablePasswordCol()
getUserTablePasswordCol in interface JResourceDSMBeanpublic java.lang.String getRoleTable()
getRoleTable in interface JResourceDSMBeanpublic java.lang.String getRoleTableUsernameCol()
getRoleTableUsernameCol in interface JResourceDSMBeanpublic java.lang.String getRoleTableRolenameCol()
getRoleTableRolenameCol in interface JResourceDSMBeanpublic java.lang.String getAlgorithm()
getAlgorithm in interface JResourceDSMBeanpublic java.lang.String setUserPrincipalsQuery()
public java.lang.String setUserRolesQuery()
public User findUser(java.lang.String username)
throws JResourceException
findUser in class JResourceusername - the wanted user name
JResourceException - if there is a SQLException
public boolean isValidUser(User user,
java.lang.String credentials)
isValidUser in class JResourceuser - user to check its credentialscredentials - the given credentials
public java.util.ArrayList getArrayListCombinedRoles(User user)
throws JResourceException
getArrayListCombinedRoles in class JResourceuser - the given user
JResourceException - if it failspublic java.lang.String toXML()
public java.lang.String toString()
toString in class java.lang.Object
public javax.naming.Reference getReference()
throws javax.naming.NamingException
getReference in interface javax.naming.ReferenceablegetReference in class JResourcejavax.naming.NamingException - if a naming exception was encountered while
retrieving the reference.
public void removeMBeans()
throws JResourceException
removeMBeans in class JResourceJResourceException - if the MBeans can not be removed
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||