@Services(value={@Service(value=java.lang.Object.class),@Service(value=GlobalMenuItemsProvider.class)}) @Property(name="javax.ws.rs", boolValue=true) public class ScriptManager extends Object implements 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(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(UriRef scriptUri,
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.
|
GraphNode |
getExecutionUriOverview()
Execution Uri overview page.
|
GraphNode |
getExecutionUris(UriRef script)
Returns the executionURIs as RdfList in a GraphNode.
|
Set<GlobalMenuItem> |
getMenuItems()
Returns a
Set of GlobalMenuItem S. |
GraphNode |
getScript(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.
|
GraphNode |
getScriptList(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.
|
GraphNode |
install()
The page that contains the install form.
|
javax.ws.rs.core.Response |
installScript(MultiPartBody form,
javax.ws.rs.core.UriInfo uriInfo)
Installs a script.
|
GraphNode |
overview(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(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.IOException
URISyntaxException
public javax.ws.rs.core.Response redirectToOverviewPage(@Context javax.ws.rs.core.UriInfo uriInfo)
public GraphNode overview(UriRef script)
the
- script URIpublic GraphNode getScript(UriRef scriptUri)
scriptUri
- the URI of the script resource.GraphNode
containing the selected script.SCRIPTMANAGER.SelectedScript
public GraphNode getScriptList(UriRef uriRef)
resource
- The resource to which to attach the list.GraphNode
containing all available script resources.public GraphNode install()
public javax.ws.rs.core.Response installScript(MultiPartBody form, @Context javax.ws.rs.core.UriInfo uriInfo)
form
- the install form containing the script data.public javax.ws.rs.core.Response updateScript(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 GraphNode getExecutionUriOverview()
public GraphNode getExecutionUris(UriRef script)
script
- The script URI for which to show its execution URIs.public javax.ws.rs.core.Response addExecutionUri(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(UriRef scriptUri, 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.NoEngineException
- If no engine can be found to execute the script.javax.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)
PathNode
public Set<GlobalMenuItem> getMenuItems()
GlobalMenuItemsProvider
Set
of GlobalMenuItem
S. If there is
no GlobalMenuItem
available (e.g. the current user has not
the needed permissions) then the returned set is empty.getMenuItems
in interface GlobalMenuItemsProvider
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.