Examples of require()


Examples of javax.xml.stream.XMLStreamReader.require()

    public void testInterface() throws Exception {
        wsdlRegistry.loadDefinition("http://www.interfacestyles.org", getClass().getResource("interfacestyles.wsdl"), resourceLoader);
        String xml = "<interface.wsdl xmlns='http://www.osoa.org/xmlns/sca/0.9' interface='http://www.interfacestyles.org#TestInterfaceStylesService'></interface.wsdl>";
        XMLStreamReader reader = getReader(xml);
        WSDLServiceContract sc = (WSDLServiceContract) registry.load(reader, loaderContext);
        reader.require(XMLStreamConstants.END_ELEMENT, INTERFACE_WSDL.getNamespaceURI(), INTERFACE_WSDL.getLocalPart());
        assertEquals(XMLStreamConstants.END_DOCUMENT, reader.next());
        assertNotNull(sc);
       
        sc.initialize(modelContext);
       
View Full Code Here

Examples of javax.xml.stream.XMLStreamReader.require()

        String xml = "<externalService xmlns='http://www.osoa.org/xmlns/sca/0.9' name='test'></externalService>";
        XMLStreamReader reader = getReader(xml);
        ExternalService es = (ExternalService) registry.load(reader, loaderContext);
        assertNotNull(es);
        assertEquals("test", es.getName());
        reader.require(XMLStreamConstants.END_ELEMENT, EXTERNAL_SERVICE.getNamespaceURI(), EXTERNAL_SERVICE.getLocalPart());
        assertEquals(XMLStreamConstants.END_DOCUMENT, reader.next());
    }

    public void testInterface() throws XMLStreamException, ConfigurationLoadException {
        String interfaceName = MockService.class.getName();
View Full Code Here

Examples of javax.xml.stream.XMLStreamReader.require()

    public void testInterface() throws XMLStreamException, ConfigurationLoadException {
        String interfaceName = MockService.class.getName();
        String xml = "<externalService xmlns='http://www.osoa.org/xmlns/sca/0.9' name='test'><interface.java interface='" + interfaceName + "'/></externalService>";
        XMLStreamReader reader = getReader(xml);
        ExternalService es = (ExternalService) registry.load(reader, loaderContext);
        reader.require(XMLStreamConstants.END_ELEMENT, EXTERNAL_SERVICE.getNamespaceURI(), EXTERNAL_SERVICE.getLocalPart());
        assertEquals(XMLStreamConstants.END_DOCUMENT, reader.next());
        assertNotNull(es);
        assertEquals("test", es.getName());
        ConfiguredService configuredService = es.getConfiguredService();
        JavaServiceContract serviceContract = (JavaServiceContract) configuredService.getPort().getServiceContract();
View Full Code Here

Examples of javax.xml.stream.XMLStreamReader.require()

    public void testMinimal() throws XMLStreamException, ConfigurationLoadException {
        String xml = "<entryPoint xmlns='http://www.osoa.org/xmlns/sca/0.9' name='test'></entryPoint>";
        XMLStreamReader reader = getReader(xml);
        EntryPoint ep = (EntryPoint) registry.load(reader, loaderContext);
        reader.require(XMLStreamConstants.END_ELEMENT, ENTRY_POINT.getNamespaceURI(), ENTRY_POINT.getLocalPart());
        assertEquals(XMLStreamConstants.END_DOCUMENT, reader.next());
        assertNotNull(ep);
        assertEquals("test", ep.getName());
    }
View Full Code Here

Examples of javax.xml.stream.XMLStreamReader.require()

    public void testInterface() throws XMLStreamException, ConfigurationLoadException {
        String interfaceName = MockService.class.getName();
        String xml = "<entryPoint xmlns='http://www.osoa.org/xmlns/sca/0.9' name='test'><interface.java interface='" + interfaceName + "'/></entryPoint>";
        XMLStreamReader reader = getReader(xml);
        EntryPoint ep = (EntryPoint) registry.load(reader, loaderContext);
        reader.require(XMLStreamConstants.END_ELEMENT, ENTRY_POINT.getNamespaceURI(), ENTRY_POINT.getLocalPart());
        assertEquals(XMLStreamConstants.END_DOCUMENT, reader.next());
        assertNotNull(ep);
        assertEquals("test", ep.getName());
        ConfiguredService configuredService = ep.getConfiguredService();
        JavaServiceContract serviceContract = (JavaServiceContract) configuredService.getPort().getServiceContract();
View Full Code Here

Examples of org.exoplatform.web.application.JavascriptManager.require()

                if (fragmentResponse.getProperties().getTransportHeaders() != null) {
                    MultiValuedPropertyMap<String> transportHeaders = fragmentResponse.getProperties().getTransportHeaders();
                    for (String key : transportHeaders.keySet()) {
                        if (JAVASCRIPT_DEPENDENCY.equals(key)) {
                            for (String value : transportHeaders.getValues(key)) {
                                jsMan.require(value);
                            }
                        } else {
                            for (String value : transportHeaders.getValues(key)) {
                                prcontext.getResponse().setHeader(key, value);
                            }
View Full Code Here

Examples of org.exoplatform.web.application.JavascriptManager.require()

    public void processRender(WebuiRequestContext context) throws Exception {
        JavascriptManager jsmanager = context.getJavascriptManager();

        super.processRender(context);
        if (showMaskLayer) {
            jsmanager.require("SHARED/UIMaskLayer", "mask").addScripts("mask.createMask('UIPortalToolPanel', null, 10) ;");
        }
    }

    public boolean isShowMaskLayer() {
        return showMaskLayer;
View Full Code Here

Examples of org.exoplatform.web.application.JavascriptManager.require()

                UIWorkingWorkspace uiWorkingWS = Util.getUIPortalApplication().getChild(UIWorkingWorkspace.class);
                uiWorkingWS.updatePortletsByName("UserInfoPortlet");
                uiWorkingWS.updatePortletsByName("OrganizationPortlet");
            } else {
                JavascriptManager jsManager = Util.getPortalRequestContext().getJavascriptManager();
                jsManager.require("SHARED/base").addScripts(
                        "if(confirm('"
                                + Util.getPortalRequestContext().getApplicationResourceBundle()
                                        .getString("UIAccountProfiles.msg.NotExistingAccount") + "')) {eXo.portal.logout();}");
            }
        }
View Full Code Here

Examples of org.exoplatform.web.application.JavascriptManager.require()

                uiMaskWS.setShow(true);
                event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWS);
            } else {
                // Show message detail to user and then logout if user press ok button
                JavascriptManager jsManager = Util.getPortalRequestContext().getJavascriptManager();
                jsManager.require("SHARED/base").addScripts(
                        "if(confirm('"
                                + Util.getPortalRequestContext().getApplicationResourceBundle()
                                        .getString("UIAccountProfiles.msg.NotExistingAccount") + "')) {eXo.portal.logout();}");
            }
        }
View Full Code Here

Examples of org.exoplatform.web.application.JavascriptManager.require()

                UIWorkingWorkspace uiWorkingWS = Util.getUIPortalApplication().getChild(UIWorkingWorkspace.class);
                uiWorkingWS.updatePortletsByName("UserInfoPortlet");
                uiWorkingWS.updatePortletsByName("OrganizationPortlet");
            } else {
                JavascriptManager jsManager = Util.getPortalRequestContext().getJavascriptManager();
                jsManager.require("SHARED/base").addScripts(
                        "if(confirm('"
                                + Util.getPortalRequestContext().getApplicationResourceBundle()
                                .getString("UIAccountProfiles.msg.NotExistingAccount") + "')) {eXo.portal.logout();}");
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.