Project Wonder 5.0.0.8794

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:
NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation
Direct Known Subclasses:
ERD2WDirectAction, ERODirectAction

public class ERXDirectAction
extends 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
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation
NSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
 
Field Summary
static 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.NSValidation
_CLASS
 
Constructor Summary
ERXDirectAction(WORequest r)
          Public constructor
 
Method Summary
 ERXBrowser browser()
          Returns the browser object representing the web browser's "user-agent" string.
protected  boolean canPerformActionWithPasswordKey(String passwordKey)
          Checks if the action can be executed.
 WOComponent databaseConsoleAction()
          Action used for accessing the databse console

Synopsis:
pw=aPassword
Form Values:
pw password to be checked against the system property er.extensions.ERXRemoteShellPassword.
 WOActionResults dumpCreatedKeysAction()
           
 WOActionResults editLocalizedFilesAction()
          Opens the localizer edit page if the app is in dvelopment mode.
 WOActionResults emptyAction()
          Returns an empty response.
 WOActionResults eventsAction()
          Direct access to WOEventDisplay by giving over the password in the "pw" parameter.
 WOActionResults eventsSetupAction()
          Direct access to WOEventDisplay by giving over the password in the "pw" parameter and turning on all events.
 WOComponent forceGCAction()
          Action used for forcing garbage collection.
 WOComponent log4jAction()
          Action used for changing logging settings at runtime.
 WOActionResults logoutAction()
           
<T extends WOComponent>
T
pageWithName(Class<T> componentClass)
           
 WOActionResults performActionNamed(String actionName)
           
 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.
 WOActionResults resetStatsAction()
          Direct access to reset the stats by giving over the password in the "pw" parameter.
 WOComponent showOpenEditingContextLockTracesAction()
          Returns a list of the traces of open editing context locks.
 WOActionResults statsAction()
          Direct access to WOStats by giving over the password in the "pw" parameter.
 WOActionResults systemPropertyAction()
          Sets a System property.
 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.NSValidation
validateTakeValueForKeyPath, validateValueForKey
 

Field Detail

log

public static final Logger log
logging support

Constructor Detail

ERXDirectAction

public ERXDirectAction(WORequest r)
Public constructor

Method Detail

canPerformActionWithPasswordKey

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

Parameters:
passwordKey -

testAction

public 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.

statsAction

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


resetStatsAction

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


eventsAction

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


eventsSetupAction

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


log4jAction

public 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 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 WOComponent databaseConsoleAction()
Action used for accessing the databse 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 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 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 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 WOActionResults performActionNamed(String actionName)
Overrides:
performActionNamed in class WODirectAction

systemPropertyAction

public 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 the key is missing or a new page showing the System properties

editLocalizedFilesAction

public WOActionResults editLocalizedFilesAction()
Opens the localizer edit page if the app is in dvelopment mode.


dumpCreatedKeysAction

public WOActionResults dumpCreatedKeysAction()

emptyAction

public WOActionResults emptyAction()
Returns an empty response.

Returns:
nothing

pageWithName

public <T extends WOComponent> T pageWithName(Class<T> componentClass)

Last updated: Thu, Jan 8, 2009 • 12:32 PM EST

Copyright © 2002 – 2007 Project Wonder.