package com.tinkerpop.rexster.server;

import com.tinkerpop.blueprints.Graph;
import com.tinkerpop.rexster.RexsterApplicationGraph;
import org.apache.log4j.Logger;

/**
 * Configure a single existing graph into Rexster.  Useful in configuring Rexster for embedded applications.
 *
 * @author Marko A. Rodriguez (http://markorodriguez.com)
 * @author Stephen Mallette (http://stephen.genoprime.com)
 */
public class DefaultRexsterApplication extends AbstractMapRexsterApplication {

    private static final Logger logger = Logger.getLogger(DefaultRexsterApplication.class);

    /**
     * Constructs the DefaultRexsterApplication.
     *
     * @param graphName the name the graph will have in various Rexster contexts.
     * @param graph a graph instance.
     */
    public DefaultRexsterApplication(final String graphName, final Graph graph) {
        final RexsterApplicationGraph rag = new RexsterApplicationGraph(graphName, graph);
        this.graphs.put(graphName, rag);
        logger.info(String.format("Graph [%s] loaded", rag.getGraph()));
    }
}

@@ -147,20 +147,139 @@
 che.
-log4j.Logger
+commons.configuration.HierarchicalConfiguration;%0Aimport org.apache.log4j.Logger;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List
 ;%0A%0A/
@@ -743,16 +743,130 @@
 ication.
+ With this constructor all extensions are allowed which is likely%0A     * the expected case in an embedded setting.
 %0A     *%0A
@@ -1087,204 +1087,1306 @@
     
-final RexsterApplicationGraph rag = new RexsterApplicationGraph(graphName, graph);%0A        this.graphs.put(graphName, rag);%0A        logger.info(String.format(%22Graph %5B%25s%5D loaded%22, rag.getGraph()));
+this(graphName, graph, new ArrayList%3CString%3E()%7B%7B add(%22*:*%22); %7D%7D, null);%0A    %7D%0A%0A    /**%0A     * Constructs the DefaultRexsterApplication.%0A     *%0A     * @param graphName the name the graph will have in various Rexster contexts.%0A     * @param graph a graph instance.%0A     * @param allowableNamespaces list of namespace strings that are allowed for this graph.%0A     * @param extensionConfigurations configurations from rexster.xml for extensions. this value may be null.%0A     */%0A    public DefaultRexsterApplication(final String graphName, final Graph graph, final List%3CString%3E allowableNamespaces,%0A                                     final List%3CHierarchicalConfiguration%3E extensionConfigurations) %7B%0A        final RexsterApplicationGraph rag = new RexsterApplicationGraph(graphName, graph);%0A        rag.loadAllowableExtensions(allowableNamespaces);%0A        configureExtensions(extensionConfigurations, rag);%0A%0A        this.graphs.put(graphName, rag);%0A        logger.info(String.format(%22Graph %5B%25s%5D loaded%22, rag.getGraph()));%0A%0A    %7D%0A%0A    private static void configureExtensions(final List%3CHierarchicalConfiguration%3E extensionConfigurations, final RexsterApplicationGraph rag) %7B%0A        if (extensionConfigurations != null) %7B%0A            rag.loadExtensionsConfigurations(extensionConfigurations);%0A        %7D
 %0A   

Configure extensions in embedded mode.