Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.Descriptor


     */
    public String getModuleIDFromDD (File file) throws Exception {
        Archivist source = ArchivistFactory.getArchivistForArchive(file);
        InputJarArchive archive = new InputJarArchive();
        archive.open(file.getAbsolutePath());
        Descriptor descriptor = null;
        String moduleID = null;
        String displayName = null;
        try {
            descriptor = source.readStandardDeploymentDescriptor(archive);
        } catch (Exception ex) {
            //ignore
        }
        if (descriptor != null) {
            displayName = descriptor.getDisplayName();
        }
        if ((displayName != null) && (displayName.length() > 0)) {
            moduleID = displayName;
        } else {
            //We give up.  Use the uploaded file name instead
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

     * @return the DOM tree top node
     */
    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, EjbTagNames.EJB_REFERENCE_NAME, descriptor.getName());
        appendTextChild(ejbRefNode, EjbTagNames.EJB_REFERENCE_TYPE, descriptor.getType());
        if (descriptor.isLocal()) {
View Full Code Here

                        }
                    }
                }
                // we have the list of handler classes, we can now
                // push the context and call back annotation processing.                               
                Descriptor jndiContainer=null;
                if (serviceSideChain) {
                    WebServiceEndpoint endpoint = (WebServiceEndpoint) container;
                    if (ModuleType.WAR.equals(endpoint.getBundleDescriptor().getModuleType())) {
                        jndiContainer = endpoint.getBundleDescriptor();                
                    } else {
View Full Code Here

    */      
    public Object 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

     * 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

     * 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

    */      
    public Object getDescriptor() {
       
       if (descriptor==null) {
            descriptor = new LifecycleCallbackDescriptor();
            Descriptor parentDesc =
                (Descriptor)getParentNode().getDescriptor();
            if (parentDesc instanceof EjbDescriptor) {
                EjbDescriptor ejbDesc = (EjbDescriptor)parentDesc;
                descriptor.setDefaultLifecycleCallbackClass(
                    ejbDesc.getEjbClassName());
View Full Code Here

     * notification of the end of XML parsing for this node
     */
    public void postParsing() {
        Object o = getParentNode().getDescriptor();
        if (o instanceof SipApplication) {
            Descriptor descriptor = (Descriptor) o;
            if (getXMLRootTag().getQName().equals(SipTagNames.DESCRIPTION)) {
                ((SipApplication)descriptor).setDescription(localizedValue);
            }
        } else if (o instanceof EjbReferenceDescriptor ) {
            Descriptor descriptor = (Descriptor) o;
            if(getXMLRootTag().getQName().equals(SipTagNames.DESCRIPTION)) {
                ((EjbReferenceDescriptor)descriptor).setDescription(localizedValue);
            }
        }
    }    
View Full Code Here

    try {
        Context context = getVerifierContext();
        ClassLoader jcl = context.getClassLoader();
        Class c = Class.forName(descriptor.getEjbClassName(), false, getVerifierContext().getClassLoader());

        Descriptor persistentField;
        Field field;
        boolean oneFailed = false;
        while (iterator.hasNext()) {
      persistentField = (Descriptor)iterator.next();
      try {
          field = c.getField(persistentField.getName());
          result.addGoodDetails(smh.getLocalString
              ("tests.componentNameConstructor",
               "For [ {0} ]",
               new Object[] {compName.toString()}));
          result.passed(smh.getLocalString
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.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.