Project Wonder 2.0

er.extensions
Class ERXDirectAction

java.lang.Object
  extended bycom.webobjects.appserver.WOAction
      extended bycom.webobjects.appserver.WODirectAction
          extended byer.extensions.ERXDirectAction
All Implemented Interfaces:
NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation
Direct Known Subclasses:
ERD2WDirectAction

public class ERXDirectAction
extends WODirectAction

Basic collector for direct action additions. This class currectly adds two direct actions: testAction for performing junit tests and log4jAction for re-configuring logging settings at runtime.


Nested Class Summary
 
Nested classes inherited from class com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.Null, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.Utility, NSKeyValueCoding.ValueAccessor
 
Nested classes inherited from class com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Nested classes inherited from class com.webobjects.foundation.NSValidation
NSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
 
Field Summary
static ERXLogger 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
_CLASS, NullValue
 
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.
 WOComponent forceGCAction()
          Action used for forcing garbage collection.
 WOComponent log4jAction()
          Action used for changing logging settings at runtime.
 WOComponent logoutAction()
           
 WOActionResults performActionNamed(String actionName)
           
 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
takeValueForKey, valueForKey
 
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 ERXLogger log
logging support

Constructor Detail

ERXDirectAction

public ERXDirectAction(WORequest r)
Public constructor

Method Detail

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.

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.

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.

logoutAction

public WOComponent 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)

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.

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

Last updated: Do, Dez 9, 2004 • 12:46 PM CET

Copyright © 2002 – 2004 Project Wonder.