Examples of tryGetMapFromConfiguration()


Examples of com.tinkerpop.rexster.extension.ExtensionConfiguration.tryGetMapFromConfiguration()

        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.tryGetMapFromConfiguration()

        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.tryGetMapFromConfiguration()

    @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.tryGetMapFromConfiguration()

        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.tryGetMapFromConfiguration()

        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
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.