|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.jonas.lib.management.javaee.ManagedObject
org.ow2.jonas.security.internal.realm.factory.AbstractJResource
org.ow2.jonas.security.internal.realm.factory.JResourceDS
public class JResourceDS
This class extends the JResource class for the Datasource implementation.
| Constructor Summary | |
|---|---|
JResourceDS()
Constructor. |
|
| Method Summary | |
|---|---|
JUser |
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(JUser 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(JUser 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.ow2.jonas.security.internal.realm.factory.AbstractJResource |
|---|
clearCache, getLogger, getName, getSequenceNumber, getUsers, registerGroupMBean, registerRoleMBean, registerUserMBean, saveConfig, setDomainName, setJmxService, setLogger, setName, setSecurityService, setUsers, unregisterGroupMBean, unregisterRoleMBean, unregisterUserMBean |
| Methods inherited from class org.ow2.jonas.lib.management.javaee.ManagedObject |
|---|
getModelMBean, sendNotification, sendReconfigNotification, sendSaveNotification, setModelMBean |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JResourceDS()
throws java.lang.Exception
java.lang.Exception - if super constructor fail| Method Detail |
|---|
public void setDsName(java.lang.String dsName)
dsName - name of the resourcepublic void setUserTable(java.lang.String userTable)
userTable - name of the table which have the username/passwordpublic void setUserTableUsernameCol(java.lang.String userTableUsernameCol)
userTableUsernameCol - name of the column of the username of the
user tablepublic void setUserTablePasswordCol(java.lang.String userTablePasswordCol)
userTablePasswordCol - name of column of the password of the user
tablepublic void setRoleTable(java.lang.String roleTable)
roleTable - name of table which have the username/rolepublic void setRoleTableUsernameCol(java.lang.String roleTableUsernameCol)
roleTableUsernameCol - name of the column of the username of the
role tablepublic void setRoleTableRolenameCol(java.lang.String roleTableRolenameCol)
roleTableRolenameCol - name of the column of the role of the role
tablepublic void setAlgorithm(java.lang.String algorithm)
algorithm - 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()
public java.lang.String getUserTable()
public java.lang.String getUserTableUsernameCol()
public java.lang.String getUserTablePasswordCol()
public java.lang.String getRoleTable()
public java.lang.String getRoleTableUsernameCol()
public java.lang.String getRoleTableRolenameCol()
public java.lang.String getAlgorithm()
public java.lang.String setUserPrincipalsQuery()
public java.lang.String setUserRolesQuery()
public JUser findUser(java.lang.String username)
throws JResourceException
username - the wanted user name
JResourceException - if there is a SQLException
public boolean isValidUser(JUser user,
java.lang.String credentials)
user - user to check its credentialscredentials - the given credentials
public java.util.ArrayList getArrayListCombinedRoles(JUser user)
throws JResourceException
user - 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
javax.naming.NamingException - if a naming exception was encountered while
retrieving the reference.
public void removeMBeans()
throws JResourceException
JResourceException - if the MBeans can not be removed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||