Package org.glassfish.deployment.common

Examples of org.glassfish.deployment.common.Descriptor


      // Make jndi name flat so it won't result in the creation of
      // a bunch of sub-contexts.
      String flattedJndiName = ejbEnv.getJndiName().replace('/', '.');

      EjbBundleDescriptor ejbBundle = ejbEnv.getEjbBundleDescriptor();
      Descriptor d = ejbBundle.getModuleDescriptor().getDescriptor();
      // if this EJB is in a war file, use the same component ID
      // as the web bundle, because they share the same JNDI namespace
      if (d instanceof WebBundleDescriptor) {
        // copy of code below
        WebBundleDescriptor webEnv = (WebBundleDescriptor) d;
View Full Code Here


    * Returns true if I have an ejb descriptor by that name.
    */
    @Override
    public boolean hasEjbByName(String name) {
    for (Iterator itr = getEjbs().iterator(); itr.hasNext();) {
        Descriptor next = (Descriptor) itr.next();
        if (next.getName().equals(name)) {
        return true;
        }
    }
    return false;
    }
View Full Code Here

    * Returns true if I have an ejb descriptor by that name.
    */
    @Override
    public boolean hasEjbByName(String name) {
    for (Iterator itr = getEjbs().iterator(); itr.hasNext();) {
        Descriptor next = (Descriptor) itr.next();
        if (next.getName().equals(name)) {
        return true;
        }
    }
    return false;
    }
View Full Code Here

     * notification of the end of XML parsing for this node
     */
    public void postParsing() {
        Object o = getParentNode().getDescriptor();   
        if (o!=null && o instanceof Descriptor) {
            Descriptor descriptor = (Descriptor) o;
            if (largeIcon!=null) {
                descriptor.setLocalizedLargeIconUri(lang, largeIcon);
            }
            if (smallIcon!=null) {
                descriptor.setLocalizedSmallIconUri(lang, smallIcon);
            }           
        }
    }
View Full Code Here

    @Override
    public LifecycleCallbackDescriptor getDescriptor() {
       
       if (descriptor==null) {
            descriptor = new LifecycleCallbackDescriptor();
            Descriptor parentDesc = (Descriptor)getParentNode().getDescriptor();
            if (parentDesc instanceof EjbDescriptor) {
                EjbDescriptor ejbDesc = (EjbDescriptor)parentDesc;
                descriptor.setDefaultLifecycleCallbackClass(
                    ejbDesc.getEjbClassName());
            } else if (parentDesc instanceof EjbInterceptor) {
View Full Code Here

        if (descriptor != null) {

            CommonResourceValidator commonResourceValidator = allResourceDescriptors.get(name);
            if (commonResourceValidator != null) {
                Descriptor existingDescriptor = commonResourceValidator.getDescriptor();
                if (descriptor instanceof MailSessionDescriptor && existingDescriptor instanceof MailSessionDescriptor) {
                    if (!descriptor.equals(existingDescriptor)) {
                        allUniqueResource = false;
                        return true;
                    } else {
View Full Code Here

     * notification of the end of XML parsing for this node
     */
    public void postParsing() {
        Object o = getParentNode().getDescriptor();
        if (o instanceof Descriptor) {
            Descriptor descriptor = (Descriptor) o;
            if (getXMLRootTag().getQName().equals(TagNames.DESCRIPTION)) {
                descriptor.setLocalizedDescription(lang, localizedValue);
            } else
            if (getXMLRootTag().getQName().equals(TagNames.NAME)) {
                descriptor.setLocalizedDisplayName(lang, localizedValue);
            }
        }
    }   
View Full Code Here

     * notify of a new prefix mapping used in this document
     */
    public void addPrefixMapping(String prefix, String uri) {
        Object o = getDescriptor();
        if (o instanceof Descriptor) {
            Descriptor descriptor = (Descriptor) o;
            descriptor.addPrefixMapping(prefix, uri);
        }
    }       
View Full Code Here

    @Override
    public Node writeDescriptor(Node parent, String nodeName, EjbReference descriptor) {   
        Node ejbRefNode = appendChild(parent, nodeName);
        if (descriptor instanceof Descriptor) {
            Descriptor ejbRefDesc = (Descriptor)descriptor;
            writeLocalizedDescriptions(ejbRefNode, ejbRefDesc);
        }
        appendTextChild(ejbRefNode, TagNames.EJB_REFERENCE_NAME, descriptor.getName());
        appendTextChild(ejbRefNode, TagNames.EJB_REFERENCE_TYPE, descriptor.getType());
        if (descriptor.isLocal()) {
View Full Code Here

     * notify of a new prefix mapping used in this document
     */
    public void addPrefixMapping(String prefix, String uri) {
        Object o = getDescriptor();
        if (o instanceof Descriptor) {
            Descriptor descriptor = (Descriptor) o;
            descriptor.addPrefixMapping(prefix, uri);
        }
    }       
View Full Code Here

TOP

Related Classes of org.glassfish.deployment.common.Descriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.