Package org.jvnet.glassfish.comms.deployment.backend

Examples of org.jvnet.glassfish.comms.deployment.backend.SipBundleDescriptor


    }

    public Map<String, String> readRunAs(BundleDescriptor descriptor, Map<String, String> srMap) {
        Map runAs = new HashMap<String, String>();
        if (descriptor instanceof SipBundleDescriptor) {
            SipBundleDescriptor sbd = (SipBundleDescriptor) descriptor;
            SunWebApp sunSipDesc = sbd.getSipApplication().getSunSipDescriptor();
            Servlet[] servlets = sunSipDesc.getServlet();
            if (servlets != null) {
                for (int i = 0; i < servlets.length; i++) {
                    Servlet servlet = servlets[i];
                    String prinName = servlet.getPrincipalName();
View Full Code Here


        if (!(descriptor instanceof SipBundleDescriptor)) {
            throw new IllegalArgumentException(getClass() +
                " cannot handles descriptors of type " + descriptor.getClass());
        }

        SipBundleDescriptor bundleDescriptor = (SipBundleDescriptor) descriptor;
        Element web = (Element) super.writeDescriptor(parent, descriptor);

        SunSipApp sunSipApp = bundleDescriptor.getSipApplication().
                getSunSipDescriptor();

        // security-role-mapping
        SecurityRoleMapping[] roleMappings = sunSipApp.getSecurityRoleMapping();

        if ((roleMappings != null) && (roleMappings.length > 0)) {
            SecurityRoleMappingNode srmn = new SecurityRoleMappingNode();

            for (int i = 0; i < roleMappings.length; i++) {
                srmn.writeDescriptor(web,
                    RuntimeTagNames.SECURITY_ROLE_MAPPING, roleMappings[i]);
            }
        }

        if (sunSipApp.getSessionConfig() != null) {
            SessionConfigNode scn = new SessionConfigNode();
            scn.writeDescriptor(web, RuntimeTagNames.SESSION_CONFIG,
                sunSipApp.getSessionConfig());
        }

        // ejb-ref*
        EjbRef[] ejbRefs = sunSipApp.getEjbRef();

        if ((ejbRefs != null) && (ejbRefs.length > 0)) {
            EjbRefNode node = new EjbRefNode();

            for (int i = 0; i < ejbRefs.length; i++) {
                node.writeDescriptor(web, RuntimeTagNames.EJB_REF, ejbRefs[i]);
            }
        }

        // resource-ref*
        ResourceRef[] resourceRefs = sunSipApp.getResourceRef();

        if ((resourceRefs != null) && (resourceRefs.length > 0)) {
            ResourceRefNode node = new ResourceRefNode();

            for (int i = 0; i < resourceRefs.length; i++) {
                node.writeDescriptor(web, RuntimeTagNames.RESOURCE_REF,
                    resourceRefs[i]);
            }
        }

        // resource-env-ref*
        ResourceEnvRef[] resourceEnvRefs = sunSipApp.getResourceEnvRef();

        if ((resourceEnvRefs != null) && (resourceEnvRefs.length > 0)) {
            ResourceEnvRefNode node = new ResourceEnvRefNode();

            for (int i = 0; i < resourceEnvRefs.length; i++) {
                node.writeDescriptor(web, RuntimeTagNames.RESOURCE_ENV_REF,
                    resourceEnvRefs[i]);
            }
        }

        // service-ref*
        if (bundleDescriptor.hasServiceReferenceDescriptors()) {
            ServiceRefNode serviceNode = new ServiceRefNode();

            for (Iterator serviceItr = bundleDescriptor.getServiceReferenceDescriptors()
                                                       .iterator();
                    serviceItr.hasNext();) {
                ServiceReferenceDescriptor next = (ServiceReferenceDescriptor) serviceItr.next();
                serviceNode.writeDescriptor(web,
                    WebServicesTagNames.SERVICE_REF, next);
View Full Code Here

TOP

Related Classes of org.jvnet.glassfish.comms.deployment.backend.SipBundleDescriptor

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.