Examples of ExtensionConfiguration


Examples of com.microsoft.windowsazure.management.compute.models.ExtensionConfiguration

                    }
                }
               
                Element extensionConfigurationElement = XmlUtility.getElementByTagNameNS(deploymentElement, "http://schemas.microsoft.com/windowsazure", "ExtensionConfiguration");
                if (extensionConfigurationElement != null) {
                    ExtensionConfiguration extensionConfigurationInstance = new ExtensionConfiguration();
                    result.setExtensionConfiguration(extensionConfigurationInstance);
                   
                    Element allRolesSequenceElement = XmlUtility.getElementByTagNameNS(extensionConfigurationElement, "http://schemas.microsoft.com/windowsazure", "AllRoles");
                    if (allRolesSequenceElement != null) {
                        for (int i26 = 0; i26 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(allRolesSequenceElement, "http://schemas.microsoft.com/windowsazure", "Extension").size(); i26 = i26 + 1) {
                            org.w3c.dom.Element allRolesElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(allRolesSequenceElement, "http://schemas.microsoft.com/windowsazure", "Extension").get(i26));
                            ExtensionConfiguration.Extension extensionInstance = new ExtensionConfiguration.Extension();
                            extensionConfigurationInstance.getAllRoles().add(extensionInstance);
                           
                            Element idElement = XmlUtility.getElementByTagNameNS(allRolesElement, "http://schemas.microsoft.com/windowsazure", "Id");
                            if (idElement != null) {
                                String idInstance;
                                idInstance = idElement.getTextContent();
                                extensionInstance.setId(idInstance);
                            }
                        }
                    }
                   
                    Element namedRolesSequenceElement = XmlUtility.getElementByTagNameNS(extensionConfigurationElement, "http://schemas.microsoft.com/windowsazure", "NamedRoles");
                    if (namedRolesSequenceElement != null) {
                        for (int i27 = 0; i27 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(namedRolesSequenceElement, "http://schemas.microsoft.com/windowsazure", "Role").size(); i27 = i27 + 1) {
                            org.w3c.dom.Element namedRolesElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(namedRolesSequenceElement, "http://schemas.microsoft.com/windowsazure", "Role").get(i27));
                            ExtensionConfiguration.NamedRole roleInstance2 = new ExtensionConfiguration.NamedRole();
                            extensionConfigurationInstance.getNamedRoles().add(roleInstance2);
                           
                            Element roleNameElement3 = XmlUtility.getElementByTagNameNS(namedRolesElement, "http://schemas.microsoft.com/windowsazure", "RoleName");
                            if (roleNameElement3 != null) {
                                String roleNameInstance3;
                                roleNameInstance3 = roleNameElement3.getTextContent();
View Full Code Here

Examples of com.microsoft.windowsazure.management.compute.models.ExtensionConfiguration

                    }
                }
               
                Element extensionConfigurationElement = XmlUtility.getElementByTagNameNS(deploymentElement, "http://schemas.microsoft.com/windowsazure", "ExtensionConfiguration");
                if (extensionConfigurationElement != null) {
                    ExtensionConfiguration extensionConfigurationInstance = new ExtensionConfiguration();
                    result.setExtensionConfiguration(extensionConfigurationInstance);
                   
                    Element allRolesSequenceElement = XmlUtility.getElementByTagNameNS(extensionConfigurationElement, "http://schemas.microsoft.com/windowsazure", "AllRoles");
                    if (allRolesSequenceElement != null) {
                        for (int i26 = 0; i26 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(allRolesSequenceElement, "http://schemas.microsoft.com/windowsazure", "Extension").size(); i26 = i26 + 1) {
                            org.w3c.dom.Element allRolesElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(allRolesSequenceElement, "http://schemas.microsoft.com/windowsazure", "Extension").get(i26));
                            ExtensionConfiguration.Extension extensionInstance = new ExtensionConfiguration.Extension();
                            extensionConfigurationInstance.getAllRoles().add(extensionInstance);
                           
                            Element idElement = XmlUtility.getElementByTagNameNS(allRolesElement, "http://schemas.microsoft.com/windowsazure", "Id");
                            if (idElement != null) {
                                String idInstance;
                                idInstance = idElement.getTextContent();
                                extensionInstance.setId(idInstance);
                            }
                        }
                    }
                   
                    Element namedRolesSequenceElement = XmlUtility.getElementByTagNameNS(extensionConfigurationElement, "http://schemas.microsoft.com/windowsazure", "NamedRoles");
                    if (namedRolesSequenceElement != null) {
                        for (int i27 = 0; i27 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(namedRolesSequenceElement, "http://schemas.microsoft.com/windowsazure", "Role").size(); i27 = i27 + 1) {
                            org.w3c.dom.Element namedRolesElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(namedRolesSequenceElement, "http://schemas.microsoft.com/windowsazure", "Role").get(i27));
                            ExtensionConfiguration.NamedRole roleInstance2 = new ExtensionConfiguration.NamedRole();
                            extensionConfigurationInstance.getNamedRoles().add(roleInstance2);
                           
                            Element roleNameElement3 = XmlUtility.getElementByTagNameNS(namedRolesElement, "http://schemas.microsoft.com/windowsazure", "RoleName");
                            if (roleNameElement3 != null) {
                                String roleNameInstance3;
                                roleNameInstance3 = roleNameElement3.getTextContent();
View Full Code Here

Examples of com.tinkerpop.rexster.extension.ExtensionConfiguration

            }
        }).build());
    }

    private ElementIdHandler getElementIdHandler(final RexsterApplicationGraph rag) {
        final ExtensionConfiguration configuration = rag.findExtensionConfiguration(EXTENSION_NAMESPACE, EXTENSION_NAME);
        if (configuration == null) {
            return DEFAULT_ID_HANDLER;
        }

        final Map<String, String> map = configuration.tryGetMapFromConfiguration();
        final String idHandlerName = map.get(CONFIG_ID_HANDLER);

        if (idHandlerName.equals("orientdb"))
            return new OrientElementIdHandler();
        else if (idHandlerName.equals("titan-berkeleyje"))
View Full Code Here

Examples of com.tinkerpop.rexster.extension.ExtensionConfiguration

        final ExtensionMethod extensionMethod = rexsterResourceContext.getExtensionMethod();
        Map configurationMap = null;

        Iterator<String> scriptsToRun = null;
        try {
            final ExtensionConfiguration extensionConfiguration = rag != null ? rag.findExtensionConfiguration(EXTENSION_NAMESPACE, EXTENSION_NAME) : null;
            if (extensionConfiguration != null) {
                configurationMap = extensionConfiguration.tryGetMapFromConfiguration();
                scriptsToRun = getScriptsToRun(requestObject, configurationMap);
            }
        } catch (IOException ioe) {
            return ExtensionResponse.error(ioe,
                    generateErrorJson(extensionMethod.getExtensionApiAsJson()));
View Full Code Here

Examples of com.tinkerpop.rexster.extension.ExtensionConfiguration

    @ExtensionDefinition(extensionPoint = ExtensionPoint.GRAPH)
    @ExtensionDescriptor(description = "returns the configuration as JSON.")
    public ExtensionResponse doConfiguredWork(@RexsterContext RexsterApplicationGraph rag) {

        // finds the configuration settings from the configured graph
        ExtensionConfiguration configuration = rag.findExtensionConfiguration(EXTENSION_NAMESPACE, EXTENSION_NAME);
        Map<String, String> map = configuration.tryGetMapFromConfiguration();

        return ExtensionResponse.ok(map);
    }
View Full Code Here

Examples of com.tinkerpop.rexster.extension.ExtensionConfiguration

        }

        ExtensionResponse extensionResponse;
        FramedGraph framedGraph = factory.create(graph);

        ExtensionConfiguration extensionConfig = rexsterResourceContext.getRexsterApplicationGraph()
                .findExtensionConfiguration(EXTENSION_NAMESPACE, EXTENSION_NAME);
        Map<String, String> mapFrames = extensionConfig.tryGetMapFromConfiguration();

        if (mapFrames != null && !mapFrames.isEmpty()) {
            UriInfo uriInfo = rexsterResourceContext.getUriInfo();
            List<PathSegment> pathSegmentList = uriInfo.getPathSegments();
View Full Code Here

Examples of com.tinkerpop.rexster.extension.ExtensionConfiguration

        allowables.add("tp:*");
        rag.loadAllowableExtensions(allowables);

        rag.loadExtensionsConfigurations(list);

        ExtensionConfiguration extConfig = rag.findExtensionConfiguration("tp", "extensionname");
        Assert.assertNotNull(extConfig);
        Assert.assertEquals("extensionname", extConfig.getExtensionName());
        Assert.assertEquals("tp", extConfig.getNamespace());

        Assert.assertNotNull(extConfig.getConfiguration());

        Map map = extConfig.tryGetMapFromConfiguration();
        Assert.assertNotNull(map);
        Assert.assertTrue(map.containsKey("test"));
        Assert.assertEquals("1", map.get("test"));
    }
View Full Code Here

Examples of com.tinkerpop.rexster.extension.ExtensionConfiguration

    }

    @Test
    public void isConfigurationValidEmptyConfiguration() {
        HierarchicalConfiguration xmlConfig = new HierarchicalConfiguration();
        ExtensionConfiguration configuration = new ExtensionConfiguration("ns", "name", xmlConfig);
        Assert.assertFalse(this.framesExtension.isConfigurationValid(configuration));
    }
View Full Code Here

Examples of com.tinkerpop.rexster.extension.ExtensionConfiguration

    @Test
    public void isConfigurationValidNiceConfiguration() {
        HierarchicalConfiguration hc = new HierarchicalConfiguration();
        hc.addProperty("key1", "value1");
        hc.addProperty("key2", "value2");
        ExtensionConfiguration configuration = new ExtensionConfiguration("ns", "name", hc);
        Assert.assertTrue(this.framesExtension.isConfigurationValid(configuration));
    }
View Full Code Here

Examples of com.tinkerpop.rexster.extension.ExtensionConfiguration

    /**
     * Gets an extension configuration given a namespace and extension name.
     */
    public ExtensionConfiguration findExtensionConfiguration(final String namespace, final String extensionName) {
        ExtensionConfiguration extensionConfigurationFound = null;

        if (this.extensionConfigurations != null) {
            for (ExtensionConfiguration extensionConfiguration : this.extensionConfigurations) {
                if (extensionConfiguration.getExtensionName().equals(extensionName)
                        && extensionConfiguration.getNamespace().equals(namespace)) {
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.