@Deprecated public class MemoryRealm extends Object implements ISpaceUserAccountDriver
IMPLEMENTATION NOTE: It is assumed that the in-memory collection representing our defined users (and their roles) is initialized at application startup and never modified again. ( ONLY ON CLEAN SPACE ).
Modifier and Type | Field and Description |
---|---|
Map<String,UserDefinedRole> |
m_userDefinedRoles
Deprecated.
User defined roles contains as key: role name, value: UserDefinedRole object.
|
Hashtable<String,GenericPrincipal> |
m_userPrincipal
Deprecated.
contains the user information: userName, password and roles.
|
Constructor and Description |
---|
MemoryRealm()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addUserAccount(GenericPrincipal account)
Deprecated.
|
GenericPrincipal |
authenticate(String username,
String password)
Deprecated.
Return the Principal associated with the specified username and credentials, if there is one;
otherwise throws SecurityException.
|
boolean |
containsUserAccount(String userName)
Deprecated.
|
void |
createFile(FiltersInfo newFilterInfo)
Deprecated.
Creates an encrypted data file, that used by
com.j_spaces.core.filters.MemoryRealm ,
it contains space user details and user defined roles. |
boolean |
deleteFile()
Deprecated.
Deletes the file if exists on the local file-system.
|
void |
flush()
Deprecated.
Creates an encrypted data file, that used by
com.j_spaces.core.filters.MemoryRealm ,
it contains space user details and user defined roles. |
static String |
getResourceUrl(String defaults)
Deprecated.
Returns the resource url or the default url if non is defined.
|
static String |
getRootDir()
Deprecated.
Returns the root directory, under which /security folder can be found.
|
static String |
getUrlPath(String url)
Deprecated.
If the url doesn't denote a directory, use the default "security" directory.
|
GenericPrincipal |
getUserAccount(String userName)
Deprecated.
|
void |
init(String URItoPolicyFile,
String containerName)
Deprecated.
Re/initialize user account driver by reading specified data file.
|
void |
removeUserAccount(String userName)
Deprecated.
|
void |
updateUserAccount(GenericPrincipal account)
Deprecated.
|
public final Hashtable<String,GenericPrincipal> m_userPrincipal
public final Map<String,UserDefinedRole> m_userDefinedRoles
public void init(String URItoPolicyFile, String containerName) throws IOException, SAXException, Exception
FiltersInfo
object.init
in interface ISpaceUserAccountDriver
URItoPolicyFile
- tokenized urlcontainerName
- container nameIOException
SAXException
Exception
public GenericPrincipal authenticate(String username, String password)
authenticate
in interface ISpaceUserAccountDriver
username
- Username of the Principal to look uppassword
- Password or other credentials to use in authenticating this username.public void addUserAccount(GenericPrincipal account)
public boolean containsUserAccount(String userName)
public GenericPrincipal getUserAccount(String userName)
public void removeUserAccount(String userName)
public void updateUserAccount(GenericPrincipal account)
public void createFile(FiltersInfo newFilterInfo) throws Exception
com.j_spaces.core.filters.MemoryRealm
,
it contains space user details and user defined roles.newFilterInfo
- - Security filter data, or null
- to create an empty oneException
public boolean deleteFile()
true
if successfully deleted; false
otherwise.public void flush() throws Exception
com.j_spaces.core.filters.MemoryRealm
,
it contains space user details and user defined roles.Exception
public static String getRootDir()
public static String getResourceUrl(String defaults)
Copyright © GigaSpaces.