Class RequestOptions
- java.lang.Object
-
- org.apache.abdera.protocol.util.AbstractMessage
-
- org.apache.abdera.protocol.util.AbstractRequest
-
- org.apache.abdera.protocol.client.RequestOptions
-
- All Implemented Interfaces:
Message,Request,ProtocolConstants
@Deprecated public class RequestOptions extends AbstractRequest implements Request
Deprecated.Legacy AEM 6.x API.The RequestOptions class allows a variety of options affecting the execution of the request to be modified.
-
-
Field Summary
-
Fields inherited from interface org.apache.abdera.protocol.util.ProtocolConstants
NOCACHE, NOSTORE, NOTRANSFORM, ONLYIFCACHED, PRIVATE, PROXYREVALIDATE, PUBLIC, REVALIDATE
-
-
Constructor Summary
Constructors Constructor Description RequestOptions()Deprecated.RequestOptions(boolean no_cache)Deprecated.Create the RequestOptions objectRequestOptions(String ifNoneMatch)Deprecated.Create the RequestOptions object with the specified If-None-Match header valueRequestOptions(String... ifNoneMatch)Deprecated.Create the RequestOptions object with the specified If-None-Match header valueRequestOptions(Date ifModifiedSince)Deprecated.Create the RequestOptions object with the specified If-Modified-Since header valueRequestOptions(Date ifModifiedSince, String ifNoneMatch)Deprecated.Create the RequestOptions object with the specified If-Modified-Since and If-None-Match header valuesRequestOptions(Date ifModifiedSince, String... ifNoneMatch)Deprecated.Create the RequestOptions object with the specified If-Modified-Since and If-None-Match header values
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description RequestOptionsaddDateHeader(String header, Date value)Deprecated.Similar to setDateHeader but allows for multiple instances of the specified headerRequestOptionsaddEncodedHeader(String header, String charset, String value)Deprecated.Similar to setEncodedHeader, but allows for multiple instances of the specified headerRequestOptionsaddEncodedHeader(String header, String charset, String... values)Deprecated.Similar to setEncodedHeader, but allows for multiple instances of the specified headerRequestOptionsaddHeader(String header, String value)Deprecated.Similar to setHeader but allows for multiple instances of the specified headerRequestOptionsaddHeader(String header, String... values)Deprecated.Similar to setHeader but allows for multiple instances of the specified headerStringgetCacheControl()Deprecated.Return the value of the Cache-Control headerDategetDateHeader(String header)Deprecated.Returns the date value of the specified headerStringgetHeader(String header)Deprecated.Returns the text value of the specified headerString[]getHeaderNames()Deprecated.Returns a listing of header namesString[]getHeaders(String header)Deprecated.Return a listing of text values for the specified headerbooleangetRevalidateWithAuth()Deprecated.Configure the AbderaClient Side cache to revalidate when using AuthorizationbooleangetUseLocalCache()Deprecated.The difference between this and getNoCache is that this only disables the local cache without affecting the Cache-Control header.booleanis4xxRequestException()Deprecated.Return true if a RequestException should be thrown on 4xx responsesbooleanis5xxRequestException()Deprecated.Return true if a RequestException should be thrown on 5xx responsesbooleanisConditionalPut()Deprecated.True if HTTP Conditional Requests should be used automatically.booleanisFollowRedirects()Deprecated.True if the client should follow redirects automaticallybooleanisUseChunked()Deprecated.Should the request use chunked encoding?booleanisUseExpectContinue()Deprecated.Return true if Expect-Continue should be usedbooleanisUsePostOverride()Deprecated.Return whether the request should use the X-HTTP-Method-Override optionRequestOptionsremoveHeaders(String name)Deprecated.Remove the specified HTTP headerRequestOptionsset4xxRequestException(boolean v)Deprecated.Set whether or not to throw a RequestExeption on 4xx responsesRequestOptionsset5xxRequestException(boolean v)Deprecated.Set whether or not to throw a RequestExeption on 5xx responsesRequestOptionssetAccept(String accept)Deprecated.Sets the value of the HTTP Accept headerRequestOptionssetAccept(String... accept)Deprecated.Sets the value of the HTTP Accept headerRequestOptionssetAcceptCharset(String accept)Deprecated.Sets the value of the HTTP Accept-Charset headerRequestOptionssetAcceptCharset(String... accept)Deprecated.Sets the value of the HTTP Accept-Charset headerRequestOptionssetAcceptEncoding(String accept)Deprecated.Sets the value of the HTTP Accept-Encoding headerRequestOptionssetAcceptEncoding(String... accept)Deprecated.Sets the value of the HTTP Accept-Encoding headerRequestOptionssetAcceptLanguage(String accept)Deprecated.Sets the value of the HTTP Accept-Language headerRequestOptionssetAcceptLanguage(String... accept)Deprecated.Sets the value of the HTTP Accept-Language headerRequestOptionssetAcceptLanguage(Locale locale)Deprecated.RequestOptionssetAcceptLanguage(Locale... locales)Deprecated.RequestOptionssetAuthorization(String auth)Deprecated.Set the value of the HTTP Authorization headerRequestOptionssetCacheControl(String cc)Deprecated.Sets the value of the HTTP Cache-Control headerRequestOptionssetConditionalPut(boolean conditional)Deprecated.True if HTTP Conditinal Request should be used automatically.RequestOptionssetContentLocation(String iri)Deprecated.RequestOptionssetContentType(String value)Deprecated.Set the value of the HTTP Content-Type headerRequestOptionssetContentType(MimeType value)Deprecated.Set the value of the HTTP Content-Type headerRequestOptionssetDateHeader(String header, Date value)Deprecated.Set the date value of the specified HTTP headerRequestOptionssetEncodedHeader(String header, String charset, String value)Deprecated.Set the value of a header using proper encoding of non-ascii charactersRequestOptionssetEncodedHeader(String header, String charset, String... values)Deprecated.Set the values of a header using proper encoding of non-ascii charactersRequestOptionssetFollowRedirects(boolean followredirects)Deprecated.True if the client should follow redirects automaticallyRequestOptionssetHeader(String header, String value)Deprecated.Set the value of the specified HTTP headerRequestOptionssetHeader(String header, String... values)Deprecated.Set the value of the specified HTTP headerRequestOptionssetIfMatch(String entity_tag)Deprecated.Sets the value of the HTTP If-Match headerRequestOptionssetIfMatch(String... entity_tags)Deprecated.Sets the value of the HTTP If-Match headerRequestOptionssetIfMatch(org.apache.abdera.util.EntityTag entity_tag)Deprecated.Sets the value of the HTTP If-Match headerRequestOptionssetIfMatch(org.apache.abdera.util.EntityTag... entity_tags)Deprecated.Sets the value of the HTTP If-Match headerRequestOptionssetIfModifiedSince(Date date)Deprecated.Sets the value of the HTTP If-Modified-Since headerRequestOptionssetIfNoneMatch(String entity_tag)Deprecated.Sets the value of the HTTP If-None-Match headerRequestOptionssetIfNoneMatch(String... entity_tags)Deprecated.Sets the value of the HTTP If-None-Match headerRequestOptionssetIfNoneMatch(org.apache.abdera.util.EntityTag entity_tag)Deprecated.Sets the value of the HTTP If-None-Match headerRequestOptionssetIfNoneMatch(org.apache.abdera.util.EntityTag... entity_tags)Deprecated.Sets the value of the HTTP If-None-Match headerRequestOptionssetIfUnmodifiedSince(Date date)Deprecated.Sets the value of the HTTP If-Unmodified-Since headerRequestOptionssetRevalidateWithAuth(boolean revalidateAuth)Deprecated.Configure the AbderaClient Side cache to revalidate when using AuthorizationRequestOptionssetSlug(String slug)Deprecated.Sets the value of the Atom Publishing Protocol Slug headerRequestOptionssetUseChunked(boolean useChunked)Deprecated.Set whether the request should use chunked encoding.RequestOptionssetUseExpectContinue(boolean useExpect)Deprecated.Set whether or not to use the HTTP Expect-Continue mechanism (enabled by default)RequestOptionssetUseLocalCache(boolean use_cache)Deprecated.True if the local client cache should be usedRequestOptionssetUsePostOverride(boolean useOverride)Deprecated.Set whether the request should use the X-HTTP-Method-Override option-
Methods inherited from class org.apache.abdera.protocol.util.AbstractRequest
getAccept, getAcceptCharset, getAcceptEncoding, getAcceptLanguage, getAuthorization, getIfMatch, getIfModifiedSince, getIfNoneMatch, getIfUnmodifiedSince, getMaxStale, getMinFresh, isOnlyIfCached, setMaxAge, setMaxStale, setMinFresh, setNoCache, setNoStore, setNoTransform, setOnlyIfCached
-
Methods inherited from class org.apache.abdera.protocol.util.AbstractMessage
getContentLanguage, getContentLocation, getContentType, getDecodedHeader, getDecodedHeaders, getMaxAge, getSlug, isNoCache, isNoStore, isNoTransform
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.abdera.protocol.Message
getContentLanguage, getContentLocation, getContentType, getDecodedHeader, getDecodedHeaders, getMaxAge, getSlug, isNoCache, isNoStore, isNoTransform
-
Methods inherited from interface org.apache.abdera.protocol.Request
getAccept, getAcceptCharset, getAcceptEncoding, getAcceptLanguage, getAuthorization, getIfMatch, getIfModifiedSince, getIfNoneMatch, getIfUnmodifiedSince, getMaxStale, getMinFresh, isOnlyIfCached
-
-
-
-
Constructor Detail
-
RequestOptions
public RequestOptions()
Deprecated.
-
RequestOptions
public RequestOptions(Date ifModifiedSince)
Deprecated.Create the RequestOptions object with the specified If-Modified-Since header value- Parameters:
ifModifiedSince-
-
RequestOptions
public RequestOptions(String ifNoneMatch)
Deprecated.Create the RequestOptions object with the specified If-None-Match header value- Parameters:
IfNoneMatch-
-
RequestOptions
public RequestOptions(String... ifNoneMatch)
Deprecated.Create the RequestOptions object with the specified If-None-Match header value- Parameters:
IfNoneMatch-
-
RequestOptions
public RequestOptions(Date ifModifiedSince, String ifNoneMatch)
Deprecated.Create the RequestOptions object with the specified If-Modified-Since and If-None-Match header values- Parameters:
ifModifiedSince-IfNoneMatch-
-
RequestOptions
public RequestOptions(Date ifModifiedSince, String... ifNoneMatch)
Deprecated.Create the RequestOptions object with the specified If-Modified-Since and If-None-Match header values- Parameters:
ifModifiedSince-IfNoneMatch-
-
RequestOptions
public RequestOptions(boolean no_cache)
Deprecated.Create the RequestOptions object- Parameters:
no_cache- True if the request will indicate that cached responses should not be returned
-
-
Method Detail
-
getUseLocalCache
public boolean getUseLocalCache()
Deprecated.The difference between this and getNoCache is that this only disables the local cache without affecting the Cache-Control header.
-
setUseLocalCache
public RequestOptions setUseLocalCache(boolean use_cache)
Deprecated.True if the local client cache should be used
-
setContentType
public RequestOptions setContentType(String value)
Deprecated.Set the value of the HTTP Content-Type header
-
setContentLocation
public RequestOptions setContentLocation(String iri)
Deprecated.
-
setContentType
public RequestOptions setContentType(MimeType value)
Deprecated.Set the value of the HTTP Content-Type header
-
setAuthorization
public RequestOptions setAuthorization(String auth)
Deprecated.Set the value of the HTTP Authorization header
-
setEncodedHeader
public RequestOptions setEncodedHeader(String header, String charset, String value)
Deprecated.Set the value of a header using proper encoding of non-ascii characters
-
setEncodedHeader
public RequestOptions setEncodedHeader(String header, String charset, String... values)
Deprecated.Set the values of a header using proper encoding of non-ascii characters
-
setHeader
public RequestOptions setHeader(String header, String value)
Deprecated.Set the value of the specified HTTP header
-
setHeader
public RequestOptions setHeader(String header, String... values)
Deprecated.Set the value of the specified HTTP header
-
setDateHeader
public RequestOptions setDateHeader(String header, Date value)
Deprecated.Set the date value of the specified HTTP header
-
addEncodedHeader
public RequestOptions addEncodedHeader(String header, String charset, String value)
Deprecated.Similar to setEncodedHeader, but allows for multiple instances of the specified header
-
addEncodedHeader
public RequestOptions addEncodedHeader(String header, String charset, String... values)
Deprecated.Similar to setEncodedHeader, but allows for multiple instances of the specified header
-
addHeader
public RequestOptions addHeader(String header, String value)
Deprecated.Similar to setHeader but allows for multiple instances of the specified header
-
addHeader
public RequestOptions addHeader(String header, String... values)
Deprecated.Similar to setHeader but allows for multiple instances of the specified header
-
addDateHeader
public RequestOptions addDateHeader(String header, Date value)
Deprecated.Similar to setDateHeader but allows for multiple instances of the specified header
-
getHeader
public String getHeader(String header)
Deprecated.Returns the text value of the specified header
-
getHeaders
public String[] getHeaders(String header)
Deprecated.Return a listing of text values for the specified header- Specified by:
getHeadersin interfaceMessage
-
getDateHeader
public Date getDateHeader(String header)
Deprecated.Returns the date value of the specified header- Specified by:
getDateHeaderin interfaceMessage
-
getHeaderNames
public String[] getHeaderNames()
Deprecated.Returns a listing of header names- Specified by:
getHeaderNamesin interfaceMessage
-
setIfMatch
public RequestOptions setIfMatch(String entity_tag)
Deprecated.Sets the value of the HTTP If-Match header
-
setIfMatch
public RequestOptions setIfMatch(org.apache.abdera.util.EntityTag entity_tag)
Deprecated.Sets the value of the HTTP If-Match header
-
setIfMatch
public RequestOptions setIfMatch(org.apache.abdera.util.EntityTag... entity_tags)
Deprecated.Sets the value of the HTTP If-Match header
-
setIfMatch
public RequestOptions setIfMatch(String... entity_tags)
Deprecated.Sets the value of the HTTP If-Match header
-
setIfNoneMatch
public RequestOptions setIfNoneMatch(String entity_tag)
Deprecated.Sets the value of the HTTP If-None-Match header
-
setIfNoneMatch
public RequestOptions setIfNoneMatch(org.apache.abdera.util.EntityTag entity_tag)
Deprecated.Sets the value of the HTTP If-None-Match header
-
setIfNoneMatch
public RequestOptions setIfNoneMatch(org.apache.abdera.util.EntityTag... entity_tags)
Deprecated.Sets the value of the HTTP If-None-Match header
-
setIfNoneMatch
public RequestOptions setIfNoneMatch(String... entity_tags)
Deprecated.Sets the value of the HTTP If-None-Match header
-
setIfModifiedSince
public RequestOptions setIfModifiedSince(Date date)
Deprecated.Sets the value of the HTTP If-Modified-Since header
-
setIfUnmodifiedSince
public RequestOptions setIfUnmodifiedSince(Date date)
Deprecated.Sets the value of the HTTP If-Unmodified-Since header
-
setAccept
public RequestOptions setAccept(String accept)
Deprecated.Sets the value of the HTTP Accept header
-
setAccept
public RequestOptions setAccept(String... accept)
Deprecated.Sets the value of the HTTP Accept header
-
setAcceptLanguage
public RequestOptions setAcceptLanguage(Locale locale)
Deprecated.
-
setAcceptLanguage
public RequestOptions setAcceptLanguage(Locale... locales)
Deprecated.
-
setAcceptLanguage
public RequestOptions setAcceptLanguage(String accept)
Deprecated.Sets the value of the HTTP Accept-Language header
-
setAcceptLanguage
public RequestOptions setAcceptLanguage(String... accept)
Deprecated.Sets the value of the HTTP Accept-Language header
-
setAcceptCharset
public RequestOptions setAcceptCharset(String accept)
Deprecated.Sets the value of the HTTP Accept-Charset header
-
setAcceptCharset
public RequestOptions setAcceptCharset(String... accept)
Deprecated.Sets the value of the HTTP Accept-Charset header
-
setAcceptEncoding
public RequestOptions setAcceptEncoding(String accept)
Deprecated.Sets the value of the HTTP Accept-Encoding header
-
setAcceptEncoding
public RequestOptions setAcceptEncoding(String... accept)
Deprecated.Sets the value of the HTTP Accept-Encoding header
-
setSlug
public RequestOptions setSlug(String slug)
Deprecated.Sets the value of the Atom Publishing Protocol Slug header
-
setCacheControl
public RequestOptions setCacheControl(String cc)
Deprecated.Sets the value of the HTTP Cache-Control header
-
removeHeaders
public RequestOptions removeHeaders(String name)
Deprecated.Remove the specified HTTP header
-
getCacheControl
public String getCacheControl()
Deprecated.Return the value of the Cache-Control header- Specified by:
getCacheControlin interfaceMessage- Overrides:
getCacheControlin classAbstractMessage
-
getRevalidateWithAuth
public boolean getRevalidateWithAuth()
Deprecated.Configure the AbderaClient Side cache to revalidate when using Authorization
-
setRevalidateWithAuth
public RequestOptions setRevalidateWithAuth(boolean revalidateAuth)
Deprecated.Configure the AbderaClient Side cache to revalidate when using Authorization
-
isUseChunked
public boolean isUseChunked()
Deprecated.Should the request use chunked encoding?
-
setUseChunked
public RequestOptions setUseChunked(boolean useChunked)
Deprecated.Set whether the request should use chunked encoding.
-
setUsePostOverride
public RequestOptions setUsePostOverride(boolean useOverride)
Deprecated.Set whether the request should use the X-HTTP-Method-Override option
-
isUsePostOverride
public boolean isUsePostOverride()
Deprecated.Return whether the request should use the X-HTTP-Method-Override option
-
set4xxRequestException
public RequestOptions set4xxRequestException(boolean v)
Deprecated.Set whether or not to throw a RequestExeption on 4xx responses
-
is4xxRequestException
public boolean is4xxRequestException()
Deprecated.Return true if a RequestException should be thrown on 4xx responses
-
set5xxRequestException
public RequestOptions set5xxRequestException(boolean v)
Deprecated.Set whether or not to throw a RequestExeption on 5xx responses
-
is5xxRequestException
public boolean is5xxRequestException()
Deprecated.Return true if a RequestException should be thrown on 5xx responses
-
setUseExpectContinue
public RequestOptions setUseExpectContinue(boolean useExpect)
Deprecated.Set whether or not to use the HTTP Expect-Continue mechanism (enabled by default)
-
isUseExpectContinue
public boolean isUseExpectContinue()
Deprecated.Return true if Expect-Continue should be used
-
isConditionalPut
public boolean isConditionalPut()
Deprecated.True if HTTP Conditional Requests should be used automatically. This only has an effect when putting a Document that has an ETag or Last-Modified date present
-
setConditionalPut
public RequestOptions setConditionalPut(boolean conditional)
Deprecated.True if HTTP Conditinal Request should be used automatically. This only has an effect when putting a Document that has an ETag or Last-Modified date present
-
isFollowRedirects
public boolean isFollowRedirects()
Deprecated.True if the client should follow redirects automatically
-
setFollowRedirects
public RequestOptions setFollowRedirects(boolean followredirects)
Deprecated.True if the client should follow redirects automatically
-
-