clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [11/51] [partial] clerezza git commit: CLEREZZA-966: started hierarchical project structure, moved platform bundles to platform, only moved RDF artifacts ported to use commons to the rdf folder.
Date Sun, 22 Mar 2015 12:11:07 GMT
http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.scripting.scriptmanager/src/main/java/org/apache/clerezza/platform/scripting/scriptmanager/ScriptManager.java
----------------------------------------------------------------------
diff --git a/platform.scripting.scriptmanager/src/main/java/org/apache/clerezza/platform/scripting/scriptmanager/ScriptManager.java b/platform.scripting.scriptmanager/src/main/java/org/apache/clerezza/platform/scripting/scriptmanager/ScriptManager.java
deleted file mode 100644
index 5b13c6c..0000000
--- a/platform.scripting.scriptmanager/src/main/java/org/apache/clerezza/platform/scripting/scriptmanager/ScriptManager.java
+++ /dev/null
@@ -1,849 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.scripting.scriptmanager;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.security.AccessControlException;
-import java.security.AccessController;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.UUID;
-import javax.script.ScriptException;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.FormParam;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-import javax.ws.rs.core.UriInfo;
-import org.osgi.framework.Bundle;
-import org.osgi.service.component.ComponentContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.clerezza.jaxrs.utils.RedirectUtil;
-import org.apache.clerezza.jaxrs.utils.TrailingSlash;
-import org.apache.clerezza.jaxrs.utils.form.FormFile;
-import org.apache.clerezza.jaxrs.utils.form.MultiPartBody;
-import org.apache.clerezza.platform.content.DiscobitsHandler;
-import org.apache.clerezza.platform.globalmenu.GlobalMenuItem;
-import org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider;
-import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
-import org.apache.clerezza.platform.scripting.NoEngineException;
-import org.apache.clerezza.platform.scripting.ScriptExecution;
-import org.apache.clerezza.platform.scripting.ScriptLanguageDescription;
-import org.apache.clerezza.platform.scripting.scriptmanager.ontology.SCRIPTMANAGER;
-import org.apache.clerezza.platform.typerendering.RenderletManager;
-import org.apache.clerezza.platform.typerendering.seedsnipe.SeedsnipeRenderlet;
-import org.apache.clerezza.platform.typerendering.scalaserverpages.ScalaServerPagesRenderlet;
-import org.apache.clerezza.rdf.core.BNode;
-import org.apache.clerezza.rdf.core.LiteralFactory;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.NonLiteral;
-import org.apache.clerezza.rdf.core.Triple;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.access.security.TcPermission;
-import org.apache.clerezza.rdf.core.impl.PlainLiteralImpl;
-import org.apache.clerezza.rdf.core.impl.SimpleMGraph;
-import org.apache.clerezza.rdf.core.impl.TripleImpl;
-import org.apache.clerezza.rdf.ontologies.DCTERMS;
-import org.apache.clerezza.rdf.ontologies.PLATFORM;
-import org.apache.clerezza.rdf.ontologies.RDF;
-import org.apache.clerezza.rdf.ontologies.SCRIPT;
-import org.apache.clerezza.rdf.utils.GraphNode;
-import org.apache.clerezza.rdf.utils.RdfList;
-import org.apache.clerezza.rdf.utils.UnionMGraph;
-import org.apache.clerezza.web.fileserver.BundlePathNode;
-import org.apache.clerezza.web.fileserver.FileServer;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Property;
-import org.apache.felix.scr.annotations.Reference;
-import org.apache.felix.scr.annotations.Service;
-import org.apache.felix.scr.annotations.Services;
-import org.wymiwyg.commons.util.dirbrowser.PathNode;
-
-/**
- *
- * Script Manager (/admin/scripting)
- *
- * Allows to install, delete, edit and execute script using a web front end.
- *
- * Also enables creating and deleting of execution URIs for scripts.
- *
- * @author daniel, marc
- */
-@Component
-@Services({
-    @Service(value=Object.class),
-    @Service(value=GlobalMenuItemsProvider.class)
-})
-@Property(name="javax.ws.rs", boolValue=true)
-@Path("/admin/scripting")
-public class ScriptManager implements GlobalMenuItemsProvider{
-
-    private final Logger logger = LoggerFactory.getLogger(getClass());
-
-    @Reference
-    private RenderletManager renderletManager;
-
-    @Reference
-    private ContentGraphProvider cgProvider;
-
-    @Reference
-    private DiscobitsHandler contentHandler;
-
-    @Reference
-    private ScriptExecution scriptExecution;
-
-    private FileServer fileServer;
-    
-    /**
-     * Called when bundle is activated.
-     *
-     * Registers templates.
-     *
-     * @param componentContext  the context.
-     * @throws IOException
-     * @throws URISyntaxException
-     */
-    protected void activate(final ComponentContext componentContext)
-            throws IOException, URISyntaxException {
-        logger.info("Script Manager activated.");
-
-        Bundle bundle = componentContext.getBundleContext().getBundle();
-        URL resourceDir = getClass().getResource("staticweb");
-        PathNode pathNode = new BundlePathNode(bundle, resourceDir.getPath());
-        logger.info("Initializing file server for {} ({})", resourceDir,
-                resourceDir.getFile());
-
-        fileServer = new FileServer(pathNode);
-        URL renderlet = getClass().getResource("scriptmanager-script-overview.ssp");
-        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
-                new UriRef(renderlet.toURI().toString()),
-                SCRIPTMANAGER.ScriptManagerOverviewPage,
-                "naked", MediaType.APPLICATION_XHTML_XML_TYPE, true);
-        renderlet = getClass().getResource("scriptmanager-script-list.xhtml");
-        renderletManager.registerRenderlet(SeedsnipeRenderlet.class.getName(),
-                new UriRef(renderlet.toURI().toString()),
-                SCRIPTMANAGER.ScriptList,
-                "naked" , MediaType.APPLICATION_XHTML_XML_TYPE, true);
-        renderlet = getClass().getResource("scriptmanager-script-install.ssp");
-        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
-                new UriRef(renderlet.toURI().toString()),
-                SCRIPTMANAGER.ScriptManagerInstallPage,
-                "naked" , MediaType.APPLICATION_XHTML_XML_TYPE, true);
-        renderlet = getClass().getResource("scriptmanager-execution-uri-overview.ssp");
-        renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
-                new UriRef(renderlet.toURI().toString()),
-                SCRIPTMANAGER.ExecutionUriOverviewPage,
-                "naked" , MediaType.APPLICATION_XHTML_XML_TYPE, true);
-        renderlet = getClass().getResource("scriptmanager-execution-uri-list.xhtml");
-        renderletManager.registerRenderlet(SeedsnipeRenderlet.class.getName(),
-                new UriRef(renderlet.toURI().toString()),
-                SCRIPTMANAGER.ExecutionUriList,
-                "naked" , MediaType.APPLICATION_XHTML_XML_TYPE, true);
-        renderlet = getClass().getResource("scriptmanager-script-information.xhtml");
-        renderletManager.registerRenderlet(SeedsnipeRenderlet.class.getName(),
-                new UriRef(renderlet.toURI().toString()),
-                SCRIPTMANAGER.SelectedScript,
-                "naked" , MediaType.APPLICATION_XHTML_XML_TYPE, true);
-
-    }
-
-    /**
-     * Redirects to the overview page
-     *
-     * @return  Redirect to overview page.
-     *
-     */
-    @GET
-    public Response redirectToOverviewPage(@Context UriInfo uriInfo) {
-        if (uriInfo.getAbsolutePath().toString().endsWith("/")) {
-            return RedirectUtil.createSeeOtherResponse(
-                    "script-overview", uriInfo);
-        }
-        return RedirectUtil.createSeeOtherResponse(
-                "scripting/script-overview", uriInfo);
-    }
-
-    /**
-     * The overview page.
-     *
-     * @param  the script URI
-     * @return  Graphnode containing ScriptManagerOverviewPage.
-     */
-    @GET
-    @Path("script-overview")
-    public GraphNode overview(
-            @QueryParam(value = "script") UriRef script) {
-
-        AccessController.checkPermission(new ScriptManagerAppPermission());
-        MGraph contentGraph = cgProvider.getContentGraph();
-        BNode resultResource = new BNode();
-        MGraph resultGraph = new SimpleMGraph();
-        
-        GraphNode scriptNode = null;
-        if(script != null){
-            scriptNode = getScript(script);
-            resultGraph.add(new TripleImpl(resultResource, 
-                    SCRIPTMANAGER.script,
-                    scriptNode.getNode()));
-        }
-        resultGraph.add(new TripleImpl(resultResource,
-                RDF.type,
-                PLATFORM.HeadedPage));
-        resultGraph.add(new TripleImpl(resultResource, 
-                RDF.type,
-                SCRIPTMANAGER.ScriptManagerOverviewPage));
-        GraphNode scriptList = getScriptList(resultResource);
-
-        UnionMGraph unionGraph = null;
-        if(scriptNode != null){
-            unionGraph = new UnionMGraph(resultGraph, scriptList.getGraph(),
-                    scriptNode.getGraph(), contentGraph);
-        } else {
-            unionGraph = new UnionMGraph(resultGraph, scriptList.getGraph(),
-                contentGraph);
-        }
-        
-        return new GraphNode(resultResource, unionGraph);
-    }
-
-    /**
-     * Returns a selected script node which has a property that points to the
-     * specified script resource and conains the decoded script code and
-     * the available script languages.
-     *
-     * @param scriptUri  the URI of the script resource.
-     * @return  {@code GraphNode} containing the selected script.
-     *
-     * @see SCRIPTMANAGER#SelectedScript
-     */
-    @GET
-    @Path("get-script")
-    @Produces("text/plain")
-    public GraphNode getScript(
-            @QueryParam(value = "script") UriRef scriptUri){
-
-        AccessController.checkPermission(new ScriptManagerAppPermission());
-        BNode resource = new BNode();
-        MGraph resultGraph = new SimpleMGraph();
-
-
-        resultGraph.add(new TripleImpl(resource, 
-                SCRIPTMANAGER.script,
-                scriptUri));
-        resultGraph.add(new TripleImpl(resource, 
-                RDF.type,
-                SCRIPTMANAGER.SelectedScript));
-        resultGraph.add(new TripleImpl(scriptUri,
-                SCRIPTMANAGER.code, 
-                new PlainLiteralImpl(
-                    new String(contentHandler.getData(scriptUri)))));
-
-        GraphNode scriptLanguageList = getScriptLanguageList(resource);
-
-        return new GraphNode(resource, new UnionMGraph(resultGraph,
-                cgProvider.getContentGraph(), scriptLanguageList.getGraph()));
-    }
-
-    /**
-     * Returns the menu with available scripts as GraphNode.
-     *
-     * @param resource  The resource to which to attach the list.
-     * @return {@link GraphNode} containing all available script resources.
-     * 
-     */
-    @GET
-    @Path("script-list")
-    @Produces("text/plain")
-    public GraphNode getScriptList(
-            @QueryParam(value = "resource") UriRef uriRef) {
-        return getScriptList((NonLiteral)uriRef);
-    }
-
-    private GraphNode getScriptList(
-            @QueryParam(value = "resource") NonLiteral resource) {
-        AccessController.checkPermission(new ScriptManagerAppPermission());
-        if(resource == null) {
-            resource = new BNode();
-        }
-
-        BNode resultResource = new BNode();
-        MGraph contentGraph = cgProvider.getContentGraph();
-        
-        MGraph additionGraph = new SimpleMGraph();
-
-        UnionMGraph resultGraph = new UnionMGraph(additionGraph, contentGraph);
-
-        RdfList list = RdfList.createEmptyList(resultResource, additionGraph);
-        resultGraph.add(new TripleImpl(resource,
-                SCRIPTMANAGER.scriptList, resultResource));
-        resultGraph.add(new TripleImpl(resultResource, RDF.type,
-                SCRIPTMANAGER.ScriptList));
-        
-        Iterator<Triple> it =
-                contentGraph.filter(null, RDF.type, SCRIPT.Script);
-        while (it.hasNext()) {
-            list.add(it.next().getSubject());
-        }
-        return new GraphNode(resultResource,
-                new UnionMGraph(resultGraph, contentGraph));
-    }
-
-    /**
-     * The page that contains the install form.
-     *
-     * @return  a Graphnode containing a ScriptManagerInstallPage.
-     */
-    @GET
-    @Path("script-install")
-    public GraphNode install() {
-
-        AccessController.checkPermission(new ScriptManagerAppPermission());
-        MGraph contentGraph = cgProvider.getContentGraph();
-        BNode resultResource = new BNode();
-        MGraph resultGraph = new SimpleMGraph();
-        resultGraph.add(new TripleImpl(resultResource, 
-                RDF.type,
-                SCRIPTMANAGER.ScriptManagerInstallPage));
-        resultGraph.add(new TripleImpl(resultResource,
-                RDF.type, PLATFORM.HeadedPage));
-        
-        GraphNode languageList = getScriptLanguageList(resultResource);
-        
-        GraphNode scriptList = getScriptList(resultResource);
-        
-        UnionMGraph unionGraph = new UnionMGraph(resultGraph,
-                scriptList.getGraph(), languageList.getGraph(), contentGraph);
-        
-        return new GraphNode(resultResource, unionGraph);
-    }
-
-    private GraphNode getScriptLanguageList(NonLiteral resource){
-        MGraph resultGraph = new SimpleMGraph();
-        Iterator<ScriptLanguageDescription> it =
-                scriptExecution.getInstalledScriptLanguages();
-        while(it.hasNext()){
-            BNode languageDescription = new BNode();
-            ScriptLanguageDescription sld = it.next();
-            resultGraph.add(new TripleImpl(resource,
-                    SCRIPTMANAGER.scriptLanguageDescription,
-                    languageDescription));
-
-            resultGraph.add(new TripleImpl(languageDescription, 
-                    SCRIPT.scriptLanguage, 
-                    LiteralFactory.getInstance().
-                    createTypedLiteral(sld.getLanguage())));
-            resultGraph.add(new TripleImpl(languageDescription,
-                    SCRIPT.scriptLanguageVersion,
-                    LiteralFactory.getInstance().
-                    createTypedLiteral(sld.getVersion())));
-        }
-        return new GraphNode(resource, resultGraph);
-    }
-
-    /**
-     * Installs a script.
-     *
-     * @param form  the install form containing the script data.
-     * @return
-     *            BAD_REQUEST on invalid data, redirect to overview page otherwise.
-     *
-     */
-    @POST
-    @Consumes("multipart/form-data")
-    @Path("install-script")
-    public Response installScript(MultiPartBody form,
-            @Context UriInfo uriInfo) {
-
-        AccessController.checkPermission(new ScriptManagerAppPermission());
-        TrailingSlash.enforceNotPresent(uriInfo);
-        
-        URI absolutePath = uriInfo.getAbsolutePath();
-        final String baseUriString = absolutePath.getScheme() + "://" +
-                absolutePath.getAuthority() + "/scripts/" +
-                UUID.randomUUID().toString();
-        UriRef scriptUri = new UriRef(baseUriString);
-        int counter = 0;
-        while (contentHandler.getData(scriptUri) != null) {
-            counter++;
-            scriptUri = new UriRef(baseUriString + "." + counter);
-        }
-
-        String scriptExecutionUri =
-                form.getTextParameterValues("scriptExecutionUri")[0];
-        String scriptLanguageAndVersion =
-                form.getTextParameterValues("scriptLanguage")[0];
-        String mediaType = form.getTextParameterValues("mediaType")[0];
-        String producedType =
-                form.getTextParameterValues("producedType")[0];
-
-        ScriptLanguageDescription sld =
-                extractLanguageAndVersion(scriptLanguageAndVersion);
-
-
-        String fileChoice = form.getTextParameterValues("fileChoice")[0];
-        String scriptName = "unnamed";
-
-        byte[] scriptFileBytes = new byte[0];
-
-        if(fileChoice.equals("file")) {
-            FormFile formFile =
-                    form.getFormFileParameterValues("scriptFile")[0];
-            scriptFileBytes = formFile.getContent();
-
-            if (scriptFileBytes == null || (scriptFileBytes.length == 0)) {
-                String message = "no script uploaded";
-                logger.warn(message);
-                throw new WebApplicationException(Response.status(
-                        Status.BAD_REQUEST).entity(message).build());
-            }
-
-            scriptName = formFile.getFileName();
-
-            if(mediaType.trim().equals("")) {
-                mediaType = formFile.getMediaType().toString();
-            }
-        } else if(fileChoice.equals("text")) {
-            if(form.getTextParameterValues("scriptCode").length > 0) {
-                scriptFileBytes = form.getTextParameterValues("scriptCode")[0].
-                        getBytes();
-            }
-            if(form.getTextParameterValues("scriptName").length > 0) {
-                scriptName = form.getTextParameterValues("scriptName")[0];
-                if(scriptName.trim().equals("")) {
-                    scriptName = "unnamed";
-                }
-            }
-            if(mediaType.trim().equals("")) {
-                mediaType = "text/plain";
-            }
-        }
-
-        if(!scriptExecutionUri.trim().equals("")) {
-            if(!saveExecutionUri(scriptExecutionUri, scriptUri)) {
-                logger.warn("The execution URI {} is already used.",
-                        scriptExecutionUri);
-                return Response.status(Status.BAD_REQUEST).build();
-            }
-        }
-        saveScript(scriptUri, scriptFileBytes, scriptName,
-                sld.getLanguage(), sld.getVersion(), mediaType, producedType);
-        
-        return RedirectUtil.createSeeOtherResponse("script-overview", uriInfo);
-    }
-
-    /**
-     * Updates a script.
-     *
-     * @param form  the update form containing the script data.
-     * @return   Redirect to overview page.
-     *
-     */
-    @POST
-    @Consumes("multipart/form-data")
-    @Path("update-script")
-    public Response updateScript(MultiPartBody form, @Context UriInfo uriInfo) {
-        AccessController.checkPermission(new ScriptManagerAppPermission());
-        UriRef scriptUri =
-                new UriRef(form.getTextParameterValues("scriptUri")[0]);
-
-        String scriptName = form.getTextParameterValues("fileName")[0];
-        String scriptLanguageAndVersion =
-                form.getTextParameterValues("scriptLanguage")[0];
-        String mediaType = form.getTextParameterValues("mediaType")[0];
-        String producedType =
-                form.getTextParameterValues("producedType")[0];
-        String scriptCode = form.getTextParameterValues("scriptCode")[0];
-
-        ScriptLanguageDescription sld =
-                extractLanguageAndVersion(scriptLanguageAndVersion);
-
-        FormFile formFile =
-                form.getFormFileParameterValues("scriptFile")[0];
-        
-        byte[] scriptFileBytes = formFile.getContent();
-
-
-
-        if (scriptFileBytes == null || (scriptFileBytes.length == 0)) {
-            scriptFileBytes = scriptCode.getBytes();
-            if(mediaType.trim().equals("")) {
-                mediaType = "text/plain";
-            }
-        } else {
-            if(mediaType.trim().equals("")) {
-                mediaType = formFile.getMediaType().toString();
-            }
-            scriptName = formFile.getFileName();
-        }
-        saveScript(scriptUri, scriptFileBytes, scriptName, sld.getLanguage(),
-                sld.getVersion(), mediaType, producedType);
-
-        return RedirectUtil.createSeeOtherResponse(
-                "script-overview?script="+scriptUri.getUnicodeString(),
-                uriInfo);
-    }
-    
-    /**
-     * Deletes a script.
-     *
-     * @param  script the script URI.
-     * @return CREATED Responce if script has been deleted.
-     *
-     */
-    @POST
-    @Path("delete")
-    public Response deleteScript(@FormParam("script") String script) {
-        AccessController.checkPermission(new ScriptManagerAppPermission());
-        UriRef scriptUri = new UriRef(script);
-        
-
-        //remove execution URIs
-        Set<NonLiteral> scriptGeneratedResources =
-                getScriptGeneratedResources(scriptUri);
-        for(NonLiteral scriptGenratedResource : scriptGeneratedResources) {
-            deleteExecutionUri(scriptGenratedResource, scriptUri);
-        }
-
-        //remove Script
-        deleteScript(scriptUri);
-
-        logger.info("script {} deleted", scriptUri);
-        
-        return Response.status(Status.CREATED).build();
-    }
-
-
-    private void saveScript(UriRef scriptUri, byte[] scriptFileBytes,
-            String scriptName, String scriptLanguage,
-            String scriptLanguageVersion, String mediaTypeString,
-            String producedTypeString) {
-        try {
-            MediaType mediaType = MediaType.valueOf(mediaTypeString);
-
-            MGraph contentGraph = cgProvider.getContentGraph();
-
-
-
-            contentHandler.put(scriptUri, mediaType, scriptFileBytes);
-
-            GraphNode scriptNode = new GraphNode(scriptUri, contentGraph);
-            scriptNode.deleteProperties(DCTERMS.title);
-            scriptNode.deleteProperties(SCRIPT.scriptLanguage);
-            scriptNode.deleteProperties(SCRIPT.scriptLanguageVersion);
-            scriptNode.deleteProperties(SCRIPT.producedType);
-            scriptNode.addProperty(RDF.type, SCRIPT.Script);
-            scriptNode.addProperty(DCTERMS.title,
-                    LiteralFactory.getInstance().
-                    createTypedLiteral(scriptName));
-            scriptNode.addProperty(SCRIPT.scriptLanguage,
-                    LiteralFactory.getInstance().
-                    createTypedLiteral(scriptLanguage));
-            scriptNode.addProperty(SCRIPT.scriptLanguageVersion,
-                    LiteralFactory.getInstance().
-                    createTypedLiteral(scriptLanguageVersion));
-            if(!producedTypeString.equals("")) {
-                scriptNode.addProperty(SCRIPT.producedType,
-                        LiteralFactory.getInstance().
-                            createTypedLiteral(
-                                MediaType.valueOf(producedTypeString).
-                                    toString()));
-            }
-
-        } catch (IllegalArgumentException ex) {
-            //either one of the media types is malformed
-            //or the executionUri is not unique.
-            throw new WebApplicationException(Response.status(
-                    Status.BAD_REQUEST).entity(ex.getMessage()).build());
-        }
-    }
-
-    private void deleteScript(UriRef scriptUri) {
-        MGraph contentGraph = cgProvider.getContentGraph();
-        
-        contentHandler.remove(scriptUri);
-        GraphNode scriptNode = new GraphNode(scriptUri, contentGraph);
-        scriptNode.deleteProperty(RDF.type, SCRIPT.Script);
-        scriptNode.deleteProperties(DCTERMS.title);
-        scriptNode.deleteProperties(SCRIPT.scriptLanguage);
-        scriptNode.deleteProperties(SCRIPT.scriptLanguageVersion);
-        scriptNode.deleteProperties(SCRIPT.producedType);
-    }
-
-    /**
-     * @return    false if the specified execution URI is already used,
-     *            true otherwise.
-     */
-    private boolean saveExecutionUri(String scriptExecutionUri,
-            UriRef scriptUri) {
-
-        MGraph contentGraph = cgProvider.getContentGraph();
-
-        if (!scriptExecutionUri.equals("")) {
-            UriRef generatedResourceUri = new UriRef(scriptExecutionUri);
-            if (!contentGraph.filter(generatedResourceUri, RDF.type,
-                    SCRIPT.ScriptGeneratedResource).hasNext()) {
-                
-                GraphNode generatedResourceNode =
-                        new GraphNode(generatedResourceUri, contentGraph);
-                generatedResourceNode.addProperty(RDF.type,
-                        SCRIPT.ScriptGeneratedResource);
-                generatedResourceNode.addProperty(SCRIPT.scriptSource,
-                        scriptUri);
-            } else {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    private void deleteExecutionUri(NonLiteral scriptGeneratedResource,
-            UriRef scriptUri) {
-        MGraph contentGraph = cgProvider.getContentGraph();
-
-        GraphNode generatedResourceNode =
-                new GraphNode(scriptGeneratedResource, contentGraph);
-        generatedResourceNode.deleteProperty(RDF.type,
-                SCRIPT.ScriptGeneratedResource);
-        generatedResourceNode.deleteProperty(SCRIPT.scriptSource,
-                scriptUri);
-    }
-
-    private ScriptLanguageDescription extractLanguageAndVersion(String str) {
-        int begin = str.indexOf(" (");
-        int end = str.lastIndexOf(')');
-
-        String scriptLanguage = str.substring(0, begin);
-        String scriptLanguageVersion =
-                str.substring(begin + 2, end);
-
-        return new ScriptLanguageDescription(scriptLanguage,
-                scriptLanguageVersion);
-    }
-
-    /**
-     * Execution Uri overview page.
-     *
-     * @return A Graphnode containing a ExecutionUriOverviewPage.
-     */
-    @GET
-    @Path("execution-uri-overview")
-    public GraphNode getExecutionUriOverview() {
-        AccessController.checkPermission(new ScriptManagerAppPermission());
-        MGraph contentGraph = cgProvider.getContentGraph();
-        BNode resultResource = new BNode();
-        MGraph resultGraph = new SimpleMGraph();
-        resultGraph.add(new TripleImpl(resultResource,
-                RDF.type,
-                PLATFORM.HeadedPage));
-        resultGraph.add(new TripleImpl(resultResource, 
-                RDF.type,
-                SCRIPTMANAGER.ExecutionUriOverviewPage));
-        GraphNode scriptList = getScriptList(resultResource);
-        
-        UnionMGraph unionGraph = new UnionMGraph(resultGraph,
-                scriptList.getGraph(), contentGraph);
-        return new GraphNode(resultResource, unionGraph);
-    }
-
-    /**
-     * Returns the executionURIs as RdfList in a GraphNode.
-     *
-     * @param script  The script URI for which to show its execution URIs.
-     * @return  A Graphnode containing a ExecutionUriList.
-     */
-    @GET
-    @Path("get-execution-uri")
-    @Produces("text/plain")
-    public GraphNode getExecutionUris(
-            @QueryParam(value = "script") UriRef script){
-        AccessController.checkPermission(new ScriptManagerAppPermission());
-        BNode resultResource = new BNode();
-        MGraph resultGraph = new SimpleMGraph();
-        Iterator<NonLiteral> executionUris =
-                getScriptGeneratedResources(script).iterator();
-        while(executionUris.hasNext()){
-            resultGraph.add(new TripleImpl(resultResource,
-                    SCRIPTMANAGER.executionUri,
-                    executionUris.next()));
-        }
-        resultGraph.add(new TripleImpl(resultResource,
-                SCRIPTMANAGER.script,
-                script));
-        resultGraph.add(new TripleImpl(resultResource,
-                RDF.type,
-                SCRIPTMANAGER.ExecutionUriList));
-        
-        return new GraphNode(resultResource, new UnionMGraph(resultGraph,
-                cgProvider.getContentGraph()));
-    }
-    
-    /**
-     * Adds a specified execution URI to a specified script.
-     *
-     * @param scriptUri  
-     *            the URI of the script to which the execution URI should be added.
-     * @param generatedResourceUri  
-     *            the execution URI to add.
-     * @return  Redirect to execution uri overview page.
-     */
-    @POST
-    @Path("add-execution-uri")
-    public Response addExecutionUri(
-            @FormParam( "scriptUri" ) UriRef scriptUri,
-            @FormParam( "executionUri" ) String generatedResourceUri,
-            @Context UriInfo uriInfo){
-        AccessController.checkPermission(new ScriptManagerAppPermission());
-        if(!saveExecutionUri(generatedResourceUri, scriptUri)) {
-            logger.warn("Execution URI {} already used.", 
-                    generatedResourceUri);
-            return Response.status(Status.BAD_REQUEST).build();
-        }
-        
-        return RedirectUtil.createSeeOtherResponse(
-                "execution-uri-overview", uriInfo);
-    }
-    
-    /**
-     * Deletes a specified executionUri for a given script.
-     *
-     * @param scriptUri
-     *            The URI of the script to which the execution URI belongs.
-     * @param generatedResourceUri
-     *            The execution URI to delete.
-     * @return  A CREATED response if the execution URI could be deleted.
-     */
-    @POST
-    @Path("delete-executionUri")
-    public Response deleteExecutionUri(
-            @FormParam( "scriptUri" ) UriRef scriptUri,
-            @FormParam( "executionUri" ) UriRef generatedResourceUri){
-
-        AccessController.checkPermission(new ScriptManagerAppPermission());
-        deleteExecutionUri((NonLiteral) generatedResourceUri, scriptUri);
-
-        return Response.status(Status.CREATED).build();
-    }
-
-    /**
-     * Returns all the execution URIs pointing to a specified script.
-     *
-     * @param scriptResource  the script (URI)
-     * @return  All the ScriptGeneratedResources pointing
-     *            to <code>scriptResource</code>.
-     */
-    private Set<NonLiteral> getScriptGeneratedResources(
-            NonLiteral scriptResource) {
-        MGraph contentGraph = cgProvider.getContentGraph();
-
-        Iterator<Triple> it = contentGraph.filter(null,
-                SCRIPT.scriptSource,
-                scriptResource);
-
-        Set<NonLiteral> resources = new HashSet<NonLiteral>();
-
-        while(it.hasNext()) {
-            resources.add(it.next().getSubject());
-        }
-        return resources;
-    }
-
-    /**
-     * Executes a script.
-     *
-     * @param script
-     *            The script URI of the script that should be executed.
-     * @return
-     *            The script return value. Can be GraphNode or a response with
-     *            the media type of the script output.
-     * @throws NoEngineException
-     *            If no engine can be found to execute the script.
-     * @throws ScriptException
-     *            If an error occurs while executing the script.
-     *
-     * @see org.apache.clerezza.platform.scripting.ScriptExecution#execute(
-     *            org.apache.clerezza.rdf.core.NonLiteral, javax.script.Bindings)
-     */
-    @GET
-    @Path("execute")
-    public Object executeScript(@QueryParam("script") String script) {
-        AccessController.checkPermission(new ScriptManagerAppPermission());
-        try {
-            return scriptExecution.execute(new UriRef(script));
-        } catch (NoEngineException ex) {
-            throw new WebApplicationException(ex);
-        } catch (ScriptException ex) {
-            StringWriter sw = new StringWriter();
-            PrintWriter pw = new PrintWriter(sw);
-            pw.println("Exception executing script: ");
-            if (ex.getLineNumber() != -1 || ex.getColumnNumber() != -1) {
-                pw.print("at line number" + ex.getLineNumber() + " ");
-                pw.print("at column number" + ex.getColumnNumber() + ": ");
-            }
-            pw.println(ex.getMessage());
-            ex.printStackTrace(pw);
-            pw.flush();
-            return sw.toString();
-        } 
-    }
-
-    /**
-     * Returns a PathNode of a static file from the staticweb folder.
-     * 
-     * @return {@link PathNode}
-     */
-    @GET
-    @Path("{path:.+}")
-    public PathNode getStaticFile(@PathParam("path") String path) {
-        final PathNode node = fileServer.getNode(path);
-        logger.debug("Serving static {}", node);
-        return node;
-    }
-
-    @Override
-    public Set<GlobalMenuItem> getMenuItems() {
-        Set<GlobalMenuItem> items = new HashSet<GlobalMenuItem>();
-        try {
-            AccessController.checkPermission(
-                    new TcPermission("urn:x-localinstance:/content.graph",
-                    TcPermission.READWRITE));
-            AccessController.checkPermission(new ScriptManagerAppPermission());
-        } catch (AccessControlException e) {
-            return items;
-        }
-        items.add(new GlobalMenuItem("/admin/scripting/", "SCM", "Scripting", 1,
-                "Development"));
-        return items;
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.scripting.scriptmanager/src/main/java/org/apache/clerezza/platform/scripting/scriptmanager/ScriptManagerAppPermission.java
----------------------------------------------------------------------
diff --git a/platform.scripting.scriptmanager/src/main/java/org/apache/clerezza/platform/scripting/scriptmanager/ScriptManagerAppPermission.java b/platform.scripting.scriptmanager/src/main/java/org/apache/clerezza/platform/scripting/scriptmanager/ScriptManagerAppPermission.java
deleted file mode 100644
index d4fe1cc..0000000
--- a/platform.scripting.scriptmanager/src/main/java/org/apache/clerezza/platform/scripting/scriptmanager/ScriptManagerAppPermission.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.clerezza.platform.scripting.scriptmanager;
-
-import java.security.Permission;
-import org.apache.clerezza.permissiondescriptions.PermissionInfo;
-
-/**
- * Permission to use the Script-Manager page. Note that the user
- * additionally needs permission write into the content graph.
- *
- * @author mir
- */
-@PermissionInfo(value="Script Manager Access Permission", description="Grants access " +
-    "to the Script Manager")
-public class ScriptManagerAppPermission extends Permission{
-
-    public ScriptManagerAppPermission() {
-        super("Script Manager permission");
-    }
-    /**
-     *
-     * @param target ignored
-     * @param action ignored
-     */
-    public ScriptManagerAppPermission(String target, String actions) {
-        super("Script Manager permission");
-    }
-
-    @Override
-    public boolean implies(Permission permission) {
-        return equals(permission);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        return getClass().equals(obj.getClass());
-    }
-
-    @Override
-    public int hashCode() {
-        return 77987;
-    }
-
-    @Override
-    public String getActions() {
-        return "";
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.scripting.scriptmanager/src/main/java/org/apache/clerezza/platform/scripting/scriptmanager/ontology/SCRIPTMANAGER.java
----------------------------------------------------------------------
diff --git a/platform.scripting.scriptmanager/src/main/java/org/apache/clerezza/platform/scripting/scriptmanager/ontology/SCRIPTMANAGER.java b/platform.scripting.scriptmanager/src/main/java/org/apache/clerezza/platform/scripting/scriptmanager/ontology/SCRIPTMANAGER.java
deleted file mode 100644
index 37f9613..0000000
--- a/platform.scripting.scriptmanager/src/main/java/org/apache/clerezza/platform/scripting/scriptmanager/ontology/SCRIPTMANAGER.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.platform.scripting.scriptmanager.ontology;
-
-import org.apache.clerezza.rdf.core.UriRef;
-
-/**
- * ScriptManager ontology.
- *
- * @author daniel, marc
- */
-public class SCRIPTMANAGER {
-    // Classes
-
-    /**
-     * A web page containing scripts.
-     */
-    public static final UriRef ScriptManagerOverviewPage = new UriRef("http://clerezza.org/2009/07/scriptmanager#ScriptManagerOverviewPage");
-    
-    /**
-     * A web page to install a script.
-     */
-    public static final UriRef ScriptManagerInstallPage = new UriRef("http://clerezza.org/2009/07/scriptmanager#ScriptManagerInstallPage");
-    
-    /**
-     * A web page to manage execution URIs of scripts.
-     */
-    public static final UriRef ExecutionUriOverviewPage = new UriRef("http://clerezza.org/2009/07/scriptmanager#ExecutionUriOverviewPage");
-    
-    /**
-     * A web page snippet representing a list of Execution URIs for a specified script.
-     */
-    public static final UriRef ExecutionUriList = new UriRef("http://clerezza.org/2009/07/scriptmanager#ExecutionUriList");
-    
-    /**
-     * The script that is currently selected.
-     */
-    public static final UriRef SelectedScript = new UriRef("http://clerezza.org/2009/07/scriptmanager#SelectedScript");
-    
-    /**
-     * A rendered xhtml snippet containing the script list of installed scripts.
-     */
-    public static final UriRef ScriptList = new UriRef("http://clerezza.org/2009/07/scriptmanager#ScriptList");
-
-
-    //Properties
-    /**
-     * Points to a description of a script language in terms of language name and version.
-     */
-    public static final UriRef scriptLanguageDescription = new UriRef("http://clerezza.org/2009/07/scriptmanager#scriptLanguageDescription");
-
-    /**
-     * Points to a Script.
-     */
-    public static final UriRef script = new UriRef("http://clerezza.org/2009/07/scriptmanager#script");
-    
-    /**
-     * A script source code of a specific script
-     */
-    public static final UriRef code = new UriRef("http://clerezza.org/2009/07/scriptmanager#code");
-    
-    /**
-     * Points to a list of all available scripts.
-     */
-    public static final UriRef scriptList = new UriRef("http://clerezza.org/2009/07/scriptmanager#scriptList");
-
-    /**
-     * A list of all available execution URIs for a specific script
-     */
-    public static final UriRef executionUri = new UriRef("http://clerezza.org/2009/07/scriptmanager#executionUri");
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.scripting.scriptmanager/src/main/resources/META-INF/documentation.nt
----------------------------------------------------------------------
diff --git a/platform.scripting.scriptmanager/src/main/resources/META-INF/documentation.nt b/platform.scripting.scriptmanager/src/main/resources/META-INF/documentation.nt
deleted file mode 100644
index 996f4e1..0000000
--- a/platform.scripting.scriptmanager/src/main/resources/META-INF/documentation.nt
+++ /dev/null
@@ -1,103 +0,0 @@
-<bundle:///script-manager-content-el/5-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-<bundle:///script-manager-content-el/5-content> <http://discobits.org/ontology#infoBit> "If a script gets executed through a GET request on one of its execution URIs, the following information about the GET request can be accessed by the script: javax.ws.rs.core.UriInfo, javax.ws.rs.core.Request, and javax.ws.rs.core.HttpHeaders. The variables to access those data are: uriInfo, request, and httpHeaders respectively, and they all have engine scope.\n"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-<bundle:///script-manager> <http://discobits.org/ontology#contains> _:A16b5c081X3aX1239149e335X3aXX2dX7d55 .
-<bundle:///script-manager> <http://discobits.org/ontology#contains> _:A16b5c081X3aX1239149e335X3aXX2dX7d54 .
-<bundle:///script-manager> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d55 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d55 <http://discobits.org/ontology#pos> "1" .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d55 <http://discobits.org/ontology#holds> <bundle:///script-manager-content> .
-<bundle:///script-manager-title> <http://discobits.org/ontology#infoBit> "Script Manager"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-<bundle:///script-manager-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d53 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d53 <http://discobits.org/ontology#pos> "5" .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d53 <http://discobits.org/ontology#holds> <bundle:///script-manager-content-el/5> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d52 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d52 <http://discobits.org/ontology#pos> "0" .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d52 <http://discobits.org/ontology#holds> <bundle:///script-manager-content-el/4-title> .
-<bundle:///script-manager-content-el/1-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-<bundle:///script-manager-content-el/1-title> <http://discobits.org/ontology#infoBit> "Installing Scripts"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d51 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d51 <http://discobits.org/ontology#pos> "1" .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d51 <http://discobits.org/ontology#holds> <bundle:///script-manager-content-el/4-content> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d50 <http://discobits.org/ontology#holds> <bundle:///script-manager-content-el/0> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d50 <http://discobits.org/ontology#pos> "0" .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d50 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-<bundle:///script-manager-content-el/5-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-<bundle:///script-manager-content-el/5-title> <http://discobits.org/ontology#infoBit> "Accessing Information about the GET Request on an Execution URI"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d4f <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d4f <http://discobits.org/ontology#pos> "0" .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d4f <http://discobits.org/ontology#holds> <bundle:///script-manager-content-el/1-title> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d4e <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d4e <http://discobits.org/ontology#pos> "3" .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d4e <http://discobits.org/ontology#holds> <bundle:///script-manager-content-el/3> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d4d <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d4d <http://discobits.org/ontology#pos> "1" .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d4d <http://discobits.org/ontology#holds> <bundle:///script-manager-content-el/2-content> .
-<bundle:///script-manager-content-el/4-title> <http://discobits.org/ontology#infoBit> "Accessing Platform Services"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-<bundle:///script-manager-content-el/4-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-<bundle:///script-manager-content-el/3-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-<bundle:///script-manager-content-el/3-content> <http://discobits.org/ontology#infoBit> "A script can have more than one execution URIs. Execution URIs are accessible via the path /admin/script-manager/execution-uri-overview. Through this path, existing execution URIs of a script can be deleted and new ones can be added."^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-<bundle:///script-manager-content-el/3-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-<bundle:///script-manager-content-el/3-title> <http://discobits.org/ontology#infoBit> "Managing Execution URIs"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-<bundle:///script-manager-content-el/2-title> <http://discobits.org/ontology#infoBit> "Manipulating and Executing Scripts"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-<bundle:///script-manager-content-el/2-title> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d54 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d54 <http://discobits.org/ontology#pos> "0" .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d54 <http://discobits.org/ontology#holds> <bundle:///script-manager-title> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d4c <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d4c <http://discobits.org/ontology#pos> "1" .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d4c <http://discobits.org/ontology#holds> <bundle:///script-manager-content-el/3-content> .
-<bundle:///script-manager-content-el/4> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
-<bundle:///script-manager-content-el/4> <http://discobits.org/ontology#contains> _:A16b5c081X3aX1239149e335X3aXX2dX7d52 .
-<bundle:///script-manager-content-el/4> <http://discobits.org/ontology#contains> _:A16b5c081X3aX1239149e335X3aXX2dX7d51 .
-<bundle:///script-manager-content-el/5> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
-<bundle:///script-manager-content-el/5> <http://discobits.org/ontology#contains> _:A16b5c081X3aX1239149e335X3aXX2dX7d4b .
-<bundle:///script-manager-content-el/5> <http://discobits.org/ontology#contains> _:A16b5c081X3aX1239149e335X3aXX2dX7d4a .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d49 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d49 <http://discobits.org/ontology#pos> "1" .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d49 <http://discobits.org/ontology#holds> <bundle:///script-manager-content-el/1> .
-<bundle:///script-manager-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#OrderedContent> .
-<bundle:///script-manager-content> <http://discobits.org/ontology#contains> _:A16b5c081X3aX1239149e335X3aXX2dX7d50 .
-<bundle:///script-manager-content> <http://discobits.org/ontology#contains> _:A16b5c081X3aX1239149e335X3aXX2dX7d49 .
-<bundle:///script-manager-content> <http://discobits.org/ontology#contains> _:A16b5c081X3aX1239149e335X3aXX2dX7d48 .
-<bundle:///script-manager-content> <http://discobits.org/ontology#contains> _:A16b5c081X3aX1239149e335X3aXX2dX7d4e .
-<bundle:///script-manager-content> <http://discobits.org/ontology#contains> _:A16b5c081X3aX1239149e335X3aXX2dX7d47 .
-<bundle:///script-manager-content> <http://discobits.org/ontology#contains> _:A16b5c081X3aX1239149e335X3aXX2dX7d53 .
-<bundle:///script-manager-content-el/4-content> <http://discobits.org/ontology#infoBit> "Three platform services are made available to scripts through Bindings: TcManager, DiscobitsHandler, and ContentGraphProvider. The variables to access those services are tcManager, contentHandler, and contentGraphProvider respectively. Note that those variables have engine scope and in JRuby script their names are preceded with '$', e.g., $tcManager."^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-<bundle:///script-manager-content-el/4-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-<bundle:///script-manager-content-el/0> <http://discobits.org/ontology#infoBit> "A script in the clerezza platform has the following properties:\n<ul xmlns=\"http://www.w3.org/1999/xhtml\">\n<li>name: the name of the script</li>\n<li>language: the language and its version in which the script is written</li>\n<li>media type: the media type of the script</li>\n<li>produced media type: the media type of the script's output</li>\n</ul>\n\nThe Script Manager provides a web interface to:\n<ul xmlns=\"http://www.w3.org/1999/xhtml\">\n<li>install (create) scripts,</li>\n<li>list and show available scripts,</li>\n<li>update scripts,</li>\n<li>delete scripts, and</li>\n<li>execute scripts</li>\n</ul>\n"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-<bundle:///script-manager-content-el/0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-<bundle:///script-manager-content-el/1> <http://discobits.org/ontology#contains> _:A16b5c081X3aX1239149e335X3aXX2dX7d46 .
-<bundle:///script-manager-content-el/1> <http://discobits.org/ontology#contains> _:A16b5c081X3aX1239149e335X3aXX2dX7d4f .
-<bundle:///script-manager-content-el/1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
-<bundle:///script-manager-content-el/3> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
-<bundle:///script-manager-content-el/3> <http://discobits.org/ontology#contains> _:A16b5c081X3aX1239149e335X3aXX2dX7d45 .
-<bundle:///script-manager-content-el/3> <http://discobits.org/ontology#contains> _:A16b5c081X3aX1239149e335X3aXX2dX7d4c .
-<bundle:///script-manager-content-el/1-content> <http://discobits.org/ontology#infoBit> "The web page for installing scripts is accessible under the path: /admin/script-manager/script-install. There are two ways to install scripts into the platform:\n<ul xmlns=\"http://www.w3.org/1999/xhtml\">\n<li>type in the script directly into a text box labeled \"Script\", or</li>\n<li>upload a file containing the script.</li>\n</ul>\n\nAlong with the script installation, there are some information about the script to be delivered:\n<ul xmlns=\"http://www.w3.org/1999/xhtml\">\n<li>language: the language (and language version) of a script can only take one of the values listed in a drop-down box on the page. Those are languages supported by the platform.</li>\n<li>name: if a script is installed by uploading a file, the file's name is used as the script's name, otherwise the user must specify the name of the script.</li>\n<li>media type (optional): if the user does not specify the media type of t
 he installed script, it is extracted from the media type of the script file sent by the browser. If the script is directly typed into a text box and the media type is unspecified, then it will have the default value text/plain.</li>\n<li>produced media type (optional): if the script returns a GraphNode, then the produced media type of the script is ignored, otherwise the default value of the produced media type is text/plain.</li>\n<li>execution URI (optional): an execution URI can be specified, under which the execution of the script can be requested.</li>\n</ul>\n"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-<bundle:///script-manager-content-el/1-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-<bundle:///script-manager-content-el/2> <http://discobits.org/ontology#contains> _:A16b5c081X3aX1239149e335X3aXX2dX7d4d .
-<bundle:///script-manager-content-el/2> <http://discobits.org/ontology#contains> _:A16b5c081X3aX1239149e335X3aXX2dX7d44 .
-<bundle:///script-manager-content-el/2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#TitledContent> .
-<bundle:///script-manager-content-el/2-content> <http://discobits.org/ontology#infoBit> "Once a script is installed, it can be manipulated and executed via the path /admin/script-manager/script-overview. A list of all installed scripts will be shown and if a script is selected, its contents as well as information about the script will be shown and can be updated. There are 3 push buttons available to do the followings:\n<ul xmlns=\"http://www.w3.org/1999/xhtml\">\n<li>save: save changes made to the selected script</li>\n<li>delete: delete the selected script and all related information</li>\n<li>execute: execute the selected script</li>\n</ul>\nA script can also be executed by sending a GET request on its execution URI.\n"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
-<bundle:///script-manager-content-el/2-content> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#XHTMLInfoDiscoBit> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d48 <http://discobits.org/ontology#holds> <bundle:///script-manager-content-el/2> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d48 <http://discobits.org/ontology#pos> "2" .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d48 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d45 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d45 <http://discobits.org/ontology#holds> <bundle:///script-manager-content-el/3-title> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d45 <http://discobits.org/ontology#pos> "0" .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d46 <http://discobits.org/ontology#holds> <bundle:///script-manager-content-el/1-content> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d46 <http://discobits.org/ontology#pos> "1" .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d46 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d4a <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d4a <http://discobits.org/ontology#pos> "1" .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d4a <http://discobits.org/ontology#holds> <bundle:///script-manager-content-el/5-content> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d47 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d47 <http://discobits.org/ontology#pos> "4" .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d47 <http://discobits.org/ontology#holds> <bundle:///script-manager-content-el/4> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d44 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d44 <http://discobits.org/ontology#pos> "0" .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d44 <http://discobits.org/ontology#holds> <bundle:///script-manager-content-el/2-title> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d4b <http://discobits.org/ontology#holds> <bundle:///script-manager-content-el/5-title> .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d4b <http://discobits.org/ontology#pos> "0" .
-_:A16b5c081X3aX1239149e335X3aXX2dX7d4b <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://discobits.org/ontology#Entry> .

http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/ontology/scriptmanager.rdf
----------------------------------------------------------------------
diff --git a/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/ontology/scriptmanager.rdf b/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/ontology/scriptmanager.rdf
deleted file mode 100644
index 20d74e8..0000000
--- a/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/ontology/scriptmanager.rdf
+++ /dev/null
@@ -1,150 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<rdf:RDF
-	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
-	xmlns:owl="http://www.w3.org/2002/07/owl#"
-	xmlns:dc="http://purl.org/dc/elements/1.1/"
-	xmlns:skos="http://www.w3.org/2008/05/skos#"
->
-
-<!-- Ontology -->
-
-<owl:Ontology rdf:about="http://clerezza.org/2009/07/scriptmanager#">
-	<owl:versionInfo>Revision: 0.1</owl:versionInfo>
-	<dc:title xml:lang="en">
-		Script Manager GUI
-	</dc:title>
-</owl:Ontology>
-
-
-<!-- Classes -->
-
-<rdfs:Class rdf:about="http://clerezza.org/2009/07/scriptmanager#ScriptManagerOverviewPage">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
-	<rdfs:label xml:lang="en">ScriptManagerOverviewPage</rdfs:label>
-	<skos:definition xml:lang="en">A web page containing scripts.</skos:definition>
-	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/07/scriptmanager#" />
-</rdfs:Class>
-
-<rdfs:Class rdf:about="http://clerezza.org/2009/07/scriptmanager#ScriptManagerInstallPage">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
-	<rdfs:label xml:lang="en">ScriptManagerInstallPage</rdfs:label>
-	<skos:definition xml:lang="en">A web page to install a script.</skos:definition>
-	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/07/scriptmanager#" />
-</rdfs:Class>
-
-<rdfs:Class rdf:about="http://clerezza.org/2009/07/scriptmanager#ExecutionUriOverviewPage">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
-	<rdfs:label xml:lang="en">ExecutionUriOverviewPage</rdfs:label>
-	<skos:definition xml:lang="en">
-		 A web page to manage execution URIs of scripts.
-	</skos:definition>
-	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/07/scriptmanager#" />
-</rdfs:Class>
-
-<rdfs:Class rdf:about="http://clerezza.org/2009/07/scriptmanager#ExecutionUriList">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
-	<rdfs:label xml:lang="en">ExecutionUriList</rdfs:label>
-	<skos:definition xml:lang="en">
-		A web page snippet representing a list of Execution URIs for a specified script.
-	</skos:definition>
-	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/07/scriptmanager#" />
-</rdfs:Class>
-
-<rdfs:Class rdf:about="http://clerezza.org/2009/07/scriptmanager#SelectedScript">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
-	<rdfs:label xml:lang="en">SelectedScript</rdfs:label>
-	<skos:definition xml:lang="en">
-		The script that is currently selected.
-	</skos:definition>
-	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/07/scriptmanager#" />
-</rdfs:Class>
-
-<rdfs:Class rdf:about="http://clerezza.org/2009/07/scriptmanager#ScriptList">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
-	<rdfs:label xml:lang="en">ScriptList</rdfs:label>
-	<skos:definition xml:lang="en">
-		 rendered xhtml snippet containing the script list of installed scripts.
-	</skos:definition>
-	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/07/scriptmanager#" />
-</rdfs:Class>
-
-<!-- Properties -->
-
-<rdf:Property rdf:about="http://clerezza.org/2009/07/scriptmanager#scriptLanguageDescription">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty" />
-	<rdfs:label xml:lang="en">scriptLanguageDescription</rdfs:label>
-	<skos:definition xml:lang="en">
-		Points to a description of a script language in terms of language name and version.
-	</skos:definition>
-	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/07/scriptmanager#" />
-	<rdfs:domain rdf:resource="http://clerezza.org/2009/07/scriptmanager#SelectedScript" />
-	<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-</rdf:Property>
-
-<rdf:Property rdf:about="http://clerezza.org/2009/07/scriptmanager#script">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty" />
-	<rdfs:label xml:lang="en">script</rdfs:label>
-	<skos:definition xml:lang="en">
-		 Points to a Script.
-	</skos:definition>
-	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/07/scriptmanager#" />
-	<rdfs:domain rdf:resource="http://clerezza.org/2009/07/scriptmanager#ScriptManagerOverviewPage" />
-	<rdfs:range rdf:resource="http://clerezza.org/2009/07/scriptmanager#SelectedScript"/>
-	<rdfs:range rdf:resource="http://clerezza.org/2009/07/scriptmanager#Script"/>
-</rdf:Property>
-
-<rdfs:Class rdf:about="http://clerezza.org/2009/07/scriptmanager#code">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty" />
-	<rdfs:label xml:lang="en">code</rdfs:label>
-	<skos:definition xml:lang="en">
-		   A script source code of a specific script
-	</skos:definition>
-	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/07/scriptmanager#" />
-	<rdfs:domain rdf:resource="http://clerezza.org/2009/07/scriptmanager#SelectedScript" />
-	<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
-</rdfs:Class>
-
-<rdf:Property rdf:about="http://clerezza.org/2009/07/scriptmanager#scriptList">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty" />
-	<rdfs:label xml:lang="en">scriptList</rdfs:label>
-	<skos:definition xml:lang="en">
-		 Points to a list of all available scripts.
-	</skos:definition>
-	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/07/scriptmanager#" />
-	<rdfs:domain rdf:resource="http://clerezza.org/2009/07/scriptmanager#ScriptManagerOverviewPage" />
-	<rdfs:range rdf:resource="http://clerezza.org/2009/07/scriptmanager#ScriptList"/>
-</rdf:Property>
-
-<rdf:Property rdf:about="http://clerezza.org/2009/07/scriptmanager#executionUri">
-	<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty" />
-	<rdfs:label xml:lang="en">executionUri</rdfs:label>
-	<skos:definition xml:lang="en">
-		A list of all available execution URIs for a specific script
-	</skos:definition>
-	<rdfs:isDefinedBy rdf:resource="http://clerezza.org/2009/07/scriptmanager#" />
-	<rdfs:range rdf:resource="http://clerezza.org/2009/07/script#ScriptGeneratedResource"/>
-</rdf:Property>
-
-</rdf:RDF>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-execution-uri-list.xhtml
----------------------------------------------------------------------
diff --git a/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-execution-uri-list.xhtml b/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-execution-uri-list.xhtml
deleted file mode 100644
index 6a22434..0000000
--- a/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-execution-uri-list.xhtml
+++ /dev/null
@@ -1,41 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-${ns:sma=http://clerezza.org/2009/07/scriptmanager#}
-<table>
-	<thead>
-		<tr>
-			<th colspan="2">Execution URI</th>
-		</tr>
-	</thead>
-	<tbody>
-    ${loop}
-        <tr id="${sma:executionUri}">
-          	<td width="20px;">
-            	<input type="checkbox" onclick="" name="executionUriCheckBox" value="${sma:executionUri}" />
-            </td>
-			<td>${sma:executionUri}</td>
-        </tr>
-    ${/loop}
-    </tbody>
-</table>
-
-

http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-execution-uri-overview.ssp
----------------------------------------------------------------------
diff --git a/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-execution-uri-overview.ssp b/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-execution-uri-overview.ssp
deleted file mode 100644
index 04977ed..0000000
--- a/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-execution-uri-overview.ssp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-def sma(s: Any) = new UriRef("http://clerezza.org/2009/07/scriptmanager#"+s)
-
-resultDocModifier.addScriptReference("/scripts/ajax-options.js");
-resultDocModifier.addScriptReference("/scripts/alert-message.js");
-resultDocModifier.addScriptReference("js/scriptmanager.js");
-resultDocModifier.addScriptReference("js/scriptmanager-execution-uri.js");
-resultDocModifier.setTitle("Scripting");
-resultDocModifier.addNodes2Elem("tx-module", <h1>Scripting</h1>);
-
-resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li class=""><a href="script-overview">Scripts</a></li>);
-resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li class=""><a href="script-install">Install Scripts</a></li>);
-resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li class="tx-active"><a href="#">Execution URIs</a></li>);
-
-resultDocModifier.addNodes2Elem("tx-module-options", <div id="addExecutionUriForm" style="display:none; float:right;"></div>);
-
-resultDocModifier.addNodes2Elem("tx-panel-tabs", <div id="scripts"><h3>Scripts</h3>
-
-					<div id="tx-result" class="tx-result">
-
-						{render(res/sma("scriptList") , "naked")}
-
-					</div>
-				</div>);
-
-
-<div id="tx-content">
-	<div id="tx-list" class="tx-edit tx-show-panel">
-	</div>
-</div>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-script-information.xhtml
----------------------------------------------------------------------
diff --git a/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-script-information.xhtml b/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-script-information.xhtml
deleted file mode 100644
index f0edd07..0000000
--- a/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-script-information.xhtml
+++ /dev/null
@@ -1,91 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-		${ns:script=http://clerezza.org/2009/07/script#}
-		${ns:sma=http://clerezza.org/2009/07/scriptmanager#}
-		${ns:dct=http://purl.org/dc/terms/}
-		${ns:discobits=http://discobits.org/ontology#}
-		<form method="post" id="updateform" action="update-script" enctype="multipart/form-data">
-			<input type="hidden" name="scriptUri" id="scriptUri" value="${sma:script}" />
-			<table>
-				<tr>
-					<th colspan="2">${sma:script/dct:title}</th>
-				</tr>
-				<tr>
-					<td colspan="2">
-						<textarea name="scriptCode" id="scriptCode" rows="10" style="font-size:12px; width:70%;">${sma:script/sma:code}</textarea>
-						<div id="scriptConsole" style="display:none;"></div>
-					</td>
-				</tr>
-				<tr>
-					<td>
-						<label for="fileName">Script Name</label>
-					</td>
-					<td>
-						<input type="text" name="fileName" value="${sma:script/dct:title}" />
-					</td>
-				</tr>
-				<tr>
-					<td>
-						<label for="scriptLanguage">Script Language:</label>
-					</td>
-					<td>
-						<select name="scriptLanguage" size="1">
-							<optgroup label="current value">
-								<option selected="selected">${sma:script/script:scriptLanguage} (${sma:script/script:scriptLanguageVersion})</option>
-							</optgroup>
-							<optgroup label="available values">
-							${loop}
-								<option>${sma:scriptLanguageDescription/script:scriptLanguage} (${sma:scriptLanguageDescription/script:scriptLanguageVersion})</option>
-							${/loop}
-							</optgroup>
-						</select>
-					</td>
-				</tr>
-				<tr>
-					<td>
-						<label for="scriptFile">New Source File:</label>
-					</td>
-					<td>
-						<input type="file" name="scriptFile" />
-						(A new file upload will overwrite the code.)
-					</td>
-				</tr>
-				<tr>
-					<td>
-						<label for="mediaType">Media Type (of the script file):</label>
-					</td>
-					<td>
-						<input type="text" name="mediaType" value="${if sma:script/discobits:mediaType}${sma:script/discobits:mediaType}${/if}"/>
-						(optional: Use to enforce a specific media type)
-					</td>
-				</tr>
-				<tr>
-					<td>
-						<label for="producedType">Media Type of the script output:</label>
-					</td>
-					<td>
-						<input type="text" name="producedType" value="${if sma:script/script:producedType}${sma:script/script:producedType}${/if}"/>
-						(optional: ignored if return value is a GraphNode, default: text/plain)
-					</td>
-				</tr>
-			</table>
-		</form>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-script-install.ssp
----------------------------------------------------------------------
diff --git a/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-script-install.ssp b/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-script-install.ssp
deleted file mode 100644
index 4faf0b9..0000000
--- a/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-script-install.ssp
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-def sma(s: Any) = new UriRef("http://clerezza.org/2009/07/scriptmanager#"+s)
-def script(s: Any) = new UriRef("http://clerezza.org/2009/07/script#"+s)
-
-resultDocModifier.addScriptReference("js/scriptmanager.js");
-resultDocModifier.setTitle("Scripting");
-resultDocModifier.addNodes2Elem("tx-module", <h1>Scripting</h1>);
-
-resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li class=""><a href="script-overview">Scripts</a></li>);
-resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li class="tx-active"><a href="#">Install Scripts</a></li>);
-resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li class=""><a href="execution-uri-overview">Execution URIs</a></li>);
-
-resultDocModifier.addNodes2Elem("tx-contextual-buttons-ol", <li><a id="cancelButton" class="tx-button tx-button-modify" href="script-overview">Cancel</a></li>);
-resultDocModifier.addNodes2Elem("tx-contextual-buttons-ol", <li><a id="editButton" class="tx-button tx-button-create" href="javascript:installScript();">Install</a></li>);
-	
-<div id="tx-content">
-<div class="tx-panel" id="tx-panel">
-</div>   
-
-<div class="tx-list" id ="tx-list">
-<form method="post" id="installform" action="install-script" enctype="multipart/form-data">
-	<table>
-		<tr>
-			<td>
-				<label for="scriptLanguage">Script Language:</label>
-			</td>
-			<td>
-				<select name="scriptLanguage" size="1">
-				{for (desc <- (res/sma("scriptLanguageDescription"))) yield {
-					<option>{(desc/script("scriptLanguage")*)} {"(" + (desc/script("scriptLanguageVersion")*) + ")"}</option>
-				}}
-				</select>
-			</td>
-		</tr>
-		<tr>
-			<td colspan="2" id="choiceCell">
-				<input type="radio" name="fileChoice" id="fileButton" value="file" checked="checked" onclick="fileChoiceSelected()" /> Upload a File
-				<input type="radio" name="fileChoice" id="textButton" value="text" onclick="fileChoiceSelected()"/> Enter Script<br/>
-			</td>
-		</tr>
-		<tr id="fileRow">
-			<td id="fileCellLabel">
-				<label for="scriptFile">Script File:</label>
-			</td>
-			<td id="fileCell">
-				<input type="file" name="scriptFile" />
-			</td>
-		</tr>
-		<tr>
-			<td>
-				<label for="mediaType">Media Type (of the script file):</label>
-			</td>
-			<td>
-				<input type="text" name="mediaType" />
-				(optional: Use to enforce a specific media type)
-			</td>
-		</tr>
-		<tr>
-			<td>
-				<label for="producedType">Media Type of the script output:</label>
-			</td>
-			<td>
-				<input type="text" name="producedType" />
-				(optional: ignored if return value is a GraphNode, default: text/plain)
-			</td>
-		</tr>
-		<tr>
-			<td>
-				<label for="scriptExecutionUri">Execution URI:</label>
-			</td>
-			<td>
-				<input type="text" name="scriptExecutionUri" />
-				(optional)
-			</td>
-		</tr>
-	</table>
-</form>
-</div>
-</div>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-script-list.xhtml
----------------------------------------------------------------------
diff --git a/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-script-list.xhtml b/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-script-list.xhtml
deleted file mode 100644
index ff97960..0000000
--- a/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-script-list.xhtml
+++ /dev/null
@@ -1,31 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-${ns:dct=http://purl.org/dc/terms/}
-<ol>
-	<li class="tx-open" id="scripts"><a href="#">Available Scripts</a>
-		<ol>
-		${loop}
-		<li><a href="#" id="${contains}" class="link">${contains/dct:title}</a></li>
-		${/loop}
-		</ol>
-	</li>
-</ol>

http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-script-overview.ssp
----------------------------------------------------------------------
diff --git a/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-script-overview.ssp b/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-script-overview.ssp
deleted file mode 100644
index 003914d..0000000
--- a/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/scriptmanager-script-overview.ssp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-def sma(s: Any) = new UriRef("http://clerezza.org/2009/07/scriptmanager#"+s)
-
-resultDocModifier.addStyleSheet("/yui/2/container/assets/container-core.css");
-
-resultDocModifier.addScriptReference("/yui/2/yahoo-dom-event/yahoo-dom-event.js");
-resultDocModifier.addScriptReference("/yui/2/animation/animation-min.js");
-resultDocModifier.addScriptReference("/yui/2/dragdrop/dragdrop-min.js");
-resultDocModifier.addScriptReference("/yui/2/logger/logger-min.js");
-resultDocModifier.addScriptReference("/yui/2/element/element-min.js");
-resultDocModifier.addScriptReference("/yui/2/container/container-min.js");
-resultDocModifier.addScriptReference("/yui/2/resize/resize-min.js")
-
-resultDocModifier.addScriptReference("/scripts/ajax-options.js");
-resultDocModifier.addScriptReference("/scripts/alert-message.js");
-resultDocModifier.addScriptReference("js/scriptmanager.js");
-resultDocModifier.addScriptReference("js/scriptmanager-overview.js");
-resultDocModifier.setTitle("Scripting");
-resultDocModifier.addNodes2Elem("tx-module", <h1>Scripting</h1>);
-
-resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li class="tx-active"><a href="#">Scripts</a></li>);
-resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li class=""><a href="script-install">Install Scripts</a></li>);
-resultDocModifier.addNodes2Elem("tx-module-tabs-ol", <li class=""><a href="execution-uri-overview">Execution URIs</a></li>);
-
-resultDocModifier.addNodes2Elem("tx-contextual-buttons-ol", <li><a id="deleteButton" class="tx-button tx-button-remove" href="#">Delete</a></li>);
-resultDocModifier.addNodes2Elem("tx-contextual-buttons-ol", <li><a id="editButton" class="tx-button tx-button-create" href="#">Save</a></li>);
-resultDocModifier.addNodes2Elem("tx-contextual-buttons-ol", <li><a id="addButton" class="tx-button tx-button-modify" href="#">Execute</a></li>);
-
-resultDocModifier.addNodes2Elem("tx-panel-tabs", <div id="scripts"><h3>Scripts</h3>
-
-					<div id="tx-result" class="tx-result">
-
-						{render(res/sma("scriptList") , "naked")}
-
-					</div>
-				</div>);
-
-<div id="tx-content">
-	<div class="tx-edit tx-show-panel" id="tx-list">
-		{
-			if (!((res/sma("script")*).equals(""))) {
-				render(res/sma("script"), "naked")
-			} else {
-				<div></div>
-			}
-		}
-	</div>
-</div>
-

http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/staticweb/js/scriptmanager-execution-uri.js
----------------------------------------------------------------------
diff --git a/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/staticweb/js/scriptmanager-execution-uri.js b/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/staticweb/js/scriptmanager-execution-uri.js
deleted file mode 100644
index 7f4ead8..0000000
--- a/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/staticweb/js/scriptmanager-execution-uri.js
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-$(document).ready(function () {
-	$('.link').live("click",function() {
-		showInformation($(this).attr('id'));
-	});
-
-});

http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/staticweb/js/scriptmanager-overview.js
----------------------------------------------------------------------
diff --git a/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/staticweb/js/scriptmanager-overview.js b/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/staticweb/js/scriptmanager-overview.js
deleted file mode 100644
index a5f0904..0000000
--- a/platform.scripting.scriptmanager/src/main/resources/org/apache/clerezza/platform/scripting/scriptmanager/staticweb/js/scriptmanager-overview.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-$(document).ready(function () {
-	getQueryParam("script");
-
-	$('.link').live("click",function() {
-		showInformation($(this).attr('id'));
-
-	});
-
-	$('#deleteButton').bind("click",function() {
-		if(ACTUALSCRIPT != null) {
-			deleteScript();
-		}
-	});
-	$('#editButton').bind("click",function() {
-		if(ACTUALSCRIPT != null) {
-			updateScript();
-		}
-	});
-	$('#addButton').bind("click",function() {
-		if(ACTUALSCRIPT != null) {
-			executeScript();
-		}
-	});
-});


Mime
View raw message