org.jboss.jca.core.security
Class UsersRoles

java.lang.Object
  extended by org.jboss.jca.core.security.UsersRoles
All Implemented Interfaces:
Serializable, org.jboss.jca.core.spi.security.Callback

public class UsersRoles
extends Object
implements org.jboss.jca.core.spi.security.Callback

An user / role implementation based on property files

Version:
$Rev: 97162 $
Author:
Jesper Pedersen
See Also:
Serialized Form

Constructor Summary
UsersRoles()
          Constructor
 
Method Summary
 char[] getCredential(String user)
          Get the credential for an user
 String getDomain()
          Get the domain
 String[] getRoles(String user)
          Get the roles for an user
 String getRolesProperties()
          Get the roles.properties file name
 Set<String> getUsers()
          Get the users
 String getUsersProperties()
          Get the users.properties file name
 void setDomain(String v)
          Set the domain
 void setRolesProperties(String value)
          Set the roles.properties file name
 void setUsersProperties(String value)
          Set the users.properties file name
 void start()
          Start
 void stop()
          Stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UsersRoles

public UsersRoles()
Constructor

Method Detail

getUsersProperties

public String getUsersProperties()
Get the users.properties file name

Returns:
The value

setUsersProperties

public void setUsersProperties(String value)
Set the users.properties file name

Parameters:
value - The value

getRolesProperties

public String getRolesProperties()
Get the roles.properties file name

Returns:
The value

setRolesProperties

public void setRolesProperties(String value)
Set the roles.properties file name

Parameters:
value - The value

getDomain

public String getDomain()
Get the domain

Specified by:
getDomain in interface org.jboss.jca.core.spi.security.Callback
Returns:
The value

setDomain

public void setDomain(String v)
Set the domain

Parameters:
v - The value

getUsers

public Set<String> getUsers()
Get the users

Specified by:
getUsers in interface org.jboss.jca.core.spi.security.Callback
Returns:
A set of user names

getCredential

public char[] getCredential(String user)
Get the credential for an user

Specified by:
getCredential in interface org.jboss.jca.core.spi.security.Callback
Parameters:
user - The user name
Returns:
The credential; null if user doesn't exists

getRoles

public String[] getRoles(String user)
Get the roles for an user

Specified by:
getRoles in interface org.jboss.jca.core.spi.security.Callback
Parameters:
user - The user name
Returns:
A set of roles; null if user doesn't exists

start

public void start()
           throws Throwable
Start

Specified by:
start in interface org.jboss.jca.core.spi.security.Callback
Throws:
Throwable - Thrown if an error occurs

stop

public void stop()
          throws Throwable
Stop

Specified by:
stop in interface org.jboss.jca.core.spi.security.Callback
Throws:
Throwable - Thrown if an error occurs


Copyright © 2008 Red Hat Middleware LLC (http://www.jboss.com/)