|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ithit.webdav.server.Engine
public abstract class Engine
Serves as the abstract base class for WebDAV engine.
| Constructor Summary | |
|---|---|
Engine()
|
|
| Method Summary | |
|---|---|
boolean |
getAutoPutUnderVersionControl()
Determines if placing file under version control is automatic. |
boolean |
getCalculateContentLength()
Indicates if response content length calculation will occur. |
static java.util.List<java.lang.String> |
getClientLockTokens(javax.servlet.http.HttpServletRequest request)
Gets the array of lock tokens submitted by client. |
abstract HierarchyItem |
getHierarchyItem(java.lang.String contextPath)
Implementation of this abstract method is used by WebDAV engine to find hierarchy item objects by path. |
abstract java.lang.String |
getLicense()
Returns license string. |
abstract Logger |
getLogger()
Returns logger that will be used by engine. |
MethodHandler |
registerMethodHandler(java.lang.String method,
MethodHandler handler)
Registers custom method handler. |
void |
service(javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse)
Handles request. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Engine()
| Method Detail |
|---|
public abstract HierarchyItem getHierarchyItem(java.lang.String contextPath)
throws ServerException
When you inherit from the Engine class, you must override this abstract method.
For WebDAV Class 1 or Class 2 server in this method implementation you will search for file or folder in your storage
by path provided and return it to WebDAV engine. For DeltaV server in addition to folder and file you will return version
and history items.
contextPath - Path of the hierarchy item object.
It is always the full path from the root of the WebDAV repository.
null
if hierarchy item not found.
ServerException - Something unexpected occurred.public abstract Logger getLogger()
Logger.public abstract java.lang.String getLicense()
public MethodHandler registerMethodHandler(java.lang.String method,
MethodHandler handler)
Using this method you can register custom method handler to be caller by the engine. If the handler for the specified method was already defined it is returned from this method. The original handler can be saved and called later from your custom handler.
method - HTTP verb.handler - Custom handled implementing MethodHandler interface.
public static java.util.List<java.lang.String> getClientLockTokens(javax.servlet.http.HttpServletRequest request)
Gets array of lock tokens submitted by client. You must generate the lock tokens during the call to your
Lock.lock(boolean, boolean, long, java.lang.String) method implementation. During this call you associate generated token with an item in
the repository and return it to the Engine. Engine than sends the new token to the WebDAV client.
When WebDAV client is modifying any server item it sends back to server the list of lock tokens.
In your WebDAV server Class 2 implementation before modifying any locked items you must check if WebDAV
client provided necessary lock token.
request - Instance of HttpServletRequest
public boolean getAutoPutUnderVersionControl()
Determines whether files will be placed under version control automatically or explicit request from client shall be made to put a file under version control.
If this property is true prior any item content or properties update
VersionableItem.putUnderVersionControl(boolean) will be called.
public boolean getCalculateContentLength()
If this method returns true engine will calculate output content length and set
ServletResponse.setContentLength(int) property before returning from service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) method.
If you would like to send chunked responses you must set this property to false.
service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) method.
Default is true.
public void service(javax.servlet.http.HttpServletRequest servletRequest,
javax.servlet.http.HttpServletResponse servletResponse)
throws DavException,
java.io.IOException
servletRequest - request.servletResponse - response.
DavException - If an error occurrs in user or engine implementation.
java.io.IOException - If i/o exception occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||