X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fapi%2FUIinfo.java;h=8ef4d5b905143f0dce5e41f4575e580712b0d91c;hb=2db272981f2778cc64df63bab6893c8347e120f8;hp=81c4ff3af8e4b5747e88ce7127b54480c41e4400;hpb=e341b16beaae6c54348381d4a0bc11f094246067;p=jalview.git diff --git a/src/jalview/ws/api/UIinfo.java b/src/jalview/ws/api/UIinfo.java index 81c4ff3..8ef4d5b 100644 --- a/src/jalview/ws/api/UIinfo.java +++ b/src/jalview/ws/api/UIinfo.java @@ -1,5 +1,7 @@ package jalview.ws.api; +import jalview.ws.params.ParamDatastoreI; + /** * Service UI Info { Action, Specific Name of Service, Brief Description } */ @@ -9,12 +11,13 @@ public class UIinfo private String ServiceType; public UIinfo(String serviceType, String action, String name, - String description) + String description, String hosturl) { this.setServiceType(serviceType == null ? "" : serviceType); this.Action = action == null ? "" : action; this.description = description == null ? "" : description; this.Name = name == null ? "" : name; + this.hostURL = hosturl; } /** @@ -85,6 +88,9 @@ public class UIinfo return (ServiceType == null && other.getServiceType() == null || ServiceType != null && other.getServiceType() != null && ServiceType.equals(other.getServiceType())) + && (hostURL == null && other.getHostURL() == null + || hostURL != null && other.getHostURL() != null + && hostURL.equals(other.getHostURL())) && (Name == null && other.getName() == null || Name != null && other.getName() != null && Name.equals(other.getName())) @@ -96,9 +102,63 @@ public class UIinfo && description.equals(other.getDescription())); } + /** + * @return short description of what the service will do + */ + public String getActionText() + { + return getAction() + " with " + getName(); + } + String Action; String Name; String description; + + String hostURL; + + public String getHostURL() + { + return hostURL; + } + + public ParamDatastoreI getParamStore() + { + // TODO Auto-generated method stub + return null; + } + + /** + * + * @return true if the service has parameters (ie is instance of + * jalview.ws.api.ServiceWithParameters) + */ + public boolean hasParameters() + { + // TODO Auto-generated method stub + return false; + } + + private String docUrl = null; + + /** + * set the URL that will be offered to show documentation for the service + * + * @param url + */ + public void setDocumentationUrl(String url) + { + docUrl = url; + } + + public boolean hasDocumentationUrl() + { + return docUrl != null && docUrl.length() > 7; + } + + public String getDocumentationUrl() + { + return docUrl; + } } \ No newline at end of file