|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codeforamerica.open311.internals.network.URLBuilder
public class URLBuilder
Builds the necessary URLs to communicate with the endpoints.
| Constructor Summary | |
|---|---|
URLBuilder(String baseUrl,
String jurisdictionId,
String format)
|
|
| Method Summary | |
|---|---|
URL |
buildGetServiceDefinitionUrl(String serviceCode)
Builds a GET Service Definition URL. |
URL |
buildGetServiceListUrl()
Builds a GET Service List URL. |
URL |
buildGetServiceRequest(String serviceId)
Builds a GET Service Request URL. |
URL |
buildGetServiceRequestIdFromATokenUrl(String token)
Builds a GET Service Request ID From Token URL. |
URL |
buildGetServiceRequests(Map<String,String> arguments)
Builds a GET Service Requests URL. |
Map<String,String> |
buildPostServiceRequestBody(Map<String,String> arguments,
List<Attribute> attributes)
Builds the list of arguments of a POST service request. |
URL |
buildPostServiceRequestUrl()
Builds a POST Service Request URL. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public URLBuilder(String baseUrl,
String jurisdictionId,
String format)
| Method Detail |
|---|
public URL buildGetServiceListUrl()
throws MalformedURLException
MalformedURLException - If one of the parts of the url (endpoint's base url,
format...) is not correct.
public URL buildGetServiceDefinitionUrl(String serviceCode)
throws MalformedURLException
serviceCode - Code of the service to find the definition.
MalformedURLException - If one of the parts of the url (endpoint's base url,
format...) is not correct.
public URL buildPostServiceRequestUrl()
throws MalformedURLException
MalformedURLException - If one of the parts of the url (endpoint's base url,
format...) is not correct.
public URL buildGetServiceRequestIdFromATokenUrl(String token)
throws MalformedURLException
token - Token associated to a service request.
MalformedURLException - If one of the parts of the url (endpoint's base url,
format...) is not correct.
public URL buildGetServiceRequests(Map<String,String> arguments)
throws MalformedURLException
arguments - Pairs (key, value) of optional arguments
MalformedURLException - If one of the parts of the url (endpoint's base url,
format...) is not correct.
public URL buildGetServiceRequest(String serviceId)
throws MalformedURLException
serviceId - Id of the service.
MalformedURLException - If one of the parts of the url (endpoint's base url,
format...) is not correct.
public Map<String,String> buildPostServiceRequestBody(Map<String,String> arguments,
List<Attribute> attributes)
throws MalformedURLException
arguments - List of (key, value) pairs.attributes - List of attributes.
MalformedURLException - If any of the arguments given is not allowed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||