Browse Source

javadoc

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@278440 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 20 years ago
parent
commit
05c37b4a9a
3 changed files with 33 additions and 2 deletions
  1. +28
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java
  2. +4
    -0
      src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java
  3. +1
    -0
      src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java

+ 28
- 2
src/main/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java View File

@@ -1,5 +1,5 @@
/*
* Copyright 2000-2004 The Apache Software Foundation
* Copyright 2000-2005 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -112,11 +112,23 @@ public class DescriptorHandler extends org.xml.sax.HandlerBase {
*/
private File srcDir;

/**
* Constructor for DescriptorHandler.
* @param task the task that owns this desciptor
* @param srcDir the source directory
*/
public DescriptorHandler(Task task, File srcDir) {
this.owningTask = task;
this.srcDir = srcDir;
}

/**
* Register a dtd with a location.
* The location is one of a filename, a resource name in the classpath, or
* a URL.
* @param publicId the public identity of the dtd
* @param location the location of the dtd
*/
public void registerDTD(String publicId, String location) {
if (location == null) {
return;
@@ -156,6 +168,7 @@ public class DescriptorHandler extends org.xml.sax.HandlerBase {

}

/** @see org.xml.sax.EntityResolver#resolveEntity(String, String) */
public InputSource resolveEntity(String publicId, String systemId)
throws SAXException {
this.publicId = publicId;
@@ -201,6 +214,7 @@ public class DescriptorHandler extends org.xml.sax.HandlerBase {

/**
* Getter method that returns the set of files to include in the EJB jar.
* @return the map of files
*/
public Hashtable getFiles() {
return (ejbFiles == null) ? new Hashtable() : ejbFiles;
@@ -208,6 +222,7 @@ public class DescriptorHandler extends org.xml.sax.HandlerBase {

/**
* Get the publicId of the DTD
* @return the public id
*/
public String getPublicId() {
return publicId;
@@ -215,6 +230,7 @@ public class DescriptorHandler extends org.xml.sax.HandlerBase {

/**
* Getter method that returns the value of the <ejb-name> element.
* @return the ejb name
*/
public String getEjbName() {
return ejbName;
@@ -223,6 +239,7 @@ public class DescriptorHandler extends org.xml.sax.HandlerBase {
/**
* SAX parser call-back method that is used to initialize the values of some
* instance variables to ensure safe operation.
* @throws SAXException on error
*/
public void startDocument() throws SAXException {
this.ejbFiles = new Hashtable(10, 1);
@@ -237,6 +254,7 @@ public class DescriptorHandler extends org.xml.sax.HandlerBase {
* instance variable.
* @param name The name of the element being entered.
* @param attrs Attributes associated to the element.
* @throws SAXException on error
*/
public void startElement(String name, AttributeList attrs)
throws SAXException {
@@ -266,6 +284,7 @@ public class DescriptorHandler extends org.xml.sax.HandlerBase {
* data this is a simpler and workable solution.
* @param name The name of the attribute being exited. Ignored
* in this implementation.
* @throws SAXException on error
*/
public void endElement(String name) throws SAXException {
processElement();
@@ -300,6 +319,7 @@ public class DescriptorHandler extends org.xml.sax.HandlerBase {
* array to start reading from.
* @param length An integer representing an offset into the
* char array where the current data terminates.
* @throws SAXException on error
*/
public void characters(char[] ch, int start, int length)
throws SAXException {
@@ -308,6 +328,12 @@ public class DescriptorHandler extends org.xml.sax.HandlerBase {
}


/**
* Called when an endelement is seen.
* This may be overridden in derived classes.
* This updates the ejbfiles if the element is an interface or a bean class.
* This updates the ejbname if the element is an ejb name.
*/
protected void processElement() {
if (inEJBRef
|| (parseState != STATE_IN_ENTITY
@@ -340,7 +366,7 @@ public class DescriptorHandler extends org.xml.sax.HandlerBase {
}
}

// Get the value of the <ejb-name> tag. Only the first occurrence.
// Get the value of the <ejb-name> tag. Only the first occurrence.
if (currentElement.equals(EJB_NAME)) {
if (ejbName == null) {
ejbName = currentText.trim();


+ 4
- 0
src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java View File

@@ -108,6 +108,7 @@ public class WLRun extends Task {

/**
* Add the classpath for the user classes
* @return a path to be configured
*/
public Path createClasspath() {
if (classpath == null) {
@@ -118,6 +119,7 @@ public class WLRun extends Task {

/**
* Get the classpath to the weblogic classpaths
* @return a path to be configured
*/
public Path createWLClasspath() {
if (weblogicClasspath == null) {
@@ -402,6 +404,7 @@ public class WLRun extends Task {
/**
* Additional argument string passed to the Weblogic instance;
* optional.
* @param args the argument string
*/
public void setArgs(String args) {
additionalArgs = args;
@@ -409,6 +412,7 @@ public class WLRun extends Task {

/**
* name of the main class for weblogic; optional.
* @param c the name of the class
*/
public void setWeblogicMainClass(String c) {
weblogicMainClass = c;


+ 1
- 0
src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java View File

@@ -110,6 +110,7 @@ public class WLStop extends Task {
/**
* The classpath to be used with the Java Virtual Machine that runs the Weblogic
* Shutdown command;
* @return the path to be configured.
*/
public Path createClasspath() {
if (classpath == null) {


Loading…
Cancel
Save