com.atlassian.crowd.console.action.options
Class UpdateLoggingProfiling

java.lang.Object
  extended by com.opensymphony.xwork.ActionSupport
      extended by com.atlassian.crowd.console.action.BaseAction
          extended by com.atlassian.crowd.console.action.options.UpdateLoggingProfiling
All Implemented Interfaces:
com.opensymphony.xwork.Action, com.opensymphony.xwork.LocaleProvider, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware, com.uwyn.rife.continuations.ContinuableObject, Serializable, Cloneable

public class UpdateLoggingProfiling
extends BaseAction

Allows configuration of logging and profiling. These could be split to separate classes (& actions), but not as long as they're one page in the UI.

See Also:
Serialized Form

Nested Class Summary
protected static class UpdateLoggingProfiling.LoggingConfigEntry
          Represents a Log4j Config entry, corresponding to a Class or Package mapped to a Level.
 
Field Summary
protected  String[] classNames
          TODO: levelNames[i] is the level name for class classNames[i].
protected  List entries
           
protected  UpdateLoggingProfiling.LoggingConfigEntry entry
           
protected  String[] levelNames
           
protected static String LOGLEVEL_DEFAULT
           
 
Fields inherited from class com.atlassian.crowd.console.action.BaseAction
actionMessageAlertColor, ALERT_BLUE, ALERT_GREEN, ALERT_RED, ALERT_YELLOW, applicationManager, applicationService, clientProperties, crowdLicenseManager, directoryManager, initialLoad, propertyManager, tab, tokenAuthenticationManager
 
Fields inherited from class com.opensymphony.xwork.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
UpdateLoggingProfiling()
           
 
Method Summary
 String doDefault()
           
 String doUpdateLogging()
           
 String doUpdateProfiling()
           
 List getEntries()
           
 String getProfileName()
           
 boolean isProfilingOn()
           
protected  void processLogging()
          Reads current state of logging and updates class fields to match.
protected  void processProfiling()
          Updates the class profiling fields to reflect the current status of profiling.
 void setClassNames(String[] classNames)
           
 void setEntries(List entries)
           
protected  void setLevelForLogger(String className, String levelName)
           
 void setLevelNames(String[] levelNames)
           
 void setProfileName(String profileName)
           
 void setProfilingOn(boolean profilingOn)
           
protected  boolean updateLogging()
          Updates the logging rules upon a "submit" of the UI form by the user.
protected  boolean updateProfiling()
           
 
Methods inherited from class com.atlassian.crowd.console.action.BaseAction
addActionMessage, authorisedToAccessCrowdAdminConsole, authorisedToAccessCrowdConsole, containsActionMessages, containsErrorMessages, directory, directoryForRemoteUser, getActionMessageAlertColor, getAttribute, getBootstrapManager, getCurrentLicenseResourceTotal, getDisplayableLink, getFirstAttribute, getHttpRequest, getImageLocation, getImageTitle, getLicense, getLink, getPasswordComplexityMessage, getRemoteUser, getSession, getSitemeshPageProperties, getSitemeshPageProperty, getTab, getText, getText, getUserName, getWebFragmentsContextMap, getWebInterfaceManager, getWebItemsForSection, getWebResourceManager, getWebSectionsForLocation, getXsrfToken, getXsrfTokenName, isAdmin, isAtResourceLimit, isAuthenticated, isEvaluation, isInitialLoad, isLicenseExpired, isSubscription, isWithinGracePeriod, renderFreemarkerTemplate, setApplicationManager, setApplicationService, setClientProperties, setCrowdLicenseManager, setCrowdUserDetailsService, setDirectoryManager, setPropertyManager, setTab, setTokenAuthenticationManager, setWebInterfaceManager, setWebResourceManager, setXsrfTokenGenerator
 
Methods inherited from class com.opensymphony.xwork.ActionSupport
addActionError, addActionMessage, addFieldError, clearErrorsAndMessages, clone, doInput, execute, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, pause, setActionErrors, setActionMessages, setFieldErrors, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGLEVEL_DEFAULT

protected static final String LOGLEVEL_DEFAULT
See Also:
Constant Field Values

classNames

protected String[] classNames
TODO: levelNames[i] is the level name for class classNames[i]. Should look for a better way.


levelNames

protected String[] levelNames

entry

protected UpdateLoggingProfiling.LoggingConfigEntry entry

entries

protected List entries
Constructor Detail

UpdateLoggingProfiling

public UpdateLoggingProfiling()
Method Detail

doDefault

public String doDefault()
Overrides:
doDefault in class BaseAction

doUpdateLogging

public String doUpdateLogging()

doUpdateProfiling

public String doUpdateProfiling()

processLogging

protected void processLogging()
Reads current state of logging and updates class fields to match.


updateLogging

protected boolean updateLogging()
Updates the logging rules upon a "submit" of the UI form by the user.

Returns:
true if successful, false otherwise.

setLevelForLogger

protected void setLevelForLogger(String className,
                                 String levelName)

processProfiling

protected void processProfiling()
Updates the class profiling fields to reflect the current status of profiling.


updateProfiling

protected boolean updateProfiling()

getEntries

public List getEntries()

setEntries

public void setEntries(List entries)

setClassNames

public void setClassNames(String[] classNames)

setLevelNames

public void setLevelNames(String[] levelNames)

getProfileName

public String getProfileName()

setProfileName

public void setProfileName(String profileName)

isProfilingOn

public boolean isProfilingOn()

setProfilingOn

public void setProfilingOn(boolean profilingOn)


Copyright © 2013 Atlassian. All Rights Reserved.