Namespace: OpenEdge.Web.Dynamic
Class
ContentHandler
Parent classes:
Inherits: OpenEdge.Web.WebHandler

/*
/*




Method Summary
Options Name Purpose
AddValidPath (character) /* * Add a path prefix to the list of allowed paths. * Paths are relative to WEB-INF and must start with / */
LOGICAL CanAcceptContentType (IWebRequest, character) /* Ensures that the request's Accept header and the operation's ContentType values are compatible, per https://tools.ietf.org/html/rfc7231#section-5.3.2 ContentType must be a complete type/subtype. Accept may contain type/subtype, type/<star> or <star>/<star> values. If <star>/<star> values appear the we can service the request. @param IWebRequest The request that resulting in the exception @param character The MIME type we're wanting to return (usally from the operation) @return logical TRUE if the operation's ContentType is compatible with the request's Accept value */
Inherited from OpenEdge.Web.WebHandler
CHARACTER GetContentDirectory (IWebRequest) /* * Get the directory for the files served by the handler */
CHARACTER GetContentPath (IWebRequest) /* * Get the path for the file to be served by the handler */
CHARACTER GetFileExtension (character) /* * Get the file name extension */
CHARACTER GetFilePathFromRequest (IWebRequest) /* * Extract from the request the full path to the requested file. */
INTEGER HandleDelete (IWebRequest) /* Default handler for the HTTP DELETE method @param IWebRequest The request being serviced @return integer An optional status code. A zero or null value means this method will deal with all errors */
Inherited from OpenEdge.Web.WebHandler
INTEGER HandleException (Error, IWebRequest) /* Handles an exception that has been raised while dealing with the request @param Progress.Lang.Error The as-yet-unhandled exception @param IWebRequest The request that resulting in the exception @return integer A non-null status code use to deal with errors */
Inherited from OpenEdge.Web.WebHandler
INTEGER HandleGet (IWebRequest) /* * Handle GET request. Returns files from directory. */
Overrides OpenEdge.Web.WebHandler:HandleGet (IWebRequest)
INTEGER HandleHead (IWebRequest) /* Default handler for the HTTP HEAD method @param IWebRequest The request being serviced @return integer An optional status code. A zero or null value means this method will deal with all errors */
Inherited from OpenEdge.Web.WebHandler
INTEGER HandleNotAllowedMethod (IWebRequest) /* * Handle methods that are marked as not allowed */
Overrides OpenEdge.Web.WebHandler:HandleNotAllowedMethod (IWebRequest)
INTEGER HandleNotImplemented (IWebRequest) /* * Handle methods that are not implemented */
Overrides OpenEdge.Web.WebHandler:HandleNotImplemented (IWebRequest)
INTEGER HandleOptions (IWebRequest) /* Default handler for the HTTP OPTIONS method @param IWebRequest The request being serviced @return integer An optional status code. A zero or null value means this method will deal with all errors */
Inherited from OpenEdge.Web.WebHandler
INTEGER HandlePatch (IWebRequest) /* Default handler for the HTTP PATCH method @param IWebRequest The request being serviced @return integer An optional status code. A zero or null value means this method will deal with all errors */
Inherited from OpenEdge.Web.WebHandler
INTEGER HandlePost (IWebRequest) /* Default handler for the HTTP POST method @param IWebRequest The request being serviced @return integer An optional status code. A zero or null value means this method will deal with all errors */
Inherited from OpenEdge.Web.WebHandler
INTEGER HandlePut (IWebRequest) /* Default handler for the HTTP PUT method @param IWebRequest The request being serviced @return integer An optional status code. A zero or null value means this method will deal with all errors */
Inherited from OpenEdge.Web.WebHandler
INTEGER HandleRequest () /* Handle request by calling the specific handler for the request method @return integer An HTTP status code. Zero means that the webhandler will take care of any errors. A non-zero value means that the PASOE webapp's error handling will return a standard page for the error */
Inherited from OpenEdge.Web.WebHandler
INTEGER HandleTrace (IWebRequest) /* Default handler for the HTTP TRACE method @param IWebRequest The request being serviced @return integer An optional status code. A zero or null value means this method will deal with all errors */
Inherited from OpenEdge.Web.WebHandler
LOGICAL IsValidPath (IWebRequest) /* * Check a list of path prefixes to see if this request is * for a file in a valid directory. */
LogMessage (character, integer) /** Logs a message @param character The message to log @param integer The level this message should be logged at */
Inherited from OpenEdge.Web.WebHandler
WriteFile (WebResponse, WebResponseWriter, character) /* * Write file to the response stream */

Constructor Summary
Options Name Purpose
ContentHandler ()

Property Summary
Options Name Purpose
ILogWriter Logger
Inherited from OpenEdge.Web.WebHandler


Method Detail
Top

PUBLIC AddValidPath (character)

/*
Parameters:
cPath CHARACTER
Top

PROTECTED LOGICAL CanAcceptContentType (IWebRequest, character)

Inherited from OpenEdge.Web.WebHandler
/* Ensures that the request's Accept header and the operation's
ContentType values are compatible, per https://tools.ietf.org/html/rfc7231#section-5.3.2
ContentType must be a complete type/subtype.
Accept may contain type/subtype, type/<star> or <star>/<star> values. If <star>/<star>
values appear the we can service the request.
Parameters:
pRequest IWebRequest
pContentType CHARACTER
Returns LOGICAL
logical TRUE if the operation's ContentType is compatible with the request's Accept value
Top

PROTECTED CHARACTER GetContentDirectory (IWebRequest)

/*
Parameters:
poRequest OpenEdge.Web.IWebRequest
Returns CHARACTER
Top

PROTECTED CHARACTER GetContentPath (IWebRequest)

/*
Parameters:
poRequest OpenEdge.Web.IWebRequest
Returns CHARACTER
Top

PRIVATE CHARACTER GetFileExtension (character)

/*
Parameters:
cPathName CHARACTER
Returns CHARACTER
Top

PROTECTED CHARACTER GetFilePathFromRequest (IWebRequest)

/*
Parameters:
poRequest OpenEdge.Web.IWebRequest
Returns CHARACTER
Top

PROTECTED INTEGER HandleDelete (IWebRequest)

Inherited from OpenEdge.Web.WebHandler
/* Default handler for the HTTP DELETE method
method will deal with all errors
Parameters:
poRequest IWebRequest
Returns INTEGER
integer An optional status code. A zero or null value means this
Top

PROTECTED INTEGER HandleException (Error, IWebRequest)

Inherited from OpenEdge.Web.WebHandler
/* Handles an exception that has been raised while dealing with the request
Parameters:
poError Progress.Lang.Error
poRequest IWebRequest
Returns INTEGER
integer A non-null status code use to deal with errors
Top

PROTECTED INTEGER HandleGet (IWebRequest)

Overrides OpenEdge.Web.WebHandler:HandleGet (IWebRequest)
/*
Parameters:
poRequest OpenEdge.Web.IWebRequest
Returns INTEGER
Top

PROTECTED INTEGER HandleHead (IWebRequest)

Inherited from OpenEdge.Web.WebHandler
/* Default handler for the HTTP HEAD method
method will deal with all errors
Parameters:
poRequest IWebRequest
Returns INTEGER
integer An optional status code. A zero or null value means this
Top

PROTECTED INTEGER HandleNotAllowedMethod (IWebRequest)

Overrides OpenEdge.Web.WebHandler:HandleNotAllowedMethod (IWebRequest)
/*
Parameters:
poRequest OpenEdge.Web.IWebRequest
Returns INTEGER
Top

PROTECTED INTEGER HandleNotImplemented (IWebRequest)

Overrides OpenEdge.Web.WebHandler:HandleNotImplemented (IWebRequest)
/*
Parameters:
poRequest OpenEdge.Web.IWebRequest
Returns INTEGER
Top

PROTECTED INTEGER HandleOptions (IWebRequest)

Inherited from OpenEdge.Web.WebHandler
/* Default handler for the HTTP OPTIONS method
method will deal with all errors
Parameters:
poRequest IWebRequest
Returns INTEGER
integer An optional status code. A zero or null value means this
Top

PROTECTED INTEGER HandlePatch (IWebRequest)

Inherited from OpenEdge.Web.WebHandler
/* Default handler for the HTTP PATCH method
method will deal with all errors
Parameters:
poRequest IWebRequest
Returns INTEGER
integer An optional status code. A zero or null value means this
Top

PROTECTED INTEGER HandlePost (IWebRequest)

Inherited from OpenEdge.Web.WebHandler
/* Default handler for the HTTP POST method
method will deal with all errors
Parameters:
poRequest IWebRequest
Returns INTEGER
integer An optional status code. A zero or null value means this
Top

PROTECTED INTEGER HandlePut (IWebRequest)

Inherited from OpenEdge.Web.WebHandler
/* Default handler for the HTTP PUT method
method will deal with all errors
Parameters:
poRequest IWebRequest
Returns INTEGER
integer An optional status code. A zero or null value means this
Top

PUBLIC INTEGER HandleRequest ()

Inherited from OpenEdge.Web.WebHandler
/* Handle request by calling the specific handler for the request method
any errors. A non-zero value means that the PASOE webapp's error handling
will return a standard page for the error
Returns INTEGER
integer An HTTP status code. Zero means that the webhandler will take care of
Top

PROTECTED INTEGER HandleTrace (IWebRequest)

Inherited from OpenEdge.Web.WebHandler
/* Default handler for the HTTP TRACE method
method will deal with all errors
Parameters:
poRequest IWebRequest
Returns INTEGER
integer An optional status code. A zero or null value means this
Top

PROTECTED LOGICAL IsValidPath (IWebRequest)

/*
Parameters:
poRequest OpenEdge.Web.IWebRequest
Returns LOGICAL
Top

PROTECTED LogMessage (character, integer)

Inherited from OpenEdge.Web.WebHandler
Purpose: Logs a message
Parameters:
pcMessage CHARACTER
piLogLevel INTEGER
Top

PRIVATE WriteFile (WebResponse, WebResponseWriter, character)

/*
Parameters:
response OpenEdge.Web.WebResponse
writer OpenEdge.Web.WebResponseWriter
cFullPathName CHARACTER


Constructor Detail
Top

PUBLIC ContentHandler ()



Property Detail
Top

PUBLIC ILogWriter Logger

Inherited from OpenEdge.Web.WebHandler
Returns ILogWriter


Copyright © 2020 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 12.2.0