public abstract class OwAppContext extends OwEventTarget implements OwGlobalRegistryContext
Main Application Context Class Base Implementation. Instance stays active during session.
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
Modifier and Type | Class and Description |
---|---|
static class |
OwAppContext.OwDialogManagerViewReference
View reference for the dynamically changing dialog manager.
|
Modifier and Type | Field and Description |
---|---|
static String |
AJAX_REQUEST_TYPE
the name of request attribute used to mark a request as an AJAX request
|
static String |
CONFIG_JNDI_SUFFIX
suffix for JNDI names
|
static String |
CONFIG_STREAM_NAME_PREFIX
prefix for config file / stream / JNDI names
|
static String |
EXTERNAL_REQUEST_TARGET_ID
target ID query string key for external requests, used for remote control
|
static String |
FULLJS_MARKER
support to execute completely the java script, without adding default return
|
static String |
INTERNAL_REQUEST_TARGET_ID
target ID query string key for internal requests
|
static int |
KEYBOARD_CTRLKEY_ALT
control key ID
|
static int |
KEYBOARD_CTRLKEY_CTRL
control key ID
|
static int |
KEYBOARD_CTRLKEY_META
META control key ID, like the CMD on MacOS keyboard
|
static int |
KEYBOARD_CTRLKEY_NONE
control key ID
|
static int |
KEYBOARD_CTRLKEY_SHIFT
control key ID
|
static int |
KEYBOARD_KEY_DEL
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_DN
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_END
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_ESC
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_F1
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_F10
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_F11
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_F12
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_F2
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_F3
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_F4
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_F5
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_F6
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_F7
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_F8
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_F9
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_INS
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_LEFT
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_PAGE_DN
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_PAGE_UP
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_POS1
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_RETURN
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_RIGHT
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_SPACE
key board key ID for the registerKeyEvent function
|
static int |
KEYBOARD_KEY_UP
key board key ID for the registerKeyEvent function
|
static String |
LOGIN_VIEW_TARGET_ID
predefined target ID for the login view
|
String |
m_DEBUG_ActivateViewID
debug variable contains the ID of the last activated view via a OwNavigationView event.
|
String |
m_DEBUG_NavigationEvent
debug variable contains the event name last called via a OwNavigationView event.
|
String |
m_DEBUG_NavigationTargetID
debug variable contains the ID of the view last called via a OwNavigationView event.
|
protected javax.servlet.ServletContext |
m_ServletContext
servlet context reference for this session
|
static String |
MAIN_VIEW_TARGET_ID
predefined target ID for the main view
|
static String |
PREPARED_REQUEST_URL |
static String |
RESOURCE_CLASSPATH_PREFIX
prefix to configure a subdir in the java class path (WEB-INF/classes or WEB-INF/lib)
|
static String |
RESOURCE_DEPLOYMENT_PREFIX
prefix to configure a subdir in the deployment structure
|
static String |
RESOURCE_FILE_PATH_ENVIRONMENT_VAR_NAME_PARAM
parameter name of the resource file path environment var name in web.xml
|
static String |
RESOURCE_FILE_PATH_PARAM
parameter name of the resource file path in web.xml
|
static String |
SELECTED_ANCHOR
name of the anchor which will be append on the URL
|
static String |
TIME_ZONE_DAYLIGHTSAVINGS_PARAMETER_NAME |
static String |
TIME_ZONE_ID_PARAMETER_NAME |
static String |
TIME_ZONE_NORTHERN_HEMISPHERE_PARAMETER_NAME |
static String |
TIME_ZONE_OFFSET_PARAMETER_NAME |
static String |
TIME_ZONE_TIME_PARAMETER_NAME |
static String |
TIME_ZONE_TRANSITIONS_PARAMETER_NAME |
Constructor and Description |
---|
OwAppContext()
Creates a new instance of OwAppContext
|
Modifier and Type | Method and Description |
---|---|
void |
activateView(String strTargetID_p)
activate view designated by the TargetID, i.e.
|
void |
beginRequest()
signal that request has started to prevent concurrent requests.
|
void |
broadcast(OwEventTarget caller_p,
int iCode_p)
causes all attached documents to receive an update event
|
void |
clearFocusControlID()
clear the focus control ID for the request
|
void |
closeAllDialogs()
closes all dialogs
|
protected abstract OwAOProvider |
createAOProvider() |
protected OwBaseInitializer |
createBaseInitializer(javax.servlet.ServletContext context_p)
Creates a base initializer for a given context.
|
protected String |
createBaseUrl(javax.servlet.http.HttpServletRequest req_p)
(overridable)
Create base URL which will be used to process the request.
|
protected String |
createJspPageUrl(javax.servlet.http.HttpServletRequest req_p)
(overridable)
URL with jsp page, like server URL + context path.
|
protected String |
createServerUrl(javax.servlet.http.HttpServletRequest req_p)
(overridable)
Called to create the server URL for current request.
|
protected static String |
createSubmitFunction(String formName_p,
String eventUrl_p)
creates JavaSript statements to fire a form submit
event URL is enclosed in single apostrophe
|
protected static String |
createSubmitLink(String formName_p,
String eventUrl_p)
creates a href link to fire a form submit
event URL is enclosed in single apostrophe
|
static String |
decodeURL(String strURL_p)
decodes a URL or part of an URL, that was previously encoded using encodeURL.
|
void |
dump(Writer w_p)
write debug dump to Writer.
|
static String |
encodeURL(String strURL_p)
encodes a URL or part of an URL so it conforms to HTTP standard (application/x-www-form-URL-encoded MIME format)
|
void |
endRequest()
signal that request has ended and to prevent OwPendingSessionException in beginRequest,
to prevent concurrent requests.
|
String |
getAjaxEventURL(OwEventTarget target_p,
String strEventName_p,
String strAdditionalParameters_p)
get a URL for the requested AJAX event and redirect to submitted view
|
OwAOProvider |
getAOProvider() |
protected abstract URL |
getAppContextResource(String resourcePath_p)
(overridable)
Retrieves a resource for this application context.
|
Object |
getApplicationAttribute(String key_p)
get a attribute from the application scope
|
protected StringBuffer |
getBaseEventURL(OwEventTarget target_p,
String strEventName_p)
get a base URL with no additional parameters for the requested event and redirect to submitted view
|
String |
getBasePath()
get the base path to the application
|
String |
getBaseURL()
get the URL to the web application context root
|
TimeZone |
getClientTimeZone() |
OwTimeZoneInfo |
getClientTimeZoneInfo()
Get client's time zone offset information.
|
URL |
getConfigURL(String strName_p)
loads a URL for a configuration either from local file,
external file or from a JNDI context
|
abstract String |
getDesignDir()
get the directory of the used design.
|
abstract String |
getDesignURL()
get the URL of the used design.
|
abstract OwDialogManager |
getDialogManager()
get a reference to the default dialog manager used to open dialogs from the context in openDialog(...)
The dialog manager must be created somewhere in the layout and returned here.
|
OwBaseView |
getDialogManagerViewReference()
return a view reference for the dynamically changing dialog manager
|
Collection<? extends OwEventDescription> |
getEventDescriptions() |
OwEventTarget |
getEventTarget(String strName_p)
find the registered event target
|
String |
getEventURL(OwEventTarget target_p,
String strEventName_p,
String strAdditionalParameters_p)
get a URL for the requested event and redirect to submitted view
|
String |
getFocusControlID()
get the ID of a control that should receive the input focus for this request
|
String |
getFormEventFunction(OwEventTarget target_p,
String strEventName_p,
String strAdditionalParameters_p,
String strFormName_p)
get a script function for the requested event sending the form data defined in the event target with getFormName()
|
String |
getFormEventURL(OwEventTarget target_p,
String strEventName_p,
String strAdditionalParameters_p,
String strFormName_p)
get a URL for the requested event sending the form data defined in the event target with getFormName()
|
javax.servlet.http.HttpServletRequest |
getHttpRequest()
get the current HTTP request
|
javax.servlet.http.HttpServletResponse |
getHttpResponse()
get the current HTTP response
|
javax.servlet.ServletContext |
getHttpServletContext()
get the current HHTP servlet context
|
javax.servlet.http.HttpSession |
getHttpSession()
get the current HTTP session
|
String |
getInfiniteEventURL(OwEventTarget target_p,
String strEventName_p,
String strAdditionalParameters_p)
get a URL for the requested event and redirect to submitted view
The URL is infinite, meaning that it can be used in all following requests
where a normal event URL is only valid for the very next request.
|
abstract OwInfoProviderRegistry |
getInfoProviderRegistry()
Get a info provider registry which is used to
request information provider for special context.
|
String |
getInitParameter(String strParamName_p)
get a parameter from the web.xml config file
|
String |
getJSPPageURL()
get the name of the JSP Page
|
Collection<OwKeyEvent> |
getKeyEvents()
get a Collection of Lists of registered OwKeyEvents.
|
abstract Locale |
getLocale()
get the current locale,
which can be used as a prefix/postfix to distinguish localization resources
|
<T> T |
getRegisteredInterface(Class<T> typeClass)
Return the cached object, if any is contained.
|
String |
getServerURL()
get the URL to the web application server
|
abstract String |
getSessionDisplayName()
get a name for the current session,
used for warning and error logs to identify the session later.
|
int |
getTargetCount()
retrieves the target count in the context.
|
OwBaseUserInfo |
getUserInfo()
get the logged in user
|
InputStream |
getXMLConfigDoc(String strName_p)
loads a XML Document either from local file, external file or from a JNDI context
|
void |
handleAjaxRequest(javax.servlet.http.HttpServletRequest request_p,
javax.servlet.http.HttpServletResponse response_p)
handles the AJAX request and dispatches to the correct target
|
protected boolean |
handleExternalTargetRequest(javax.servlet.http.HttpServletRequest request_p,
javax.servlet.http.HttpServletResponse response_p)
Method which executes external target request, and return a
result if the external target request was processed successful or not.
|
boolean |
handleRequest(javax.servlet.http.HttpServletRequest request_p,
javax.servlet.http.HttpServletResponse response_p)
handles the JSP request from the page and dispatches to the correct target
|
void |
init(OwAppContext oldcontext_p)
init the context BEFORE the user has logged on.
|
boolean |
isAjaxRequest()
Check if the current
HttpServletRequest object is an AJAX request. |
abstract boolean |
isContainerBasedAuthenticated()
check the current user is authenticated container based
|
boolean |
isExternalTargetRequest(javax.servlet.http.HttpServletRequest request_p)
Check if the request contains an external target id.
|
protected boolean |
isFormRequest(javax.servlet.http.HttpServletRequest request_p)
Returns whether this request carries FORM data and thus the
onFormEvent()
of the target has to be invoked or not. |
abstract boolean |
isLogin()
check the valid credentials of the logged in user
|
String |
localize(String strKey_p,
String strText_p)
localizes a string
|
String |
localize1(String strKey_p,
String strText_p,
String strAttribute1_p)
localizes a string with additional parameter that is replaced with %1
|
String |
localize2(String strKey_p,
String strText_p,
String strAttribute1_p,
String strAttribute2_p)
localizes a string with additional parameter that is replaced with %1
|
String |
localize3(String strKey_p,
String strText_p,
String strAttribute1_p,
String strAttribute2_p,
String strAttribute3_p)
localizes a string with additional parameter that is replaced with %1
|
abstract void |
loginInit()
init the context AFTER the user has logged in.
|
void |
logout()
clear the credentials, i.e.
|
void |
openDialog(OwDialog dialogView_p,
OwDialog.OwDialogListener listener_p)
display a new dialog using the dialog manager set in setDialogManager(...)
After it is closed it gets removed from the DialogManager and the context to finalize the Dialog View
|
boolean |
prepareRequest(javax.servlet.http.HttpServletRequest request_p,
javax.servlet.http.HttpServletResponse response_p)
Request precondition handler for all JSP based requests.
|
void |
registerInterface(Class<?> typeClass,
Object object)
Register some specific object for a defined class/interface.
|
void |
registerKeyAction(OwKeyAction action) |
void |
registerKeyAction(String actionId,
String strEventURL,
String description) |
void |
registerKeyAction(String actionId,
String strEventURL,
String strFormName,
String description) |
void |
registerKeyEvent(int iKeyCode_p,
int iCtrlKey_p,
String strEventURL_p,
String description_p)
register a keyboard key to a event URL,
the registered key is only valid for one page request, so it must be called in onRender
|
void |
registerKeyEvent(OwKeyEvent keyEvent) |
void |
registerKeyFormEvent(int iKeyCode_p,
int iCtrlKey_p,
String strEventURL_p,
String strFormName_p,
String description_p)
register a keyboard key to a event URL,
the registered key is only valid for one page request, so it must be called in onRender
|
void |
registerMouseAction(String actionId,
OwString description) |
void |
registerMouseEventDescription(OwMouseEventDescription mouseEventDescription) |
void |
registerRequestTarget(OwEventTarget target_p)
registers a target to receive onRequest(...) events for each request
the target must already be registered with registerTarget or OwEventTarget.attach
|
String |
registerTarget(OwEventTarget target_p,
String strName_p)
register the event target in the context and assign a unique ID
|
void |
removeTarget(OwEventTarget target_p)
remove the event target from the context
|
void |
removeTarget(String strID_p)
remove the event target from the context
|
void |
renderJSInclude(String sJSPath_p,
boolean useDebug_p,
Writer w_p)
Used to include ExtJs scripts, in production or debug mode
|
void |
renderJSInclude(String sJSPath_p,
Writer w_p)
render a JavaScript include link.
|
void |
renderKeyBoardScript(Writer w_p)
Deprecated.
|
void |
serverSideInclude(String path_p,
Writer w_p)
Include the specified URL writing its output to the current Writer
object.
|
void |
setAjaxRequest(boolean isAjaxRequest_p)
Set a marking attribute on the current
HttpServletRequest object. |
Object |
setApplicationAttribute(String key_p,
Object object_p)
get a attribute from the application scope
|
void |
setClientTimeZoneInfo(OwTimeZoneInfo timeZoneInfo_p)
Set client's time zone information.
|
void |
setFocusControlID(String strElementID_p)
set the ID of a HTML element to receive focus upon page load
|
abstract void |
setLocale(Locale locale_p) |
static void |
setLocalThreadRequest(javax.servlet.http.HttpServletRequest request_p)
Deprecated.
since 4.2.0.0 using OwRequestContext.setLocalThreadRequest instead, calling method will have no effect
|
static void |
setLocalThreadResponse(javax.servlet.http.HttpServletResponse response_p)
Deprecated.
since 4.2.0.0 using OwRequestContext.setLocalThreadResponse instead, calling method will have no effect
|
void |
setRequest(javax.servlet.ServletContext context_p,
javax.servlet.http.HttpServletRequest request_p,
javax.servlet.http.HttpServletResponse response_p)
set the request parameters, called upon each request, MUST BE CALLED BEFORE INIT.
|
<T> T |
unregisterInterface(Class<T> typeClass)
Unregister the object for given class/interface.
|
void |
unregisterRequestTarget(OwEventTarget target_p)
unregisters a target to receive onRequest(...) events for each request
the target must already be registered with registerTarget or OwEventTarget.attach
|
attach, detach, disableRequestListener, enableRequestListener, getAjaxEventURL, getContext, getEventURL, getFormEventFunction, getFormEventURL, getFormName, getFormTarget, getID, init, onExternalRequest, onFormEvent, onRequest, setExternalFormTarget, updateExternalFormTarget
public static final String AJAX_REQUEST_TYPE
public static final String FULLJS_MARKER
public static final int KEYBOARD_KEY_RETURN
public static final int KEYBOARD_KEY_ESC
public static final int KEYBOARD_KEY_F1
public static final int KEYBOARD_KEY_F2
public static final int KEYBOARD_KEY_F3
public static final int KEYBOARD_KEY_F4
public static final int KEYBOARD_KEY_F5
public static final int KEYBOARD_KEY_F6
public static final int KEYBOARD_KEY_F7
public static final int KEYBOARD_KEY_F8
public static final int KEYBOARD_KEY_F9
public static final int KEYBOARD_KEY_F10
public static final int KEYBOARD_KEY_F11
public static final int KEYBOARD_KEY_F12
public static final int KEYBOARD_KEY_INS
public static final int KEYBOARD_KEY_DEL
public static final int KEYBOARD_KEY_POS1
public static final int KEYBOARD_KEY_END
public static final int KEYBOARD_KEY_UP
public static final int KEYBOARD_KEY_DN
public static final int KEYBOARD_KEY_LEFT
public static final int KEYBOARD_KEY_RIGHT
public static final int KEYBOARD_KEY_PAGE_UP
public static final int KEYBOARD_KEY_PAGE_DN
public static final int KEYBOARD_KEY_SPACE
public static final int KEYBOARD_CTRLKEY_NONE
public static final int KEYBOARD_CTRLKEY_SHIFT
public static final int KEYBOARD_CTRLKEY_CTRL
public static final int KEYBOARD_CTRLKEY_ALT
public static final int KEYBOARD_CTRLKEY_META
public static final String SELECTED_ANCHOR
public static final String MAIN_VIEW_TARGET_ID
public static final String LOGIN_VIEW_TARGET_ID
public static final String TIME_ZONE_ID_PARAMETER_NAME
public static final String TIME_ZONE_TRANSITIONS_PARAMETER_NAME
public static final String TIME_ZONE_TIME_PARAMETER_NAME
public static final String TIME_ZONE_OFFSET_PARAMETER_NAME
public static final String TIME_ZONE_DAYLIGHTSAVINGS_PARAMETER_NAME
public static final String TIME_ZONE_NORTHERN_HEMISPHERE_PARAMETER_NAME
public static final String PREPARED_REQUEST_URL
protected javax.servlet.ServletContext m_ServletContext
public static final String INTERNAL_REQUEST_TARGET_ID
public static final String EXTERNAL_REQUEST_TARGET_ID
public static final String RESOURCE_CLASSPATH_PREFIX
public static final String RESOURCE_DEPLOYMENT_PREFIX
public static final String RESOURCE_FILE_PATH_PARAM
public static final String RESOURCE_FILE_PATH_ENVIRONMENT_VAR_NAME_PARAM
public static final String CONFIG_STREAM_NAME_PREFIX
public static final String CONFIG_JNDI_SUFFIX
public String m_DEBUG_ActivateViewID
public String m_DEBUG_NavigationTargetID
public String m_DEBUG_NavigationEvent
public Collection<OwKeyEvent> getKeyEvents()
public Collection<? extends OwEventDescription> getEventDescriptions()
public void registerMouseAction(String actionId, OwString description) throws OwException
description
- OwException
public void registerMouseEventDescription(OwMouseEventDescription mouseEventDescription)
mouseEventDescription
- public void registerKeyEvent(int iKeyCode_p, int iCtrlKey_p, String strEventURL_p, String description_p) throws Exception
iKeyCode_p
- int code of the keyboard key as returned by the JavaScript method event.keyCodeiCtrlKey_p
- int any combination of the KEYBOARD_CTRLKEY_... definitions, can be 0strEventURL_p
- String URL to be requested upon key pressdescription_p
- String description of the eventException
public void registerKeyFormEvent(int iKeyCode_p, int iCtrlKey_p, String strEventURL_p, String strFormName_p, String description_p)
iKeyCode_p
- int code of the keyboard key as returned by the JavaScript method event.keyCodeiCtrlKey_p
- int any combination of the KEYBOARD_CTRLKEY_... definitions, can be 0strEventURL_p
- String URL to be requested upon key pressstrFormName_p
- String form namedescription_p
- String description of the eventpublic void registerKeyEvent(OwKeyEvent keyEvent)
keyEvent
- public void registerKeyAction(OwKeyAction action) throws OwException
action
- OwException
public void registerKeyAction(String actionId, String strEventURL, String description) throws OwException
actionId
- strEventURL
- description
- OwException
public void registerKeyAction(String actionId, String strEventURL, String strFormName, String description) throws OwException
actionId
- strEventURL
- strFormName
- description
- OwException
public void activateView(String strTargetID_p) throws Exception
strTargetID_p
- Target ID of view to activateException
public abstract OwDialogManager getDialogManager()
public void openDialog(OwDialog dialogView_p, OwDialog.OwDialogListener listener_p) throws Exception
dialogView_p
- Dialog-View of the new dialoglistener_p
- Listener that wants to be notified upon dialog events.Exception
public void init(OwAppContext oldcontext_p) throws Exception
oldcontext_p
- OwAppContext old context from previous session, used to copy flags, locals. Optional, can be nullException
public int getTargetCount()
public javax.servlet.http.HttpServletRequest getHttpRequest()
public javax.servlet.http.HttpServletResponse getHttpResponse()
public javax.servlet.ServletContext getHttpServletContext()
public javax.servlet.http.HttpSession getHttpSession()
public void endRequest()
public void beginRequest() throws OwPendingSessionException
OwPendingSessionException
- if already a request was setprotected OwBaseInitializer createBaseInitializer(javax.servlet.ServletContext context_p)
context_p
- ServletContextpublic void setRequest(javax.servlet.ServletContext context_p, javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p)
context_p
- ServletContextrequest_p
- HttpServletRequestresponse_p
- HttpServletResponse@Deprecated public static void setLocalThreadRequest(javax.servlet.http.HttpServletRequest request_p)
request_p
- - the HttpServletRequest
object@Deprecated public static void setLocalThreadResponse(javax.servlet.http.HttpServletResponse response_p)
response_p
- - the HttpServletResponse
objectpublic void serverSideInclude(String path_p, Writer w_p) throws Exception
path_p
- - The path to the URL to include.w_p
- - The Writer which will be flushed prior to the include.Exception
public String getInitParameter(String strParamName_p)
strParamName_p
- Name of the requested parameterpublic OwEventTarget getEventTarget(String strName_p)
strName_p
- Name (ID) of the event targetpublic void removeTarget(OwEventTarget target_p)
target_p
- OwEventTarget to remove from the contextpublic void removeTarget(String strID_p)
strID_p
- String Target ID to removepublic void registerRequestTarget(OwEventTarget target_p) throws OwException
target_p
- OwEventTargetOwException
public void unregisterRequestTarget(OwEventTarget target_p) throws OwException
target_p
- OwEventTargetOwException
public String registerTarget(OwEventTarget target_p, String strName_p) throws Exception
target_p
- EventTarget to registerstrName_p
- optional ID to identify the target. If null, the context create a ID.Exception
public String getJSPPageURL()
public InputStream getXMLConfigDoc(String strName_p) throws Exception
strName_p
- Name of the resource to look forException
public URL getConfigURL(String strName_p) throws Exception
strName_p
- Name of the configuration to look for, e.g. owbootstrap.xmlException
protected abstract URL getAppContextResource(String resourcePath_p)
resourcePath_p
- the class path subpath to retrieveURL
of the requested resourcepublic String getBaseURL()
public String getServerURL()
public String getBasePath()
public String getFormEventURL(OwEventTarget target_p, String strEventName_p, String strAdditionalParameters_p, String strFormName_p)
target_p
- OwEventTarget to request the event URL for. Event is directed to that event targetstrEventName_p
- Function name to be called upon event firedstrAdditionalParameters_p
- additional query string with parameters.strFormName_p
- String form name to send data withpublic String getFormEventFunction(OwEventTarget target_p, String strEventName_p, String strAdditionalParameters_p, String strFormName_p)
target_p
- Owevent target to request the event URL for. Event is directed to that event targetstrEventName_p
- Function name to be called upon event firedstrAdditionalParameters_p
- additional query string with parameters.strFormName_p
- String form name to send data withpublic String getAjaxEventURL(OwEventTarget target_p, String strEventName_p, String strAdditionalParameters_p)
target_p
- OwEventTarget to request the event URL for. Event is directed to that event targetstrEventName_p
- Function name to be called upon event firedstrAdditionalParameters_p
- additional query string with parameters.public String getEventURL(OwEventTarget target_p, String strEventName_p, String strAdditionalParameters_p)
target_p
- OwEventTarget to request the event URL for. Event is directed to that event targetstrEventName_p
- Function name to be called upon event firedstrAdditionalParameters_p
- additional query string with parameters.protected StringBuffer getBaseEventURL(OwEventTarget target_p, String strEventName_p)
target_p
- OwEventTarget to request the event URL for. Event is directed to that event targetstrEventName_p
- Function name to be called upon event firedpublic String getInfiniteEventURL(OwEventTarget target_p, String strEventName_p, String strAdditionalParameters_p)
target_p
- OwEventTarget to request the event URL for. Event is directed to that event targetstrEventName_p
- Function name to be called upon event firedstrAdditionalParameters_p
- additional query string with parameters.public void handleAjaxRequest(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p) throws Exception
request_p
- HttpServletRequestresponse_p
- HttpServletResponseException
public boolean handleRequest(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p) throws Exception
request_p
- HttpServletRequestresponse_p
- HttpServletResponseException
protected boolean handleExternalTargetRequest(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p) throws Exception
Note: This method does not check the security token of the request, and must be processed before calling this method.
request_p
- HttpServletRequest which contains information for external target processingresponse_p
- HttpServletResponse to use if the external target request is processedException
- if session is in unstable state, or the external target cannot process current requestOwInvalidOperationException
- if the external target cannot be foundprotected boolean isFormRequest(javax.servlet.http.HttpServletRequest request_p)
onFormEvent()
of the target has to be invoked or not.request_p
- the HttpServletRequest
object that might carry FORM datapublic void broadcast(OwEventTarget caller_p, int iCode_p) throws Exception
caller_p
- OwEventTarget target that called updateiCode_p
- int optional reason codeException
public void setFocusControlID(String strElementID_p)
strElementID_p
- String ID of HTML elementpublic String getFocusControlID()
public void clearFocusControlID()
@Deprecated public void renderKeyBoardScript(Writer w_p) throws Exception
Exception
public String localize(String strKey_p, String strText_p)
strKey_p
- Key value used to retrieve localized string from resourcestrText_p
- current language Textpublic String localize1(String strKey_p, String strText_p, String strAttribute1_p)
strKey_p
- Key value used to retrieve localized string from resourcestrText_p
- current language TextstrAttribute1_p
- String that replaces %1 tokenspublic String localize2(String strKey_p, String strText_p, String strAttribute1_p, String strAttribute2_p)
strKey_p
- Key value used to retrieve localized string from resourcestrText_p
- current language TextstrAttribute1_p
- String that replaces %1 tokensstrAttribute2_p
- String that replaces %2 tokenspublic String localize3(String strKey_p, String strText_p, String strAttribute1_p, String strAttribute2_p, String strAttribute3_p)
strKey_p
- Key value used to retrieve localized string from resourcestrText_p
- current language TextstrAttribute1_p
- String that replaces %1 tokensstrAttribute2_p
- String that replaces %2 tokensstrAttribute3_p
- String that replaces %3 tokenspublic static String encodeURL(String strURL_p) throws UnsupportedEncodingException
Attention: This method was changed due to problems with links calling Active-X object using JavaScript. The method now returns a String where all <space>-chars are replaced with the UTF-8 encoding sequence %20!
As example the String "http://server:port/myfolder/this is my.txt" is converted into "http://server:port/myfolder/this%20is%20my.txt" and not "http://server:port/myfolder/this+is+my.txt"
strURL_p
- String unencoded URLUnsupportedEncodingException
public static String decodeURL(String strURL_p) throws UnsupportedEncodingException
This decode the strURL_p and is equal to the String which was used for encodeURL!
String aURL.equals(decodeURL(encodeURL(aURL)) == true
strURL_p
- String encoded URLUnsupportedEncodingException
protected static String createSubmitLink(String formName_p, String eventUrl_p)
formName_p
- eventUrl_p
- protected static String createSubmitFunction(String formName_p, String eventUrl_p)
formName_p
- eventUrl_p
- public abstract String getSessionDisplayName()
public OwBaseUserInfo getUserInfo()
public abstract Locale getLocale()
public abstract void setLocale(Locale locale_p)
public abstract String getDesignDir() throws Exception
Exception
public abstract String getDesignURL() throws Exception
Exception
public abstract boolean isLogin() throws Exception
Exception
public abstract boolean isContainerBasedAuthenticated() throws Exception
Exception
public void logout() throws Exception
Exception
public abstract void loginInit() throws Exception
Exception
public OwBaseView getDialogManagerViewReference()
public void dump(Writer w_p) throws Exception
w_p
- HTML WriterException
public void renderJSInclude(String sJSPath_p, Writer w_p) throws IOException
sJSPath_p
- Stringw_p
- IOException
public void renderJSInclude(String sJSPath_p, boolean useDebug_p, Writer w_p) throws IOException
sJSPath_p
- - the JavaScript file pathuseDebug_p
- - if true
try to include the "debug" version of given file.
If such a file is not available, the given file is included.w_p
- - the writerIOException
public Object getApplicationAttribute(String key_p)
key_p
- Object
public Object setApplicationAttribute(String key_p, Object object_p)
key_p
- object_p
- null removes the attributepublic void setAjaxRequest(boolean isAjaxRequest_p)
HttpServletRequest
object.isAjaxRequest_p
- - flag indicating that current HttpServletRequest
object is an AJAX request.public boolean isAjaxRequest()
HttpServletRequest
object is an AJAX request.true
if the current request is an AJAX request.public abstract OwInfoProviderRegistry getInfoProviderRegistry()
public boolean isExternalTargetRequest(javax.servlet.http.HttpServletRequest request_p)
request_p
- HttpServletRequestpublic void setClientTimeZoneInfo(OwTimeZoneInfo timeZoneInfo_p)
timeZoneInfo_p
- public OwTimeZoneInfo getClientTimeZoneInfo()
null
if no client time zone
information is setpublic TimeZone getClientTimeZone()
TimeZone.getDefault()
.public boolean prepareRequest(javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p) throws Exception
request_p
- response_p
- Exception
public void registerInterface(Class<?> typeClass, Object object)
Will not check if the provided object is from that type.
registerInterface
in interface OwGlobalRegistryContext
typeClass
- Classobject
- Object specific to that provided classgetRegisteredInterface(Class)
public <T> T getRegisteredInterface(Class<T> typeClass)
Can throw a ClassCastException if the registered object is not an instance of the requested class.
getRegisteredInterface
in interface OwGlobalRegistryContext
typeClass
- Class of the object to returnpublic <T> T unregisterInterface(Class<T> typeClass)
Attention: If any clean or release must be executed first, it must be done before calling the unregister method.
unregisterInterface
in interface OwGlobalRegistryContext
typeClass
- protected String createServerUrl(javax.servlet.http.HttpServletRequest req_p)
req_p
- HttpRequestprotected String createJspPageUrl(javax.servlet.http.HttpServletRequest req_p)
req_p
- HttpServletRequestprotected String createBaseUrl(javax.servlet.http.HttpServletRequest req_p)
req_p
- HttpServletRequestprotected abstract OwAOProvider createAOProvider() throws OwException
OwException
public OwAOProvider getAOProvider() throws OwException
OwException
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.