use of org.opencastproject.workflow.api.WorkflowDefinition in project opencast by opencast.
the class WorkflowRestService method getConfigurationPanel.
/**
* Returns the workflow configuration panel HTML snippet for the workflow definition specified by
*
* @param definitionId
* @return config panel HTML snippet
*/
@GET
@Produces(MediaType.TEXT_HTML)
@Path("configurationPanel")
@RestQuery(name = "configpanel", description = "Get the configuration panel for a specific workflow", returnDescription = "The HTML workflow configuration panel", restParameters = { @RestParameter(name = "definitionId", isRequired = false, description = "The workflow definition identifier", type = STRING) }, reponses = { @RestResponse(responseCode = SC_OK, description = "The workflow configuration panel.") })
public Response getConfigurationPanel(@QueryParam("definitionId") String definitionId) throws NotFoundException {
WorkflowDefinition def = null;
try {
def = service.getWorkflowDefinitionById(definitionId);
String out = def.getConfigurationPanel();
return Response.ok(out).build();
} catch (WorkflowDatabaseException e) {
throw new WebApplicationException(Status.INTERNAL_SERVER_ERROR);
}
}
use of org.opencastproject.workflow.api.WorkflowDefinition in project opencast by opencast.
the class WorkflowDefinitionScanner method uninstall.
/**
* {@inheritDoc}
*
* @see org.apache.felix.fileinstall.ArtifactInstaller#uninstall(java.io.File)
*/
public void uninstall(File artifact) throws Exception {
// Since the artifact is gone, we can't open it to read its ID. So we look in the local map.
String id = artifactIds.remove(artifact);
if (id != null) {
WorkflowDefinition def = removeWorkflowDefinition(id);
logger.info("Uninstalling workflow definition '{}' from file '{}'", def.getId(), artifact.getName());
}
}
Aggregations