org.objectweb.jonas.security
Class JResources

java.lang.Object
  extended byorg.objectweb.jonas.security.JResources

public class JResources
extends java.lang.Object

Author:
Guillaume Sauthier

Field Summary
static java.lang.String HEADER_XML
          Xml Header
 
Constructor Summary
JResources(SecurityService s)
          Create a JResoures list attached to a given SecurityService.
 
Method Summary
 void addJResource(JResource jResource)
          Add the Resource (memory, ldap, datasource,...)
 JResource getJResource(java.lang.String name)
           
 java.util.Enumeration getResources()
           
 JResource remove(java.lang.String resourceName)
          Removes the named JResource from the JResource list.
 java.lang.String toXML()
          String representation of the JOnAS realm
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HEADER_XML

public static final java.lang.String HEADER_XML
Xml Header

See Also:
Constant Field Values
Constructor Detail

JResources

public JResources(SecurityService s)
Create a JResoures list attached to a given SecurityService.

Parameters:
s - the parent SecurityService
Method Detail

addJResource

public void addJResource(JResource jResource)
                  throws java.lang.Exception
Add the Resource (memory, ldap, datasource,...)

Parameters:
jResource - an instance of JResource or subclasses (JResourceMemory, JResourceDS,...)
Throws:
java.lang.Exception - if the resource name already exists

remove

public JResource remove(java.lang.String resourceName)
                 throws java.lang.Exception
Removes the named JResource from the JResource list.

Parameters:
resourceName - JResource name to be removed
Returns:
the removed JResource
Throws:
java.lang.Exception - when JResource is not found with given name.

getJResource

public JResource getJResource(java.lang.String name)
Parameters:
name - the name of the JResource to get.
Returns:
Returns the named JResource

getResources

public java.util.Enumeration getResources()
Returns:
Returns the JResources Enumeration

toXML

public java.lang.String toXML()
String representation of the JOnAS realm

Returns:
the xml representation of the JOnAS realm