org.objectweb.jonas_ws.wsgen.generator
Class SecurityGenerator

java.lang.Object
  extended by org.objectweb.jonas_ws.wsgen.generator.SecurityGenerator

public class SecurityGenerator
extends java.lang.Object

Generates the necessary security files to the generated webapp for a stateless session bean endpoint.

Author:
Matt Wringe

Constructor Summary
SecurityGenerator(org.w3c.dom.Document securityDesc)
          Creates a new SecurityGenerator object
 
Method Summary
 void generate(WsEndpointDDModifier ddm, ContextDDModifier cddm, WebJettyDDModifier wjddm)
          Generates the security settings specified in securityDesc document
 org.w3c.dom.NodeList getEndpointLoginConfig()
          Returns the login-config nodes from the securityDesc document
 org.w3c.dom.NodeList getEndpointSecurityConstraints()
          Returns the security-constraint nodes from the securityDesc document
 org.w3c.dom.NodeList getEndpointSecurityRole()
          Returns the security-role nodes from the securityDesc document
 java.lang.String getRealm()
          Returns the context-realm node from the securityDesc document
 java.lang.String getRealmName()
          Returns the realm name
 org.w3c.dom.Document getSecurityDesc()
          Returns the Document that contains the security settings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityGenerator

public SecurityGenerator(org.w3c.dom.Document securityDesc)
Creates a new SecurityGenerator object

Parameters:
securityDesc - Dom Document that contains the security settings
Method Detail

generate

public void generate(WsEndpointDDModifier ddm,
                     ContextDDModifier cddm,
                     WebJettyDDModifier wjddm)
Generates the security settings specified in securityDesc document

Parameters:
ddm - Used to add security to the web.xml
cddm - Used to add a security realm to the context.xml
wjddm - Used to add a security realn to the web-jetty.xml

getEndpointLoginConfig

public org.w3c.dom.NodeList getEndpointLoginConfig()
Returns the login-config nodes from the securityDesc document

Returns:
the login-config nodes from the securityDesc document

getEndpointSecurityConstraints

public org.w3c.dom.NodeList getEndpointSecurityConstraints()
Returns the security-constraint nodes from the securityDesc document

Returns:
the security-constraint nodes from the securityDesc document

getEndpointSecurityRole

public org.w3c.dom.NodeList getEndpointSecurityRole()
Returns the security-role nodes from the securityDesc document

Returns:
the security-role nodes from the securityDesc document

getRealm

public java.lang.String getRealm()
Returns the context-realm node from the securityDesc document

Returns:
the realm node from the securityDesc document

getRealmName

public java.lang.String getRealmName()
Returns the realm name

Returns:
the realm name

getSecurityDesc

public org.w3c.dom.Document getSecurityDesc()
Returns the Document that contains the security settings

Returns:
Document that contains the security settings