org.ow2.jonas.generators.wsgen.ddmodifier
Class WsEndpointDDModifier

java.lang.Object
  extended by org.ow2.jonas.generators.wsgen.ddmodifier.DeploymentDescModifier
      extended by org.ow2.jonas.generators.wsgen.ddmodifier.WsEndpointDDModifier

public class WsEndpointDDModifier
extends DeploymentDescModifier

Modify a Deployment Desc for Endpoint. Wrapper around a web.xml DOM.

Author:
Guillaume Sauthier

Field Summary
 
Fields inherited from class org.ow2.jonas.generators.wsgen.ddmodifier.DeploymentDescModifier
J2EE_NS, JONAS_NS
 
Constructor Summary
WsEndpointDDModifier(Document web)
          Creates a new WsEndpointDDModifier object.
 
Method Summary
 void addEjbLocalRef(String name, String home, String remote, String link)
          DOCUMENT ME!
 void addEjbRef(String name, String home, String remote, String link)
          DOCUMENT ME!
 void addEndpointLoginConfig(Element loginConfig)
          Add a new login-config element into the web.xml
 void addEndpointSecurityConstraint(Node securityConstraint)
          Add a new security-constraint element into the web.xml
 void addSecurityRole(Node securityRole)
          Add a new security-role element into the web.xml
 void addServlet(String name, String classname)
          Add a new servlet element in the web.xml.
 void addServletMapping(String name, String mapping)
          Add a new servlet-mapping element in the web.xml.
 void addServletParam(String servletName, String pName, String pValue)
          Add a new init-param element in the web.xml.
 void addServletSecurityRoleRefs(String servletName, NodeList securityRoleRefs)
          Add a new security-role-ref element in the web.xml.
 void removeServlet(String name)
          Remove a servlet element from the web.xml.
 String removeServletMapping(String sName)
          Remove servlet-mapping tag associated to a given servlet-name
 NodeList removeServletWithSecurity(String name)
          Remove a servlet element from the web.xml.
 void updateSecurityConstraint(String oldUrlPatter, String newUrlPatterValue)
          Update the security-constraint element having url-pattern equal with oldPattern by replacing this old pattern with the newUrlPattern
 
Methods inherited from class org.ow2.jonas.generators.wsgen.ddmodifier.DeploymentDescModifier
getDocument, getElement, getLogger, getParent, newElement, newElement, newJ2EEElement, newJ2EEElement, newJOnASElement, newJOnASElement, setDocument, setElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WsEndpointDDModifier

public WsEndpointDDModifier(Document web)
Creates a new WsEndpointDDModifier object.

Parameters:
web - web.xml document
Method Detail

addServlet

public void addServlet(String name,
                       String classname)
Add a new servlet element in the web.xml.

Parameters:
name - servlet name.
classname - servlet fully qualified classname.

addEndpointSecurityConstraint

public void addEndpointSecurityConstraint(Node securityConstraint)
Add a new security-constraint element into the web.xml

Parameters:
securityConstraint - A node containing the security-constraint setting

addEndpointLoginConfig

public void addEndpointLoginConfig(Element loginConfig)
Add a new login-config element into the web.xml

Parameters:
loginConfig - An element constaining the login-config setting

addSecurityRole

public void addSecurityRole(Node securityRole)
Add a new security-role element into the web.xml

Parameters:
securityRole - A node containing the login-config setting

removeServlet

public void removeServlet(String name)
Remove a servlet element from the web.xml.

Parameters:
name - servlet name.

removeServletWithSecurity

public NodeList removeServletWithSecurity(String name)
Remove a servlet element from the web.xml.

Parameters:
name - servlet name.
Returns:
security-role elements for this servlet if such elements exist

addServletMapping

public void addServletMapping(String name,
                              String mapping)
Add a new servlet-mapping element in the web.xml.

Parameters:
name - servlet name.
mapping - url-mapping value

addServletParam

public void addServletParam(String servletName,
                            String pName,
                            String pValue)
Add a new init-param element in the web.xml.

Parameters:
servletName - the servlet name where init-param will be added.
pName - parameter name
pValue - parameter value

addServletSecurityRoleRefs

public void addServletSecurityRoleRefs(String servletName,
                                       NodeList securityRoleRefs)
Add a new security-role-ref element in the web.xml.

Parameters:
servletName - the servlet name where security-role-ref will be added.
securityRoleRefs - security-role elements for a servlet

removeServletMapping

public String removeServletMapping(String sName)
Remove servlet-mapping tag associated to a given servlet-name

Parameters:
sName - servlet-name
Returns:
url-pattern element's value in the servelet-mapping

updateSecurityConstraint

public void updateSecurityConstraint(String oldUrlPatter,
                                     String newUrlPatterValue)
Update the security-constraint element having url-pattern equal with oldPattern by replacing this old pattern with the newUrlPattern

Parameters:
oldUrlPatter - url-pattern to be replaced
newUrlPatterValue - url-pattern to replace with

addEjbRef

public void addEjbRef(String name,
                      String home,
                      String remote,
                      String link)
DOCUMENT ME!

Parameters:
name - DOCUMENT ME!
home - DOCUMENT ME!
remote - DOCUMENT ME!
link - DOCUMENT ME!

addEjbLocalRef

public void addEjbLocalRef(String name,
                           String home,
                           String remote,
                           String link)
DOCUMENT ME!

Parameters:
name - DOCUMENT ME!
home - DOCUMENT ME!
remote - DOCUMENT ME!
link - DOCUMENT ME!


Copyright © 2010 OW2 Consortium. All Rights Reserved.