|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codeforamerica.open311.facade.data.operations.POSTServiceRequestData
public class POSTServiceRequestData
Contains all the necessary data to add a new service request to the server. It allows to add some optional arguments through the method chaining (setters).
Constructor Summary | |
---|---|
POSTServiceRequestData(String serviceCode,
float latitude,
float longitude,
List<Attribute> attributes)
Builds a POST service request data object from a lat & long location value. |
|
POSTServiceRequestData(String serviceCode,
long addressId,
List<Attribute> attributes)
Builds a POST service request data object from an address_id location value. |
|
POSTServiceRequestData(String serviceCode,
String address,
List<Attribute> attributes)
Builds a POST service request data object from an address location value. |
Method Summary | |
---|---|
List<Attribute> |
getAttributes()
Obtains the attributes related to the object. |
Map<String,String> |
getBodyRequestParameters()
Builds a map containing all the arguments. |
POSTServiceRequestData |
setAccountId(long accountId)
Sets an account_id. |
POSTServiceRequestData |
setAddress(String address)
Sets an address parameter. |
POSTServiceRequestData |
setAddressId(long addressId)
Sets an address_id parameter. |
POSTServiceRequestData |
setDescription(String description)
Sets a description. |
POSTServiceRequestData |
setDeviceId(String deviceId)
Sets a device_id. |
POSTServiceRequestData |
setEmail(String email)
Sets an email. |
POSTServiceRequestData |
setFirstName(String firstName)
Sets the first_name. |
POSTServiceRequestData |
setLastName(String lastName)
Sets the last_name. |
POSTServiceRequestData |
setLatLong(float latitude,
float longitude)
Sets a (latitude, longitude) coordinates. |
POSTServiceRequestData |
setMediaUrl(String mediaUrl)
Sets a media URL. |
POSTServiceRequestData |
setPhone(String phone)
Sets the phone. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public POSTServiceRequestData(String serviceCode, float latitude, float longitude, List<Attribute> attributes)
serviceCode
- Code of the service related to the request.latitude
- Latitude using the (WGS84) projection.longitude
- Longitude using the (WGS84) projection.attributes
- List of attributes.public POSTServiceRequestData(String serviceCode, String address, List<Attribute> attributes)
serviceCode
- Code of the service related to the request.address
- Human-readable address.attributes
- List of attributes.public POSTServiceRequestData(String serviceCode, long addressId, List<Attribute> attributes)
serviceCode
- Code of the service related to the request.addressId
- The internal address ID used by a jurisdiction's master
address repository or other addressing system.attributes
- List of attributes.Method Detail |
---|
public POSTServiceRequestData setLatLong(float latitude, float longitude)
latitude
- Latitude using the (WGS84) projection.longitude
- Longitude using the (WGS84) projection.
public POSTServiceRequestData setAddress(String address)
address
- Human-readable address.
public POSTServiceRequestData setAddressId(long addressId)
addressId
- The internal address ID used by a jurisdiction's master
address repository or other addressing system.
public POSTServiceRequestData setEmail(String email)
email
- The email address of the person submitting the request. It
requires a correct email syntax.
public POSTServiceRequestData setDeviceId(String deviceId)
deviceId
- The unique device ID of the device submitting the request.
This is usually only used for mobile devices. Android devices
can use TelephonyManager.getDeviceId()
and
iPhones can use
[UIDevice currentDevice].uniqueIdentifier
.
public POSTServiceRequestData setAccountId(long accountId)
accountId
- The unique ID for the user account of the person submitting
the request.
public POSTServiceRequestData setFirstName(String firstName)
firstName
- The given name of the person submitting the request.
public POSTServiceRequestData setLastName(String lastName)
lastName
- The family name of the person submitting the request .
public POSTServiceRequestData setPhone(String phone)
phone
- The phone number of the person submitting the request.
public POSTServiceRequestData setDescription(String description)
description
- A full description of the request or report being submitted.
This may contain line breaks, but not HTML or code. Otherwise,
this is free form text limited to 4,000 characters.
public POSTServiceRequestData setMediaUrl(String mediaUrl)
mediaUrl
- A URL to media associated with the request, eg an image.
public Map<String,String> getBodyRequestParameters()
public List<Attribute> getAttributes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |