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