public class ToolProxy extends Object
| Constructor and Description |
|---|
ToolProxy(String tool_proxy)
We check for the fields essential for the class to operate here.
|
| Modifier and Type | Method and Description |
|---|---|
org.json.simple.JSONArray |
enabledCapabilities(org.json.simple.JSONObject resourceHandler,
String messageType)
Return all enabled capabilities
|
boolean |
enabledCapability(org.json.simple.JSONObject resourceHandler,
String messageType,
String capability)
Check if a particular capability is enabled
|
org.json.simple.JSONObject |
getCustom()
Retrieve the custom from the tool_proxy
|
String |
getIconPath(org.json.simple.JSONObject resourceHandler,
String icon_style)
Extract an icon path by icon_style from an icon_info string
|
org.json.simple.JSONObject |
getMessageOfType(org.json.simple.JSONObject resourceHandler,
String messageType)
Retrieve a particular message type from an individual resource handler
|
org.json.simple.JSONObject |
getMessageOfType(String messageType)
Retrieve a global message type from the ToolProxy
|
org.json.simple.JSONArray |
getParameterFromMessage(org.json.simple.JSONObject message)
Retrieve a parameter bundle for a message from the ToolProxy
|
String |
getPathFromMessage(org.json.simple.JSONObject message)
Retrieve a path for a message from the ToolProxy
|
org.json.simple.JSONArray |
getResourceHandlers()
Retrieve the resource_handlers from a tool_profile
|
org.json.simple.JSONObject |
getSecurityContract()
Retrieve the security_contract from the tool_proxy
|
org.json.simple.JSONObject |
getToolProfile()
Retrieve the tool_profile from the tool_proxy
|
org.json.simple.JSONObject |
getToolProxy()
Retrieve the parsed tool_proxy
|
String |
parseToolProfile(List<Properties> theTools,
Properties info)
Parse a provider profile with lots of error checking...
|
String |
toString()
Return a string
|
String |
validateCapabilities(ToolConsumer consumer)
Validate enabled_capabilities agains our ToolConsumer
|
String |
validateServices(ToolConsumer consumer)
Validate our tool_services against a tool consumer
|
public ToolProxy(String tool_proxy)
public org.json.simple.JSONObject getToolProxy()
public org.json.simple.JSONObject getToolProfile()
public org.json.simple.JSONObject getSecurityContract()
public org.json.simple.JSONObject getCustom()
public org.json.simple.JSONArray getResourceHandlers()
public org.json.simple.JSONObject getMessageOfType(String messageType)
String - messageType - Which message type you are looking forpublic String getPathFromMessage(org.json.simple.JSONObject message)
JSONObject - message - The message entrypublic org.json.simple.JSONArray getParameterFromMessage(org.json.simple.JSONObject message)
JSONObject - message - The message entrypublic org.json.simple.JSONObject getMessageOfType(org.json.simple.JSONObject resourceHandler,
String messageType)
String - resourceHandler - JSONObject for the resource_handlerString - messageType - Which message type you are looking forpublic org.json.simple.JSONArray enabledCapabilities(org.json.simple.JSONObject resourceHandler,
String messageType)
String - resourceHandler - JSONObject for the resource_handlerString - messageType - Which message type you are looking forpublic boolean enabledCapability(org.json.simple.JSONObject resourceHandler,
String messageType,
String capability)
String - resourceHandler - JSONObject for the resource_handlerString - messageType - Which message type you are looking forString - capability - The capability to look forpublic String getIconPath(org.json.simple.JSONObject resourceHandler, String icon_style)
String - resourceHandler - JSONObject for the resource_handlerString - icon_style - The style to look forpublic String validateServices(ToolConsumer consumer)
public String validateCapabilities(ToolConsumer consumer)
public String parseToolProfile(List<Properties> theTools, Properties info)
Copyright 2015- Charles R. Severance and licensed CC-BY Attribution 4.0