Project Wonder 5.0

er.extensions.appserver
Class ERXDirectAction

java.lang.Object
  extended by com.webobjects.appserver.WOAction
      extended by com.webobjects.appserver.WODirectAction
          extended by er.extensions.appserver.ERXDirectAction
All Implemented Interfaces:
com.webobjects.foundation.NSKeyValueCoding, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCodingAdditions, com.webobjects.foundation.NSValidation
Direct Known Subclasses:
AjaxRemoteLogging.Log, ERD2WDirectAction, ERODirectAction, SEDirectAction, SeleniumAction

public class ERXDirectAction
extends com.webobjects.appserver.WODirectAction

Basic collector for direct action additions. All of the actions are password protected, you need to give an argument "pw" that matches the corresponding system property for the action.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.Null, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation
com.webobjects.foundation.NSValidation._MethodBinding, com.webobjects.foundation.NSValidation._ValidationBinding, com.webobjects.foundation.NSValidation.DefaultImplementation, com.webobjects.foundation.NSValidation.Utility, com.webobjects.foundation.NSValidation.ValidationException
 
Field Summary
static org.apache.log4j.Logger log
          logging support
 
Fields inherited from class com.webobjects.appserver.WODirectAction
actionText
 
Fields inherited from class com.webobjects.appserver.WOAction
_actionClasses, _context
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Fields inherited from interface com.webobjects.foundation.NSValidation
_CLASS
 
Constructor Summary
ERXDirectAction(com.webobjects.appserver.WORequest r)
          Public constructor
 
Method Summary
 ERXBrowser browser()
          Returns the browser object representing the web browser's "user-agent" string.
protected  boolean canPerformActionWithPasswordKey(java.lang.String passwordKey)
          Checks if the action can be executed.
 com.webobjects.appserver.WOActionResults closeHTTPSessionAction()
          To use this, include this line in appendToResponse on any pages with uploads: AjaxUtils.addScriptResourceInHead(context, response, "Ajax", "prototype.js"); AjaxUtils.addScriptResourceInHead(context, response, "Ajax", "SafariUploadHack.js");
 com.webobjects.appserver.WOComponent databaseConsoleAction()
          Action used for accessing the database console

Synopsis:
pw=aPassword
Form Values:
pw password to be checked against the system property er.extensions.ERXRemoteShellPassword.
 com.webobjects.appserver.WOActionResults dumpCreatedKeysAction()
           
 com.webobjects.appserver.WOActionResults editLocalizedFilesAction()
          Opens the localizer edit page if the app is in development mode.
 com.webobjects.appserver.WOActionResults emptyAction()
          Returns an empty response.
 com.webobjects.appserver.WOComponent eoAdaptorDebuggingAction()
          Action used for turning EOAdaptorDebugging output on or off.

Synopsis:
pw=aPassword
Form Values:
pw password to be checked against the system property er.extensions.ERXEOAdaptorDebuggingPassword.
debug flag signaling whether to turn EOAdaptorDebugging on or off (defaults to off).
 com.webobjects.appserver.WOActionResults eventsAction()
          Direct access to WOEventDisplay by giving over the password in the "pw" parameter.
 com.webobjects.appserver.WOActionResults eventsSetupAction()
          Direct access to WOEventDisplay by giving over the password in the "pw" parameter and turning on all events.
 com.webobjects.appserver.WOActionResults flushComponentCacheAction()
          Flushes the component cache to allow reloading components even when WOCachingEnabled=true.
 com.webobjects.appserver.WOComponent forceGCAction()
          Action used for forcing garbage collection.
 com.webobjects.appserver.WOComponent log4jAction()
          Action used for changing logging settings at runtime.
 com.webobjects.appserver.WOActionResults logoutAction()
           
<T extends com.webobjects.appserver.WOComponent>
T
pageWithName(java.lang.Class<T> componentClass)
           
 com.webobjects.appserver.WOActionResults performActionNamed(java.lang.String actionName)
           
 com.webobjects.appserver.WOComponent remoteShellAction()
          Action used for sending shell commands to the server and receive the result

Synopsis:
pw=aPassword
Form Values:
pw password to be checked against the system property er.extensions.ERXRemoteShellPassword.
 com.webobjects.appserver.WOActionResults resetStatsAction()
          Direct access to reset the stats by giving over the password in the "pw" parameter.
 com.webobjects.appserver.WOComponent showOpenEditingContextLockTracesAction()
          Returns a list of the traces of open editing context locks.
 com.webobjects.appserver.WOActionResults statsAction()
          Direct access to WOStats by giving over the password in the "pw" parameter.
 com.webobjects.appserver.WOActionResults systemPropertyAction()
          Sets a System property.
 com.webobjects.appserver.WOComponent testAction()
          Action used for junit tests.
 
Methods inherited from class com.webobjects.appserver.WODirectAction
_componentAction, defaultAction, getSessionIDForRequest, takeFormValueArraysForKeyArray, takeFormValuesForKeyArray
 
Methods inherited from class com.webobjects.appserver.WOAction
_isActionOnClass, _methodForAction, _preloadAllActionsOnClass, canAccessFieldsDirectly, context, debugString, existingSession, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, initializeRequestSessionIDInContext, languages, logString, pageWithName, request, session, setLanguages, takeValueForKey, takeValueForKeyPath, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, valueForKey, valueForKeyPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling
handleQueryWithUnboundKey, handleTakeValueForUnboundKey, unableToSetNullForKey
 
Methods inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
takeValueForKeyPath, valueForKeyPath
 
Methods inherited from interface com.webobjects.foundation.NSKeyValueCoding
takeValueForKey, valueForKey
 
Methods inherited from interface com.webobjects.foundation.NSValidation
validateTakeValueForKeyPath, validateValueForKey
 

Field Detail

log

public static final org.apache.log4j.Logger log
logging support

Constructor Detail

ERXDirectAction

public ERXDirectAction(com.webobjects.appserver.WORequest r)
Public constructor

Method Detail

canPerformActionWithPasswordKey

protected boolean canPerformActionWithPasswordKey(java.lang.String passwordKey)
Checks if the action can be executed.

Parameters:
passwordKey -

testAction

public com.webobjects.appserver.WOComponent testAction()
Action used for junit tests. This method is only active when WOCachingEnabled is disabled (we take this to mean that the application is not in production).

Synopsis:
pw=aPassword&case=classNameOfTestCase
Form Values:
pw password to be checked against the system property er.extensions.ERXJUnitPassword. case class name for unit test to be performed.

Returns:
ERXWOTestInterface with the results after performing the given test.

flushComponentCacheAction

public com.webobjects.appserver.WOActionResults flushComponentCacheAction()
Flushes the component cache to allow reloading components even when WOCachingEnabled=true.

Returns:
"OK"

statsAction

public com.webobjects.appserver.WOActionResults statsAction()
Direct access to WOStats by giving over the password in the "pw" parameter.


resetStatsAction

public com.webobjects.appserver.WOActionResults resetStatsAction()
Direct access to reset the stats by giving over the password in the "pw" parameter. This calls ERXStats.reset();


eventsAction

public com.webobjects.appserver.WOActionResults eventsAction()
Direct access to WOEventDisplay by giving over the password in the "pw" parameter.


eventsSetupAction

public com.webobjects.appserver.WOActionResults eventsSetupAction()
Direct access to WOEventDisplay by giving over the password in the "pw" parameter and turning on all events.


eoAdaptorDebuggingAction

public com.webobjects.appserver.WOComponent eoAdaptorDebuggingAction()
Action used for turning EOAdaptorDebugging output on or off.

Synopsis:
pw=aPassword
Form Values:
pw password to be checked against the system property er.extensions.ERXEOAdaptorDebuggingPassword.
debug flag signaling whether to turn EOAdaptorDebugging on or off (defaults to off). The value should be one of:

log4jAction

public com.webobjects.appserver.WOComponent log4jAction()
Action used for changing logging settings at runtime. This method is only active when WOCachingEnabled is disabled (we take this to mean that the application is not in production).

Synopsis:
pw=aPassword
Form Values:
pw password to be checked against the system property er.extensions.ERXLog4JPassword.

Returns:
ERXLog4JConfiguration for modifying current logging settings.

remoteShellAction

public com.webobjects.appserver.WOComponent remoteShellAction()
Action used for sending shell commands to the server and receive the result

Synopsis:
pw=aPassword
Form Values:
pw password to be checked against the system property er.extensions.ERXRemoteShellPassword.

Returns:
ERXLog4JConfiguration for modifying current logging settings.

databaseConsoleAction

public com.webobjects.appserver.WOComponent databaseConsoleAction()
Action used for accessing the database console

Synopsis:
pw=aPassword
Form Values:
pw password to be checked against the system property er.extensions.ERXRemoteShellPassword.

Returns:
ERXLog4JConfiguration for modifying current logging settings.

forceGCAction

public com.webobjects.appserver.WOComponent forceGCAction()
Action used for forcing garbage collection. If WOCachingEnabled is true (we take this to mean that the application is in production) you need to give a password to access it.

Synopsis:
pw=aPassword
Form Values:
pw password to be checked against the system property er.extensions.ERXGCPassword.

Returns:
short info about free and used memory before and after GC.

showOpenEditingContextLockTracesAction

public com.webobjects.appserver.WOComponent showOpenEditingContextLockTracesAction()
Returns a list of the traces of open editing context locks. This is only useful if er.extensions.ERXApplication.traceOpenEditingContextLocks is enabled and er.extensions.ERXOpenEditingContextLocksPassword is set.


logoutAction

public com.webobjects.appserver.WOActionResults logoutAction()

browser

public ERXBrowser browser()
Returns the browser object representing the web browser's "user-agent" string. You can obtain browser name, version, platform and Mozilla version, etc. through this object.
Good for WOConditional's condition binding to deal with different browser versions.

Returns:
browser object

performActionNamed

public com.webobjects.appserver.WOActionResults performActionNamed(java.lang.String actionName)
Overrides:
performActionNamed in class com.webobjects.appserver.WODirectAction

systemPropertyAction

public com.webobjects.appserver.WOActionResults systemPropertyAction()
Sets a System property. This is also active in deployment mode because one might want to change a System property at runtime. Synopsis:
pw=aPassword&key=someSystemPropertyKey&value=someSystemPropertyValue

Returns:
either null when the password is wrong or a new page showing the System properties

editLocalizedFilesAction

public com.webobjects.appserver.WOActionResults editLocalizedFilesAction()
Opens the localizer edit page if the app is in development mode.


dumpCreatedKeysAction

public com.webobjects.appserver.WOActionResults dumpCreatedKeysAction()

emptyAction

public com.webobjects.appserver.WOActionResults emptyAction()
Returns an empty response.

Returns:
nothing

closeHTTPSessionAction

public com.webobjects.appserver.WOActionResults closeHTTPSessionAction()
To use this, include this line in appendToResponse on any pages with uploads: AjaxUtils.addScriptResourceInHead(context, response, "Ajax", "prototype.js"); AjaxUtils.addScriptResourceInHead(context, response, "Ajax", "SafariUploadHack.js");

To be called before multi-form submits to get past Safari 3.2.1 and 4.x intermittent hang-ups when posting binary data. A nice succinct description and solution is posted here: http://blog.airbladesoftware.com/2007/8/17/note-to-self-prevent-uploads-hanging-in-safari The radar ticket is here: https://bugs.webkit.org/show_bug.cgi?id=5760

Returns:
simple response to close the connection

pageWithName

public <T extends com.webobjects.appserver.WOComponent> T pageWithName(java.lang.Class<T> componentClass)

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.