public class LDPOptions
extends java.lang.Object
| Constructor and Description |
|---|
LDPOptions() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAcceptPatchType(int type)
Adds a resource Media Type accepted in a PATCH request
|
void |
addAcceptPostType(int type)
Adds a resource Media Type accepted in a POST request
|
java.util.ArrayList<java.lang.Integer> |
getAcceptedPatchTypes()
Returns all CoAP resource Media Types accepted in PATCH requests
|
java.util.ArrayList<java.lang.Integer> |
getAcceptedPostTypes()
Returns all CoAP resource Media Types accepted in POST requests
|
java.util.HashMap<LDP.Code,java.lang.Boolean> |
getAllowedMethods()
Returns all LDP methods with the relative boolean value indicating if allowed or not
|
boolean |
isAcceptedPatch(int type)
Verifies if a CoAP resource Media Type is accepted or not in a PATCH request
|
boolean |
isAcceptedPost(int type)
Verifies if a CoAP resource Media Type is accepted or not in a POST request
|
boolean |
isAllowed(LDP.Code code)
Verifies if a LDP method is allowed or not.
|
void |
setAllowedMethod(LDP.Code code,
boolean value)
Uses to indicate if a LDP method is allowed or not.
|
java.lang.String |
toJSONString()
Returns allowed operations, Accept-Post and Accept-Patch Media Types as a string in JSON format
|
public void setAllowedMethod(LDP.Code code, boolean value)
code - the LDP methodvalue - true if the method is allowedLDP.Codepublic java.util.HashMap<LDP.Code,java.lang.Boolean> getAllowedMethods()
LDP.Codepublic boolean isAllowed(LDP.Code code)
code - the LDP methodLDP.Codepublic void addAcceptPostType(int type)
type - the integer value associated to the CoAP resource Media Type, as defined in the MediaTypeRegistry classMediaTypeRegistrypublic java.util.ArrayList<java.lang.Integer> getAcceptedPostTypes()
MediaTypeRegistrypublic boolean isAcceptedPost(int type)
type - the integer value associated to the CoAP resource Media TypeMediaTypeRegistrypublic void addAcceptPatchType(int type)
type - the integer value associated to the CoAP resource Media Type, as defined in the MediaTypeRegistry classMediaTypeRegistrypublic java.util.ArrayList<java.lang.Integer> getAcceptedPatchTypes()
MediaTypeRegistrypublic boolean isAcceptedPatch(int type)
type - the integer value associated to the CoAP resource Media TypeMediaTypeRegistrypublic java.lang.String toJSONString()
throws org.json.JSONException
org.json.JSONException