Package davmail.exchange.graph
Class GraphRequestBuilder
java.lang.Object
davmail.exchange.graph.GraphRequestBuilder
Build Microsoft graph request
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendExpandProperties(StringBuilder buffer, List<String> properties) Build expand graph parameter to retrieve mapi properties.org.apache.http.client.methods.HttpRequestBasebuild()Build http request.protected StringBuild request path based on version, username, object type and object id.setAccessToken(String accessToken) setChildId(String childId) setChildSuffix(String childSuffix) setChildType(String childType) setContentType(String contentType) setDeltaToken(String deltaToken) setEndDateTime(String endDateTime) setFilter(ExchangeSession.Condition condition) setJsonBody(GraphObject graphObject) setJsonBody(org.codehaus.jettison.json.JSONObject jsonBody) Replace JSON body;setMailbox(String mailbox) setMaxPageSize(int maxPageSize) setMimeContent(byte[] mimeContent) setObjectId(String objectId) setObjectType(String objectType) setOrderBy(String orderBy) setProperty(String name, String value) Set property in the JSON body.setSelectFields(Set<GraphField> selectFields) Set expand fields (returning attributes).setSizeLimit(int sizeLimit) Skip adding the Authorization header.setStartDateTime(String startDateTime) setTimezone(String timeZone) setVersion(String version)
-
Field Details
-
LOGGER
protected static final org.apache.log4j.Logger LOGGER
-
-
Constructor Details
-
GraphRequestBuilder
public GraphRequestBuilder()
-
-
Method Details
-
setProperty
public GraphRequestBuilder setProperty(String name, String value) throws org.codehaus.jettison.json.JSONException Set property in the JSON body.- Parameters:
name- property namevalue- property value- Throws:
org.codehaus.jettison.json.JSONException- on error
-
setJsonBody
Replace JSON body;- Returns:
- this
-
setJsonBody
-
addHeader
-
setUrl
-
setSkipAuthorization
Skip adding the Authorization header. Used for pre-authenticated URLs like import session upload.- Returns:
- this
-
setSelectFields
Set expand fields (returning attributes).- Parameters:
selectFields- set of fields to return- Returns:
- this
-
setVersion
-
setObjectType
-
setChildType
-
setChildId
-
setChildSuffix
-
setAction
-
setFilter
-
setFilter
-
setSearch
-
setOrderBy
-
setStartDateTime
-
setEndDateTime
-
setTimezone
-
setAccessToken
-
setMethod
-
setContentType
-
setMimeContent
-
setMailbox
-
setObjectId
-
setSelect
-
setExpand
-
setSizeLimit
-
setMaxPageSize
-
setDeltaToken
-
buildPath
Build request path based on version, username, object type and object id.- Returns:
- request path
-
appendExpandProperties
Build expand graph parameter to retrieve mapi properties.- Parameters:
buffer- expand bufferproperties- MAPI properties list
-
build
Build http request.- Returns:
- Http request
- Throws:
IOException- on error
-