Home » jboss-javaee-sources » javax.enterprise.deploy » model » [javadoc | source]

    1   /*
    2   * JBoss, Home of Professional Open Source
    3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
    4   * by the @authors tag. See the copyright.txt in the distribution for a
    5   * full listing of individual contributors.
    6   *
    7   * This is free software; you can redistribute it and/or modify it
    8   * under the terms of the GNU Lesser General Public License as
    9   * published by the Free Software Foundation; either version 2.1 of
   10   * the License, or (at your option) any later version.
   11   *
   12   * This software is distributed in the hope that it will be useful,
   13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   15   * Lesser General Public License for more details.
   16   *
   17   * You should have received a copy of the GNU Lesser General Public
   18   * License along with this software; if not, write to the Free
   19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
   20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
   21   */
   22   package javax.enterprise.deploy.model;
   23   
   24   /**
   25    * A fragment of a standard deployment descriptor.
   26    *
   27    * @author <a href="mailto:adrian@jboss.org">Adrian Brock</a>
   28    * @version $Revision: 37459 $
   29    */
   30   public interface DDBean
   31   {
   32      // Constants -----------------------------------------------------
   33      
   34      // Public --------------------------------------------------------
   35   
   36      /**
   37       * Returns the original xpath string provided by the DConfigBean
   38       *
   39       * @return the xpath
   40       */
   41      String getXpath();
   42      
   43      /**
   44       * Returns the XML text for this bean
   45       *
   46       * @return the text
   47       */
   48      String getText();
   49      
   50      /**
   51       * Returns the tool specific attribute ID
   52       *
   53       * @return the id or null if there is no id
   54       */
   55      String getId();
   56      
   57      /**
   58       * Get the root element
   59       *
   60       * @return the root element
   61       */
   62      DDBeanRoot getRoot();
   63      
   64      /**
   65       * Get the child elements with the specified xpath
   66       *
   67       * @param xpath the xpath of the children
   68       * @return an array of children or null if there are none
   69       */
   70      DDBean[] getChildBean(String xpath);
   71      
   72      /**
   73       * Get the text for the given xpath
   74       *
   75       * @param xpath the xpath
   76       * @return an array of Strings for the xpath or null if there are none
   77       */
   78      String[] getText(String xpath);
   79      
   80      /**
   81       * Register a listener for a given xpath
   82       *
   83       * @param xpath the xpath
   84       * @param xpl the listener
   85       */
   86      void addXpathListener(String xpath, XpathListener xpl);
   87      
   88      /**
   89       * Unregister a listener for a given xpath
   90       *
   91       * @param xpath the xpath
   92       * @param xpl the listener
   93       */
   94      void removeXpathListener(String xpath, XpathListener xpl);
   95      
   96      /**
   97       * Returns the list of attributes associated with this element
   98       *
   99       * @return the list of attributes
  100       */
  101      String[] getAttributeNames();
  102      
  103      /**
  104       * Get the value for a given attribute
  105       *
  106       * @param attrName the attribute name
  107       * @return the value
  108       */
  109      String getAttributeValue(String attrName);
  110   }

Home » jboss-javaee-sources » javax.enterprise.deploy » model » [javadoc | source]