@Services(value={@Service(value=java.lang.Object.class),@Service(value=org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider.class)})
@Property(name="javax.ws.rs",
boolValue=true)
public class ScriptManager
extends Object
implements org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProvider
| Constructor and Description |
|---|
ScriptManager() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate(org.osgi.service.component.ComponentContext componentContext)
Called when bundle is activated.
|
javax.ws.rs.core.Response |
addExecutionUri(org.apache.clerezza.rdf.core.UriRef scriptUri,
String generatedResourceUri,
javax.ws.rs.core.UriInfo uriInfo)
Adds a specified execution URI to a specified script.
|
javax.ws.rs.core.Response |
deleteExecutionUri(org.apache.clerezza.rdf.core.UriRef scriptUri,
org.apache.clerezza.rdf.core.UriRef generatedResourceUri)
Deletes a specified executionUri for a given script.
|
javax.ws.rs.core.Response |
deleteScript(String script)
Deletes a script.
|
Object |
executeScript(String script)
Executes a script.
|
org.apache.clerezza.rdf.utils.GraphNode |
getExecutionUriOverview()
Execution Uri overview page.
|
org.apache.clerezza.rdf.utils.GraphNode |
getExecutionUris(org.apache.clerezza.rdf.core.UriRef script)
Returns the executionURIs as RdfList in a GraphNode.
|
Set<org.apache.clerezza.platform.globalmenu.GlobalMenuItem> |
getMenuItems() |
org.apache.clerezza.rdf.utils.GraphNode |
getScript(org.apache.clerezza.rdf.core.UriRef scriptUri)
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.
|
org.apache.clerezza.rdf.utils.GraphNode |
getScriptList(org.apache.clerezza.rdf.core.UriRef uriRef)
Returns the menu with available scripts as GraphNode.
|
org.wymiwyg.commons.util.dirbrowser.PathNode |
getStaticFile(String path)
Returns a PathNode of a static file from the staticweb folder.
|
org.apache.clerezza.rdf.utils.GraphNode |
install()
The page that contains the install form.
|
javax.ws.rs.core.Response |
installScript(org.apache.clerezza.jaxrs.utils.form.MultiPartBody form,
javax.ws.rs.core.UriInfo uriInfo)
Installs a script.
|
org.apache.clerezza.rdf.utils.GraphNode |
overview(org.apache.clerezza.rdf.core.UriRef script)
The overview page.
|
javax.ws.rs.core.Response |
redirectToOverviewPage(javax.ws.rs.core.UriInfo uriInfo)
Redirects to the overview page
|
javax.ws.rs.core.Response |
updateScript(org.apache.clerezza.jaxrs.utils.form.MultiPartBody form,
javax.ws.rs.core.UriInfo uriInfo)
Updates a script.
|
protected void activate(org.osgi.service.component.ComponentContext componentContext)
throws IOException,
URISyntaxException
componentContext - the context.IOExceptionURISyntaxExceptionpublic javax.ws.rs.core.Response redirectToOverviewPage(@Context
javax.ws.rs.core.UriInfo uriInfo)
public org.apache.clerezza.rdf.utils.GraphNode overview(org.apache.clerezza.rdf.core.UriRef script)
the - script URIpublic org.apache.clerezza.rdf.utils.GraphNode getScript(org.apache.clerezza.rdf.core.UriRef scriptUri)
scriptUri - the URI of the script resource.GraphNode containing the selected script.SCRIPTMANAGER.SelectedScriptpublic org.apache.clerezza.rdf.utils.GraphNode getScriptList(org.apache.clerezza.rdf.core.UriRef uriRef)
resource - The resource to which to attach the list.GraphNode containing all available script resources.public org.apache.clerezza.rdf.utils.GraphNode install()
public javax.ws.rs.core.Response installScript(org.apache.clerezza.jaxrs.utils.form.MultiPartBody form,
@Context
javax.ws.rs.core.UriInfo uriInfo)
form - the install form containing the script data.public javax.ws.rs.core.Response updateScript(org.apache.clerezza.jaxrs.utils.form.MultiPartBody form,
@Context
javax.ws.rs.core.UriInfo uriInfo)
form - the update form containing the script data.public javax.ws.rs.core.Response deleteScript(String script)
script - the script URI.public org.apache.clerezza.rdf.utils.GraphNode getExecutionUriOverview()
public org.apache.clerezza.rdf.utils.GraphNode getExecutionUris(org.apache.clerezza.rdf.core.UriRef script)
script - The script URI for which to show its execution URIs.public javax.ws.rs.core.Response addExecutionUri(org.apache.clerezza.rdf.core.UriRef scriptUri,
String generatedResourceUri,
@Context
javax.ws.rs.core.UriInfo uriInfo)
scriptUri - the URI of the script to which the execution URI should be added.generatedResourceUri - the execution URI to add.public javax.ws.rs.core.Response deleteExecutionUri(org.apache.clerezza.rdf.core.UriRef scriptUri,
org.apache.clerezza.rdf.core.UriRef generatedResourceUri)
scriptUri - The URI of the script to which the execution URI belongs.generatedResourceUri - The execution URI to delete.public Object executeScript(String script)
script - The script URI of the script that should be executed.org.apache.clerezza.platform.scripting.NoEngineException - If no engine can be found to execute the script.ScriptException - If an error occurs while executing the script.ScriptExecution.execute(
org.apache.clerezza.rdf.core.NonLiteral, javax.script.Bindings)public org.wymiwyg.commons.util.dirbrowser.PathNode getStaticFile(String path)
PathNodepublic Set<org.apache.clerezza.platform.globalmenu.GlobalMenuItem> getMenuItems()
getMenuItems in interface org.apache.clerezza.platform.globalmenu.GlobalMenuItemsProviderCopyright © 2014 The Apache Software Foundation. All rights reserved.