001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package javax.enterprise.deploy.model;
023:
024: import javax.enterprise.deploy.shared.ModuleType;
025:
026: /**
027: * A deployable object for an ear
028: *
029: * @author <a href="mailto:adrian@jboss.org">Adrian Brock</a>
030: * @version $Revision: 57196 $
031: */
032: public interface J2eeApplicationObject extends DeployableObject {
033: // Constants -----------------------------------------------------
034:
035: // Public --------------------------------------------------------
036:
037: /**
038: * Retrieve a deployable object
039: *
040: * @param uri describes where to get the deployable object
041: * @return the deployable object or null if there is no such object
042: */
043: DeployableObject getDeployableObject(String uri);
044:
045: /**
046: * Get all deployable objects in this application of the given module type
047: *
048: * @param type the module type
049: * @return the deployable objects or null if there are no such objects
050: */
051: DeployableObject[] getDeployableObjects(ModuleType type);
052:
053: /**
054: * Get all deployable objects in this application
055: *
056: * @return the deployable objects or null are no such objects
057: */
058: DeployableObject[] getDeployableObjects();
059:
060: /**
061: * Return the list of module uris for a give module type
062: *
063: * @param type the module type
064: * @return the uris or null if there are none
065: */
066: String[] getModuleUris(ModuleType type);
067:
068: /**
069: * Return the list of module uris
070: *
071: * @return the uris or null if there are none
072: */
073: String[] getModuleUris();
074:
075: /**
076: * Get the child elements with the specified xpath
077: *
078: * @param xpath the xpath of the children
079: * @return an array of children or null if there are none
080: */
081: DDBean[] getChildBean(ModuleType type, String xpath);
082:
083: /**
084: * Get the text for the given xpath
085: *
086: * @param xpath the xpath
087: * @return an array of Strings for the xpath or null if there are none
088: */
089: String[] getText(ModuleType type, String xpath);
090:
091: /**
092: * Register a listener for a given xpath
093: *
094: * @param xpath the xpath
095: * @param xpl the listener
096: */
097: void addXpathListener(ModuleType type, String xpath,
098: XpathListener xpl);
099:
100: /**
101: * Unregister a listener for a given xpath
102: *
103: * @param xpath the xpath
104: * @param xpl the listener
105: */
106: void removeXpathListener(ModuleType type, String xpath,
107: XpathListener xpl);
108: }
|