Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.metadata
Class MetaData

    java.lang.Object
      org.jboss.metadata.MetaData

All Implemented Interfaces:
  Cloneable, XmlLoadable

Direct Known Subclasses:
  ActivationConfigPropertyMetaData, ApplicationMetaData, AssemblyDescriptorMetaData, BeanMetaData, CacheInvalidationConfigMetaData, ClusterConfigMetaData, ConfigurationMetaData, EjbLocalRefMetaData, EjbRefMetaData, EnvEntryMetaData, InvokerProxyBindingMetaData, J2eeApplicationMetaData, J2eeModuleMetaData, MessageDestinationMetaData, MessageDestinationRefMetaData, MethodMetaData, QueryMetaData, RelationMetaData, RelationshipRoleMetaData, ResourceEnvRefMetaData, ResourceRefMetaData, SecurityIdentityMetaData, SecurityRoleMetaData, SecurityRoleRefMetaData, WebMetaData

public abstract class MetaData
extends Object
implements Cloneable, XmlLoadable

An abstract base class for metadata containers.

Version:
  $Revision: 1.33 $
Author:
  Sebastien Alborini

Field Summary
`protected static org.jboss.logging.Logger` | `log`
`static byte` | `TX_MANDATORY`
`static byte` | `TX_NEVER`
`static byte` | `TX_NOT_SUPPORTED`
`static byte` | `TX_REQUIRED`
`static byte` | `TX_REQUIRES_NEW`
`static byte` | `TX_SUPPORTS`
`static byte` | `TX_UNKNOWN`

Constructor Summary
`MetaData()`

Method Summary
`Object` | `clone()` Create a field wise copy of the object.
`static Iterator` | `getChildrenByTagName(Element element, String tagName)` Returns an iterator over the children of the given element with the given tag name.
`static String` | `getElementAttribute(Element element, String attrName)` Get an attribute value of the given element.
`static String` | `getElementContent(Element element)` Get the content of the given element.
`static String` | `getElementContent(Element element, String defaultStr)` Get the content of the given element.
`static String` | `getFirstElementContent(Element element, String defaultStr)`
`static Element` | `getOptionalChild(Element element, String tagName)` Gets the child of the specified element having the specified name.
`static Element` | `getOptionalChild(Element element, String tagName, Element defaultElement)` Gets the child of the specified element having the specified name.
`static boolean` | `getOptionalChildBooleanContent(Element element, String name)`
`static boolean` | `getOptionalChildBooleanContent(Element element, String name, boolean defaultValue)`
`static String` | `getOptionalChildContent(Element element, String tagName)` Macro to get the content of an optional child element.
`static String` | `getOptionalChildContent(Element element, String tagName, String defaultValue)` Macro to get the content of an optional child element with default value.
`static Element` | `getUniqueChild(Element element, String tagName)` Gets the child of the specified element having the specified unique name.
`static String` | `getUniqueChildContent(Element element, String tagName)` Macro to get the content of a unique child element.
`void` | `importEjbJarXml(Element element)` Non-operation.
`void` | `importJbossXml(Element element)` Non-operation.
`void` | `importXml(Element element)` Imports either the jboss or ejb-jar from the given element.
`protected boolean` | `jdk13Enabled()` Check if we are running in a JDK v1.3 virtual machine or better.

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### log

    protected static org.jboss.logging.Logger log

### TX_NOT_SUPPORTED

    public static final byte TX_NOT_SUPPORTED

See Also:
  Constant Field Values

### TX_REQUIRED

    public static final byte TX_REQUIRED

See Also:
  Constant Field Values

### TX_SUPPORTS

    public static final byte TX_SUPPORTS

See Also:
  Constant Field Values

### TX_REQUIRES_NEW

    public static final byte TX_REQUIRES_NEW

See Also:
  Constant Field Values

### TX_MANDATORY

    public static final byte TX_MANDATORY

See Also:
  Constant Field Values

### TX_NEVER

    public static final byte TX_NEVER

See Also:
  Constant Field Values

### TX_UNKNOWN

    public static final byte TX_UNKNOWN

See Also:
  Constant Field Values

Constructor Detail

### MetaData

    public MetaData()

Method Detail

### getChildrenByTagName

    public static Iterator getChildrenByTagName(Element element,
                                                String tagName)

  Returns an iterator over the children of the given element with the given tag name.

  Parameters:
    `element` - The parent element
    `tagName` - The name of the desired child
  Returns:
    An interator of children or null if element is null.

### getUniqueChild

    public static Element getUniqueChild(Element element,
                                         String tagName)
                                  throws org.jboss.deployment.DeploymentException

  Gets the child of the specified element having the specified unique name. If there are more than one children elements with the same name and exception is thrown.

  Parameters:
    `element` - The parent element
    `tagName` - The name of the desired child
  Returns:
    The named child.
  Throws:
    `org.jboss.deployment.DeploymentException` - Child was not found or was not unique.

### getOptionalChild

    public static Element getOptionalChild(Element element,
                                           String tagName)
                                    throws org.jboss.deployment.DeploymentException

  Gets the child of the specified element having the specified name. If the child with this name doesn't exist then null is returned instead.

  Parameters:
    `element` - the parent element
    `tagName` - the name of the desired child
  Returns:
    either the named child or null
  Throws:
    `org.jboss.deployment.DeploymentException`

### getOptionalChild

    public static Element getOptionalChild(Element element,
                                           String tagName,
                                           Element defaultElement)
                                    throws org.jboss.deployment.DeploymentException

  Gets the child of the specified element having the specified name. If the child with this name doesn't exist then the supplied default element is returned instead.

  Parameters:
    `element` - the parent element
    `tagName` - the name of the desired child
    `defaultElement` - the element to return if the child doesn't exist
  Returns:
    either the named child or the supplied default
  Throws:
    `org.jboss.deployment.DeploymentException`

### getElementAttribute

    public static String getElementAttribute(Element element,
                                             String attrName)

  Get an attribute value of the given element.

  Parameters:
    `element` - The element to get the attribute value for.
  Returns:
    The attribute value or null.

### getElementContent

    public static String getElementContent(Element element)

  Get the content of the given element.

  Parameters:
    `element` - The element to get the content for.
  Returns:
    The content of the element or null.

### getElementContent

    public static String getElementContent(Element element,
                                           String defaultStr)

  Get the content of the given element.

  Parameters:
    `element` - The element to get the content for.
    `defaultStr` - The default to return when there is no content.
  Returns:
    The content of the element or the default.

### getFirstElementContent

    public static String getFirstElementContent(Element element,
                                                String defaultStr)

### getUniqueChildContent

    public static String getUniqueChildContent(Element element,
                                               String tagName)
                                        throws org.jboss.deployment.DeploymentException

  Macro to get the content of a unique child element.

  Parameters:
    `element` - The parent element.
    `tagName` - The name of the desired child.
  Returns:
    The element content or null.
  Throws:
    `org.jboss.deployment.DeploymentException`

### getOptionalChildContent

    public static String getOptionalChildContent(Element element,
                                                 String tagName)
                                          throws org.jboss.deployment.DeploymentException

  Macro to get the content of an optional child element.

  Parameters:
    `element` - The parent element.
    `tagName` - The name of the desired child.
  Returns:
    The element content or null.
  Throws:
    `org.jboss.deployment.DeploymentException`

### getOptionalChildContent

    public static String getOptionalChildContent(Element element,
                                                 String tagName,
                                                 String defaultValue)
                                          throws org.jboss.deployment.DeploymentException

  Macro to get the content of an optional child element with default value.

  Parameters:
    `element` - The parent element.
    `tagName` - The name of the desired child.
  Returns:
    The element content or null.
  Throws:
    `org.jboss.deployment.DeploymentException`

### getOptionalChildBooleanContent

    public static boolean getOptionalChildBooleanContent(Element element,
                                                         String name)
                                                  throws org.jboss.deployment.DeploymentException

  Throws:
    `org.jboss.deployment.DeploymentException`

### getOptionalChildBooleanContent

    public static boolean getOptionalChildBooleanContent(Element element,
                                                         String name,
                                                         boolean defaultValue)
                                                  throws org.jboss.deployment.DeploymentException

  Throws:
    `org.jboss.deployment.DeploymentException`

### clone

    public Object clone()

  Create a field wise copy of the object.

### importXml

    public void importXml(Element element)
                   throws org.jboss.deployment.DeploymentException

  Imports either the jboss or ejb-jar from the given element.

  Specified by:
    `importXml` in interface `XmlLoadable`
  Parameters:
    `element` - The element to import.
  Throws:
    `org.jboss.deployment.DeploymentException` - Unrecognized root tag.

### importEjbJarXml

    public void importEjbJarXml(Element element)
                         throws org.jboss.deployment.DeploymentException

  Non-operation.

  Parameters:
    `element` -
  Throws:
    `org.jboss.deployment.DeploymentException`

### importJbossXml

    public void importJbossXml(Element element)
                        throws org.jboss.deployment.DeploymentException

  Non-operation.

  Parameters:
    `element` -
  Throws:
    `org.jboss.deployment.DeploymentException`

### jdk13Enabled

    protected boolean jdk13Enabled()

  Check if we are running in a JDK v1.3 virtual machine or better.

  Returns:
    True if the virtual machine is v1.3 or better.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.