org.codehaus.cargo.module
Class DescriptorTag

java.lang.Object
  extended by org.codehaus.cargo.module.DescriptorTag
Direct Known Subclasses:
ApplicationXmlTag, EjbJarXmlTag, JBossWebXmlTag, JBossXmlTag, ResinWebXmlTag, TomcatContextXmlTag, WeblogicEjbJarXmlTag, WeblogicXmlTag, WebXmlTag

public class DescriptorTag
extends Object

Represents the various top-level tags in a deployment descriptor as a typesafe enumeration.

Version:
$Id: DescriptorTag.java 1705 2008-09-02 13:14:55Z adriana $

Constructor Summary
DescriptorTag(DescriptorType descriptorType, String tagName, boolean isMultipleAllowed)
          Constructor.
DescriptorTag(DescriptorType descriptorType, String tagName, org.jdom.Namespace namespace, boolean isMultipleAllowed, Identifier identifier, Class clazz)
          Constructor.
 
Method Summary
 DescriptorElement create()
           
 boolean equals(Object other)
          
 DescriptorType getDescriptorType()
          Return the descriptor type that this tag is defined in.
 Identifier getIdentifier()
           
 Class getImplementationClass()
           
 String getTagName()
          
 org.jdom.Namespace getTagNamespace()
          Get tag namespace.
 int hashCode()
          
 boolean isMultipleAllowed()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DescriptorTag

public DescriptorTag(DescriptorType descriptorType,
                     String tagName,
                     org.jdom.Namespace namespace,
                     boolean isMultipleAllowed,
                     Identifier identifier,
                     Class clazz)
Constructor.

Parameters:
descriptorType - the type of this tag
tagName - The tag name of the element
isMultipleAllowed - Whether the element may occur multiple times in the descriptor
identifier - optional tag identifier
namespace - The namespace to use
clazz - implementation class for this tag

DescriptorTag

public DescriptorTag(DescriptorType descriptorType,
                     String tagName,
                     boolean isMultipleAllowed)
Constructor.

Parameters:
descriptorType - the type of this tag
tagName - The tag name of the element
isMultipleAllowed - Whether the element may occur multiple times in the descriptor
Method Detail

equals

public boolean equals(Object other)

Overrides:
equals in class Object
See Also:
Object.toString()

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

getTagName

public String getTagName()

See Also:
getTagName()

getTagNamespace

public org.jdom.Namespace getTagNamespace()
Get tag namespace.

Returns:
the namespace this tag is in.

isMultipleAllowed

public boolean isMultipleAllowed()

See Also:
isMultipleAllowed()

getIdentifier

public Identifier getIdentifier()
Returns:
the identifier

getImplementationClass

public Class getImplementationClass()
Returns:
the webXmlElementClass

getDescriptorType

public DescriptorType getDescriptorType()
Return the descriptor type that this tag is defined in.

Returns:
descriptor type The descriptor type

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()

create

public DescriptorElement create()
                         throws CargoException
Returns:
instantiated descriptor element, or null if no implementation class.
Throws:
CargoException - if any configuration problem


Copyright © 2004-2012 Codehaus. All Rights Reserved.