public class SoftwareServerReslet
extends org.restlet.resource.ServerResource
| Constructor and Description |
|---|
SoftwareServerReslet() |
| Modifier and Type | Method and Description |
|---|---|
void |
executeTask(int session,
String application_alias,
String task_string,
String file,
String format,
String params)
Execute a task.
|
void |
executeTaskLater(int session,
String application_alias,
String task_string,
String file,
String format,
String params)
Execute a task asynchronously.
|
String |
getApplications()
Get the applications available.
|
String |
getApplicationStack()
Get an icon representation of the available software.
|
String |
getApplicationTaskInputs(String alias,
String task)
Get the input formats supported by the given task.
|
String |
getApplicationTaskInputs(String alias,
String task,
String output) |
String |
getApplicationTaskInputsOutputs(String alias,
String task)
Get the input and output formats supported by the given task.
|
String |
getApplicationTaskOutputs(String alias,
String task)
Get the output formats supported by the given task.
|
String |
getApplicationTaskOutputs(String alias,
String task,
String input)
Get the output formats supported by the given task from a known input format.
|
String |
getApplicationTaskParameters(String application_alias,
String task_string,
String output_format,
String input_format) |
String |
getApplicationTasks(String alias)
Get the tasks available for the given application.
|
String |
getConvertForm()
Get a web form interface for converting via this restful service.
|
String |
getForm()
Get a web form interface for this restful service.
|
String |
getForm(boolean POST_UPLOADS,
String selected_application,
boolean HIDE_APPLICATIONS)
Get a web form interface for this restful service.
|
kgm.utility.Pair<String,String> |
getJSParameters(String application_alias,
String task_string,
String output_format,
String input_format)
Get the HTML for parameters form
|
Vector<SoftwareServerAuxiliary.Subtask> |
getTask(String application_alias,
String task_string,
String filename,
String output_format)
Get the task involved in using the given applications to convert the given file to the specified output format.
|
Vector<SoftwareServerAuxiliary.Subtask> |
getTaskInfo(String application_alias,
String task_string,
String input_format,
String output_format) |
org.restlet.representation.Representation |
httpGetHandler() |
org.restlet.representation.Representation |
httpPostHandler(org.restlet.representation.Representation entity) |
static void |
initialize()
Initialize.
|
static boolean |
isTextOnly(org.restlet.Request request)
Check if the given request is for plain text only.
|
static void |
main(String[] args)
Start the restful service.
|
static String |
queryEndpoint(String url)
Query an endpoint.
|
abort, commit, delete, delete, describeVariants, doCatch, doConditionalHandle, doError, doHandle, doHandle, doNegotiatedHandle, get, get, getAttribute, getInfo, getInfo, getOnSent, getPreferredVariant, getRole, getVariants, getVariants, handle, hasAnnotations, head, head, isAnnotated, isAutoCommitting, isCommitted, isConditional, isExisting, isInRole, isNegotiated, options, options, patch, patch, post, post, put, put, redirectPermanent, redirectPermanent, redirectSeeOther, redirectSeeOther, redirectTemporary, redirectTemporary, setAllowedMethods, setAnnotated, setAttribute, setAutoCommitting, setChallengeRequests, setCommitted, setConditional, setCookieSettings, setDimensions, setExisting, setLocationRef, setLocationRef, setNegotiated, setOnSent, setProxyChallengeRequests, setServerInfo, setStatus, setStatus, setStatus, setStatus, updateAllowedMethods, updateDimensionsdoError, doInit, doRelease, getAllowedMethods, getApplication, getChallengeRequests, getChallengeResponse, getClientInfo, getConditions, getConnegService, getContext, getConverterService, getCookies, getCookieSettings, getDimensions, getHostRef, getLocationRef, getLogger, getMatrix, getMatrixValue, getMaxForwards, getMetadataService, getMethod, getOriginalRef, getProtocol, getProxyChallengeRequests, getProxyChallengeResponse, getQuery, getQueryValue, getRanges, getReference, getReferrerRef, getRequest, getRequestAttributes, getRequestCacheDirectives, getRequestEntity, getResponse, getResponseAttributes, getResponseCacheDirectives, getResponseEntity, getRootRef, getServerInfo, getStatus, getStatusService, init, isConfidential, isLoggable, release, setApplication, setQueryValue, setRequest, setResponse, toObject, toRepresentation, toStringpublic static void initialize()
public String getApplications()
public String getApplicationTasks(String alias)
alias - the application aliaspublic String getApplicationTaskOutputs(String alias, String task, String input)
alias - the application aliastask - the application taskpublic String getApplicationTaskOutputs(String alias, String task)
alias - the application aliastask - the application taskpublic String getApplicationTaskInputs(String alias, String task)
alias - the application aliastask - the application taskpublic String getApplicationTaskInputs(String alias, String task, String output)
public String getApplicationTaskInputsOutputs(String alias, String task)
alias - the application aliastask - the application taskpublic String getApplicationStack()
public kgm.utility.Pair<String,String> getJSParameters(String application_alias, String task_string, String output_format, String input_format)
application_alias - the application to usetask_string - the task to perform (nothing assumed to be a conversion)output_format - the output formatinput_format - the URL of the file to convertpublic String getForm(boolean POST_UPLOADS, String selected_application, boolean HIDE_APPLICATIONS)
POST_UPLOADS - true if this form should use POST rather than GET for uploading filesselected_application - the default applicationHIDE_APPLICATIONS - true if applications menu should be hiddenpublic String getForm()
public String getConvertForm()
public Vector<SoftwareServerAuxiliary.Subtask> getTaskInfo(String application_alias, String task_string, String input_format, String output_format)
public Vector<SoftwareServerAuxiliary.Subtask> getTask(String application_alias, String task_string, String filename, String output_format)
application_alias - the alias of the application to use.task_string - the task to performfilename - the file name of the cached file to convertoutput_format - the output formatpublic String getApplicationTaskParameters(String application_alias, String task_string, String output_format, String input_format)
application_alias - the application to usetask_string - the task to perform (nothing assumed to be a conversion)output_format - the output formatinput_format - the URL of the file to convertpublic void executeTask(int session,
String application_alias,
String task_string,
String file,
String format,
String params)
session - the session id to use while executing the taskapplication_alias - the application to usetask_string - the task to perform (nothing assumed to be a conversion)file - the URL of the file to convertformat - the output formatpublic void executeTaskLater(int session,
String application_alias,
String task_string,
String file,
String format,
String params)
session - the session id to use while executing the taskapplication_alias - the application to usetask_string - the task to perform (nothing assumed to be a conversion)file - the URL of the input fileformat - the output format@Get public org.restlet.representation.Representation httpGetHandler()
@Post public org.restlet.representation.Representation httpPostHandler(org.restlet.representation.Representation entity)
public static String queryEndpoint(String url)
url - the URL of the endpointpublic static boolean isTextOnly(org.restlet.Request request)
request - the requestpublic static void main(String[] args)
args - the input argumentsCopyright © 2014. All rights reserved.