|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.jackrabbit.webdav.WebdavRequestImpl
WebdavRequestImpl...
| Field Summary |
| Fields inherited from interface javax.servlet.http.HttpServletRequest |
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
| Constructor Summary | |
WebdavRequestImpl(javax.servlet.http.HttpServletRequest httpRequest,
DavLocatorFactory factory)
Creates a new DavServletRequest with the given parameters. |
|
| Method Summary | |
Object |
getAttribute(String s)
|
Enumeration |
getAttributeNames()
|
String |
getAuthType()
|
String |
getCharacterEncoding()
|
int |
getContentLength()
|
String |
getContentType()
|
String |
getContextPath()
|
javax.servlet.http.Cookie[] |
getCookies()
|
long |
getDateHeader(String s)
|
DavSession |
getDavSession()
Returns the DavSession created for this request. |
int |
getDepth()
Return the integer representation of the given Depth header. |
int |
getDepth(int defaultValue)
Returns the integer representation of the Depth header or the given defaultValue, if the Depth header is missing. |
DavResourceLocator |
getDestinationLocator()
Parse the destination header field and return the path of the destination resource. |
String |
getHeader(String s)
|
Enumeration |
getHeaderNames()
|
Enumeration |
getHeaders(String s)
|
javax.servlet.ServletInputStream |
getInputStream()
|
int |
getIntHeader(String s)
|
String |
getLabel()
Returns the Label header or null |
LabelInfo |
getLabelInfo()
Return the request body as LabelInfo object or null
if parsing the request body or the creation of the label info failed. |
Locale |
getLocale()
|
Enumeration |
getLocales()
|
LockInfo |
getLockInfo()
LockInfo object encapsulating the information passed with a LOCK
request if the LOCK request body was valid. |
String |
getLockToken()
Retrive the lock token from the 'Lock-Token' header. |
MergeInfo |
getMergeInfo()
Return the request body as MergeInfo object or null
if the creation failed due to invalid format. |
String |
getMethod()
|
OptionsInfo |
getOptionsInfo()
Returns the OptionsInfo present with the request or null. |
String |
getOrderingType()
Returns the Ordering-Type header. |
OrderPatch |
getOrderPatch()
Return a OrderPatch object encapsulating the request body
of an ORDERPATCH request or null if the request body was
either missing or could not be parsed. |
String |
getParameter(String s)
|
Map |
getParameterMap()
|
Enumeration |
getParameterNames()
|
String[] |
getParameterValues(String s)
|
String |
getPathInfo()
|
String |
getPathTranslated()
|
Position |
getPosition()
Return a Position object encapsulating the Position header field or null if no Position header is present
or does not contain a valid format. |
DavPropertyNameSet |
getPropFindProperties()
Returns the set of properties requested by the PROPFIND body or an empty set if the type is either 'allprop' or
'propname'. |
int |
getPropFindType()
Returns the type of PROPFIND as indicated by the request body. |
DavPropertyNameSet |
getPropPatchRemoveProperties()
Return the list of 'remove' entries in the PROPPATCH request body. |
DavPropertySet |
getPropPatchSetProperties()
Return the list of 'set' entries in the PROPPATCH request body. |
String |
getProtocol()
|
String |
getQueryString()
|
BufferedReader |
getReader()
|
String |
getRealPath(String s)
|
String |
getRemoteAddr()
|
String |
getRemoteHost()
|
String |
getRemoteUser()
|
ReportInfo |
getReportInfo()
Returns the request body and the Depth header as ReportInfo
object. |
javax.servlet.RequestDispatcher |
getRequestDispatcher(String s)
|
org.jdom.Document |
getRequestDocument()
Parse the Xml request body and return a Document. |
String |
getRequestedSessionId()
|
DavResourceLocator |
getRequestLocator()
Return a DavResourceLocator representing the request handle. |
String |
getRequestURI()
|
StringBuffer |
getRequestURL()
|
String |
getScheme()
|
String |
getServerName()
|
int |
getServerPort()
|
String |
getServletPath()
|
javax.servlet.http.HttpSession |
getSession()
|
javax.servlet.http.HttpSession |
getSession(boolean b)
|
String |
getSubscriptionId()
Return the SubscriptionId header
or null if no such header is present. |
SubscriptionInfo |
getSubscriptionInfo()
Return a SubscriptionInfo object representing the subscription
info present in the SUBSCRIBE request body or null if
retrieving the subscription info fails. |
long |
getTimeout()
Parse the request timeout header and convert the timeout value into a long indicating the number of milliseconds until expiration time is reached. NOTE: If the requested timeout is 'infinite' Long.MAX_VALUE
is returned. |
String |
getTransactionId()
Retrieve the transaction id from the TransactionId header. |
TransactionInfo |
getTransactionInfo()
Retrieve the 'transactioninfo' request body that must be included with the UNLOCK request of a transaction lock. |
UpdateInfo |
getUpdateInfo()
Parses the UPDATE request body a build the corresponding UpdateInfo
object. |
Principal |
getUserPrincipal()
|
boolean |
isOverwrite()
Return true if the overwrite header does not inhibit overwriting. |
boolean |
isRequestedSessionIdFromCookie()
|
boolean |
isRequestedSessionIdFromUrl()
|
boolean |
isRequestedSessionIdFromURL()
|
boolean |
isRequestedSessionIdValid()
|
boolean |
isSecure()
|
boolean |
isUserInRole(String s)
|
boolean |
matchesIfHeader(DavResource resource)
Test if the if header matches the given resource. |
boolean |
matchesIfHeader(String href,
String token,
String eTag)
Returns true, if the If header present
with the request matches to the given href, token and eTag. |
void |
removeAttribute(String s)
|
void |
setAttribute(String s,
Object o)
|
void |
setCharacterEncoding(String s)
|
void |
setDavSession(DavSession session)
Sets the session field and adds all lock tokens present with either the Lock-Token header or the If header to the given session object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public WebdavRequestImpl(javax.servlet.http.HttpServletRequest httpRequest,
DavLocatorFactory factory)
DavServletRequest with the given parameters.
httpRequest - factory - | Method Detail |
public void setDavSession(DavSession session)
setDavSession in interface DavServletRequestsession - DavServletRequest.setDavSession(DavSession)public DavSession getDavSession()
DavServletRequestDavSession created for this request.
getDavSession in interface DavServletRequestDavServletRequest.getDavSession()public DavResourceLocator getRequestLocator()
DavResourceLocator representing the request handle.
getRequestLocator in interface DavServletRequestDavServletRequest.getRequestLocator()public DavResourceLocator getDestinationLocator()
getDestinationLocator in interface DavServletRequestDavConstants.HEADER_DESTINATION,
DavServletRequest.getDestinationLocator()public boolean isOverwrite()
isOverwrite in interface DavServletRequestDavConstants.HEADER_OVERWRITE,
DavServletRequest.isOverwrite()public int getDepth(int defaultValue)
DavServletRequestDepth header or the given defaultValue, if the Depth header is missing.
getDepth in interface DavServletRequestdefaultValue - to be returned if no Depth header is present.
Depth header or the given defaultValue.DavServletRequest.getDepth(int)public int getDepth()
DavServletRequestDepth header. 'Infinity' is represented by DavConstants.DEPTH_INFINITY.
getDepth in interface DavServletRequestDepth header.DavServletRequest.getDepth()public long getTimeout()
Long.MAX_VALUE
is returned.
getTimeout in interface DavServletRequestDavServletRequest.getTimeout()public String getLockToken()
getLockToken in interface DavServletRequestIllegalArgumentException - If the value has not the correct format.DavConstants.HEADER_LOCK_TOKEN,
DavServletRequest.getLockToken()public org.jdom.Document getRequestDocument()
DavServletRequestDocument.
If the request body can not be parsed null is returned.
getRequestDocument in interface DavServletRequestDavServletRequest.getRequestDocument()public int getPropFindType()
getPropFindType in interface DavServletRequestallpropsDavServletRequest.getPropFindType()public DavPropertyNameSet getPropFindProperties()
type is either 'allprop' or
'propname'.
getPropFindProperties in interface DavServletRequestDavServletRequest.getPropFindProperties()public DavPropertySet getPropPatchSetProperties()
getPropPatchSetProperties in interface DavServletRequestDavServletRequest.getPropPatchSetProperties()public DavPropertyNameSet getPropPatchRemoveProperties()
getPropPatchRemoveProperties in interface DavServletRequestDavServletRequest.getPropPatchRemoveProperties()public LockInfo getLockInfo()
LockInfo object encapsulating the information passed with a LOCK
request if the LOCK request body was valid. If the request body is
missing a 'refresh lock' request is assumed. The LockInfo
then only provides timeout and isDeep property and returns true on
LockInfo.isRefreshLock()
getLockInfo in interface DavServletRequestnull if an error occured while
parsing the request body.DavServletRequest.getLockInfo()public boolean matchesIfHeader(DavResource resource)
resource href and the token returned from an exclusive write lock present on
the resource.null or if
the resource has not applied an exclusive write lock the preconditions are met.
If in contrast the lock applied to the given resource returns a
null lock token (e.g. for security reasons) or a lock token
that does not match, the method will return false.
matchesIfHeader in interface DavServletRequestresource - Webdav resources being operated on
DavServletRequest.matchesIfHeader(DavResource),
IfHeader.matches(String, String, String),
DavResource.hasLock(org.apache.jackrabbit.webdav.lock.Type, org.apache.jackrabbit.webdav.lock.Scope),
ActiveLock.getToken()
public boolean matchesIfHeader(String href,
String token,
String eTag)
DavServletRequestIf header present
with the request matches to the given href, token and eTag.
matchesIfHeader in interface DavServletRequesthref - token - eTag -
DavServletRequest.matchesIfHeader(String, String, String),
IfHeader.matches(String, String, String)public String getTransactionId()
TransactionDavServletRequestTransactionId header.
getTransactionId in interface TransactionDavServletRequestTransactionId header
or null.TransactionDavServletRequest.getTransactionId()public TransactionInfo getTransactionInfo()
TransactionDavServletRequestnull is returned.
getTransactionInfo in interface TransactionDavServletRequestTransactionInfo object encapsulating the 'transactioninfo'
Xml element present in the request body or null if no
body is present or if it could not be parsed.- See Also:
TransactionDavServletRequest.getTransactionInfo()public String getSubscriptionId()
ObservationDavServletRequestSubscriptionId header
or null if no such header is present.
getSubscriptionId in interface ObservationDavServletRequestSubscriptionId headerObservationDavServletRequest.getSubscriptionId()public SubscriptionInfo getSubscriptionInfo()
ObservationDavServletRequestSubscriptionInfo object representing the subscription
info present in the SUBSCRIBE request body or null if
retrieving the subscription info fails.
getSubscriptionInfo in interface ObservationDavServletRequestnull if the subscription info cannot be built.ObservationDavServletRequest.getSubscriptionInfo()public String getOrderingType()
OrderingDavServletRequestOrdering-Type header.
getOrderingType in interface OrderingDavServletRequestOrdering-Type header.OrderingDavServletRequest.getOrderingType()public Position getPosition()
OrderingDavServletRequestPosition object encapsulating the Position header field or null if no Position header is present
or does not contain a valid format.
getPosition in interface OrderingDavServletRequestPosition object encapsulating the Position headerOrderingDavServletRequest.getPosition()public OrderPatch getOrderPatch()
OrderingDavServletRequestOrderPatch object encapsulating the request body
of an ORDERPATCH request or null if the request body was
either missing or could not be parsed.
getOrderPatch in interface OrderingDavServletRequestOrderPatch object representing the orderpatch request
body or null if theOrderingDavServletRequest.getOrderPatch()public String getLabel()
DeltaVServletRequestnull
getLabel in interface DeltaVServletRequestnullDeltaVServletRequest.getLabel()public LabelInfo getLabelInfo()
DeltaVServletRequestLabelInfo object or null
if parsing the request body or the creation of the label info failed.
getLabelInfo in interface DeltaVServletRequestLabelInfo object or nullDeltaVServletRequest.getLabelInfo()public MergeInfo getMergeInfo()
DeltaVServletRequestMergeInfo object or null
if the creation failed due to invalid format.
getMergeInfo in interface DeltaVServletRequestMergeInfo object or nullDeltaVServletRequest.getMergeInfo()public UpdateInfo getUpdateInfo()
DeltaVServletRequestUpdateInfo
object. If the request body is missing or does not of the required format
null is returned.
getUpdateInfo in interface DeltaVServletRequestnullDeltaVServletRequest.getUpdateInfo()public ReportInfo getReportInfo()
DeltaVServletRequestReportInfo
object. The default depth, if no Depth header, is DavConstants.DEPTH_0.
If the requuest body could not be parsed into an Element
null is returned.
getReportInfo in interface DeltaVServletRequestReportInfo or nullDeltaVServletRequest.getReportInfo()public OptionsInfo getOptionsInfo()
DeltaVServletRequestOptionsInfo present with the request or null.
getOptionsInfo in interface DeltaVServletRequestOptionsInfo or nullDeltaVServletRequest.getOptionsInfo()public String getAuthType()
getAuthType in interface javax.servlet.http.HttpServletRequestpublic javax.servlet.http.Cookie[] getCookies()
getCookies in interface javax.servlet.http.HttpServletRequestpublic long getDateHeader(String s)
getDateHeader in interface javax.servlet.http.HttpServletRequestpublic String getHeader(String s)
getHeader in interface javax.servlet.http.HttpServletRequestpublic Enumeration getHeaders(String s)
getHeaders in interface javax.servlet.http.HttpServletRequestpublic Enumeration getHeaderNames()
getHeaderNames in interface javax.servlet.http.HttpServletRequestpublic int getIntHeader(String s)
getIntHeader in interface javax.servlet.http.HttpServletRequestpublic String getMethod()
getMethod in interface javax.servlet.http.HttpServletRequestpublic String getPathInfo()
getPathInfo in interface javax.servlet.http.HttpServletRequestpublic String getPathTranslated()
getPathTranslated in interface javax.servlet.http.HttpServletRequestpublic String getContextPath()
getContextPath in interface javax.servlet.http.HttpServletRequestpublic String getQueryString()
getQueryString in interface javax.servlet.http.HttpServletRequestpublic String getRemoteUser()
getRemoteUser in interface javax.servlet.http.HttpServletRequestpublic boolean isUserInRole(String s)
isUserInRole in interface javax.servlet.http.HttpServletRequestpublic Principal getUserPrincipal()
getUserPrincipal in interface javax.servlet.http.HttpServletRequestpublic String getRequestedSessionId()
getRequestedSessionId in interface javax.servlet.http.HttpServletRequestpublic String getRequestURI()
getRequestURI in interface javax.servlet.http.HttpServletRequestpublic StringBuffer getRequestURL()
getRequestURL in interface javax.servlet.http.HttpServletRequestpublic String getServletPath()
getServletPath in interface javax.servlet.http.HttpServletRequestpublic javax.servlet.http.HttpSession getSession(boolean b)
getSession in interface javax.servlet.http.HttpServletRequestpublic javax.servlet.http.HttpSession getSession()
getSession in interface javax.servlet.http.HttpServletRequestpublic boolean isRequestedSessionIdValid()
isRequestedSessionIdValid in interface javax.servlet.http.HttpServletRequestpublic boolean isRequestedSessionIdFromCookie()
isRequestedSessionIdFromCookie in interface javax.servlet.http.HttpServletRequestpublic boolean isRequestedSessionIdFromURL()
isRequestedSessionIdFromURL in interface javax.servlet.http.HttpServletRequestpublic boolean isRequestedSessionIdFromUrl()
isRequestedSessionIdFromUrl in interface javax.servlet.http.HttpServletRequestpublic Object getAttribute(String s)
getAttribute in interface javax.servlet.ServletRequestpublic Enumeration getAttributeNames()
getAttributeNames in interface javax.servlet.ServletRequestpublic String getCharacterEncoding()
getCharacterEncoding in interface javax.servlet.ServletRequest
public void setCharacterEncoding(String s)
throws UnsupportedEncodingException
setCharacterEncoding in interface javax.servlet.ServletRequestUnsupportedEncodingExceptionpublic int getContentLength()
getContentLength in interface javax.servlet.ServletRequestpublic String getContentType()
getContentType in interface javax.servlet.ServletRequest
public javax.servlet.ServletInputStream getInputStream()
throws IOException
getInputStream in interface javax.servlet.ServletRequestIOExceptionpublic String getParameter(String s)
getParameter in interface javax.servlet.ServletRequestpublic Enumeration getParameterNames()
getParameterNames in interface javax.servlet.ServletRequestpublic String[] getParameterValues(String s)
getParameterValues in interface javax.servlet.ServletRequestpublic Map getParameterMap()
getParameterMap in interface javax.servlet.ServletRequestpublic String getProtocol()
getProtocol in interface javax.servlet.ServletRequestpublic String getScheme()
getScheme in interface javax.servlet.ServletRequestpublic String getServerName()
getServerName in interface javax.servlet.ServletRequestpublic int getServerPort()
getServerPort in interface javax.servlet.ServletRequest
public BufferedReader getReader()
throws IOException
getReader in interface javax.servlet.ServletRequestIOExceptionpublic String getRemoteAddr()
getRemoteAddr in interface javax.servlet.ServletRequestpublic String getRemoteHost()
getRemoteHost in interface javax.servlet.ServletRequest
public void setAttribute(String s,
Object o)
setAttribute in interface javax.servlet.ServletRequestpublic void removeAttribute(String s)
removeAttribute in interface javax.servlet.ServletRequestpublic Locale getLocale()
getLocale in interface javax.servlet.ServletRequestpublic Enumeration getLocales()
getLocales in interface javax.servlet.ServletRequestpublic boolean isSecure()
isSecure in interface javax.servlet.ServletRequestpublic javax.servlet.RequestDispatcher getRequestDispatcher(String s)
getRequestDispatcher in interface javax.servlet.ServletRequestpublic String getRealPath(String s)
getRealPath in interface javax.servlet.ServletRequest
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||