public class SoftwareServerRESTUtilities extends Object
Constructor and Description |
---|
SoftwareServerRESTUtilities() |
Modifier and Type | Method and Description |
---|---|
static String |
createHTMLList(String list,
String link,
boolean APPEND,
String title)
Convert a line separated list into an HTML list of links.
|
static String |
getApplicationStack(Vector<SoftwareServerAuxiliary.Application> applications)
Get an icon representation of the available software.
|
static String |
getConvertForm(Vector<SoftwareServerAuxiliary.Application> applications,
Vector<TreeSet<SoftwareServerAuxiliary.TaskInfo>> application_tasks)
Get a web form interface for converting via this restful service.
|
static String |
getForm(Vector<SoftwareServerAuxiliary.Application> applications,
Vector<TreeSet<SoftwareServerAuxiliary.TaskInfo>> application_tasks,
TreeMap<String,SoftwareServerAuxiliary.Application> alias_map,
boolean POST_UPLOADS,
String selected_application,
boolean HIDE_APPLICATIONS)
Get a web form interface for this restful service.
|
static String |
queryEndpoint(String url)
Query an endpoint.
|
static void |
rabbitMQHandler(String softwareserver_username,
String softwareserver_password,
int softwareserver_port,
Vector<SoftwareServerAuxiliary.Application> softwareserver_applications,
String rabbitmq_uri,
String rabbitmq_server,
String rabbitmq_vhost,
String rabbitmq_username,
String rabbitmq_password,
boolean WAIT,
boolean CHECKIN_URL,
String public_path)
Have a Software Server listen to a RabbitMQ bus for jobs.
|
static void |
registration(String rabbitmq_uri,
String regis_queue_name,
int regis_msg_ttl,
String msg)
Create a thread to send registration messages to the RabbitMQ SS-registration queue.
|
static String |
removeParameters(String url)
Remove parameters from a URL.
|
public static String getApplicationStack(Vector<SoftwareServerAuxiliary.Application> applications)
applications
- the list of applicationspublic static String getForm(Vector<SoftwareServerAuxiliary.Application> applications, Vector<TreeSet<SoftwareServerAuxiliary.TaskInfo>> application_tasks, TreeMap<String,SoftwareServerAuxiliary.Application> alias_map, boolean POST_UPLOADS, String selected_application, boolean HIDE_APPLICATIONS)
applications
- the list of applicationsapplication_tasks
- the list of available application tasksalias_map
- the application alias mapPOST_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 static String getConvertForm(Vector<SoftwareServerAuxiliary.Application> applications, Vector<TreeSet<SoftwareServerAuxiliary.TaskInfo>> application_tasks)
applications
- the list of applicationsapplication_tasks
- the list of available application taskspublic static String queryEndpoint(String url)
url
- the URL of the endpointpublic static String removeParameters(String url)
url
- the URL of a filepublic static String createHTMLList(String list, String link, boolean APPEND, String title)
list
- the line separated list of itemslink
- the URL baseAPPEND
- true if list items should be appended to the end of linktitle
- the title of the generated HTML page (can be null)public static void rabbitMQHandler(String softwareserver_username, String softwareserver_password, int softwareserver_port, Vector<SoftwareServerAuxiliary.Application> softwareserver_applications, String rabbitmq_uri, String rabbitmq_server, String rabbitmq_vhost, String rabbitmq_username, String rabbitmq_password, boolean WAIT, boolean CHECKIN_URL, String public_path)
softwareserver_username
- the Software Server user to usesoftwareserver_password
- the Software Server user passwordsoftwareserver_port
- the Software Server portsoftwareserver_applications
- the available applicationsrabbitmq_uri
- the rabbitmq URI, overrides below parametersrabbitmq_server
- the rabbitmq serverrabbitmq_vhost
- the rabbitmq virtual hostrabbitmq_username
- the rabbitmq userrabbitmq_password
- the rabbitmq user passwordWAIT
- true if should wait for jobs to finish before acknowledging completionCHECKIN_URL
- true if the URL to the output file should be sent back to Polygot as opposed to the actual filepublic_path
- the path where the converted files reside, has trailing slash "/"public static void registration(String rabbitmq_uri, String regis_queue_name, int regis_msg_ttl, String msg)
rabbitmq_uri
- the rabbitmq URIregis_queue_name
- the name of the SS registration queue in RabbitMQregis_msg_ttl
- the TTL (in milliseconds) for the registration msgsmsg
- the string to be published into the queueCopyright © 2017. All rights reserved.