org.sandev.TaskHeap.TaskHeapUI
Class TaskHeapUINode

java.lang.Object
  extended byorg.sandev.TaskHeap.TaskHeapUI.TaskHeapUINodeDecl
      extended byorg.sandev.TaskHeap.TaskHeapUI.TaskHeapUINodeBase
          extended byorg.sandev.TaskHeap.TaskHeapUI.TaskHeapUINode
All Implemented Interfaces:
org.sandev.basics.util.AuthUserLookup, org.sandev.basics.util.CommBridge, org.sandev.basics.nodecommon.Controllable, org.sandev.basics.util.IDLookup, org.sandev.basics.nodecommon.Loggable, org.sandev.basics.nodecommon.Messageable, org.sandev.basics.util.NameLookup, org.sandev.basics.util.UIFileLocator, org.sandev.basics.util.UIFormAdaptorCallback, org.sandev.basics.util.UIFormOwner

public class TaskHeapUINode
extends TaskHeapUINodeBase
implements org.sandev.basics.util.UIFormOwner, org.sandev.basics.util.CommBridge

Implementation of TaskHeapUINode. We use a NamedSingletonIDCache for lookup, writing updates on update completion.


Field Summary
protected  UIActionHandler actionHandler
          Our local instance that we delegate UI action processing to
protected  org.sandev.basics.util.Authorizer authorizer
          The Authorizer instance we use for retrieving an AuthFilter.
protected  org.sandev.basics.sandmessages.Stats currStats
          The latest statistics we have recieved.
protected  org.sandev.basics.util.SandEncryptor encryptor
           
protected static long HEAPATTRID
          The uniqueID of the HeapAttributes instance.
protected  java.lang.String inboundFilesLink
          The base link specification for inbound files.
protected  org.sandev.basics.util.SimpleMailSender mailSender
          Our simple mail sender.
protected  java.lang.String outboundFilesLink
          The base link specification for outbound files.
protected  int retention
          The maximum size of our broadcast message buffer.
protected  org.sandev.basics.nodecommon.CharSerializer serializer
           
protected  org.sandev.basics.util.AuthUserLookup userLookup
          The instance we use for looking up users.
 
Fields inherited from class org.sandev.TaskHeap.TaskHeapUI.TaskHeapUINodeBase
ctrlwrappers, helperNodes, incomingAsyncCacheActionSource, incomingAsyncStatsSource, LOGDEBUG, LOGERROR, LOGFATAL, logger, LOGINFO, logLevel, LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_FATAL, LOGLEVEL_INFO, LOGLEVEL_WARN, LOGWARN, messager, nodeInstance, outgoingSyncAggregateUpdate, outgoingSyncCacheActionRegistration, outgoingSyncDataImportExport, outgoingSyncExternalPlanQuery, outgoingSyncExternalPlanSync, outgoingSyncHeapAttributesQuery, outgoingSyncPlanComponentQuery, outgoingSyncPlanQuery, outgoingSyncPlanRecalc, outgoingSyncReaderQuery, outgoingSyncResourceQuery, outgoingSyncStatsQuery, outgoingSyncTaskPhaseQuery, outgoingSyncTaskQuery, outgoingSyncTaskTypeQuery, parent, sandNodeErrorMessage, sandNodeState, SANDNODESTATE_FAILED, SANDNODESTATE_FAILING, SANDNODESTATE_RESUMING, SANDNODESTATE_RUNNING, SANDNODESTATE_STARTING, SANDNODESTATE_STOPPED, SANDNODESTATE_STOPPING, SANDNODESTATE_SUSPENDED, SANDNODESTATE_SUSPENDING, SANDNODESTATE_UNDEFINED, sandRoot
 
Fields inherited from class org.sandev.TaskHeap.TaskHeapUI.TaskHeapUINodeDecl
authorizerInstanceName, inputFileDir, outputFileDir, techSupportEmailAddress, userLookupInstanceName
 
Fields inherited from interface org.sandev.basics.util.UIFormOwner
ACTION_REFRESH_GLOBAL_DATA
 
Fields inherited from interface org.sandev.basics.nodecommon.Controllable
OPERATION_FAIL, OPERATION_RESUME, OPERATION_SHUTDOWN, OPERATION_STARTUP, OPERATION_STR_FAIL, OPERATION_STR_RESUME, OPERATION_STR_SHUTDOWN, OPERATION_STR_STARTUP, OPERATION_STR_SUSPEND, OPERATION_STR_UNDEFINED, OPERATION_STRINGS, OPERATION_SUSPEND, OPERATION_UNDEFINED, SHUTDOWN_ERROR_RESTART_GLOBAL, SHUTDOWN_ERROR_RESTART_LOCAL, SHUTDOWN_ERROR_TERMINATE, SHUTDOWN_NORMAL, STATE_FAILED, STATE_FAILING, STATE_RESUMING, STATE_RUNNING, STATE_STARTING, STATE_STOPPED, STATE_STOPPING, STATE_STR_FAILED, STATE_STR_FAILING, STATE_STR_RESUMING, STATE_STR_RUNNING, STATE_STR_STARTING, STATE_STR_STOPPED, STATE_STR_STOPPING, STATE_STR_SUSPENDED, STATE_STR_SUSPENDING, STATE_STR_UNDEFINED, STATE_STRINGS, STATE_SUSPENDED, STATE_SUSPENDING, STATE_UNDEFINED
 
Constructor Summary
TaskHeapUINode()
           
 
Method Summary
protected  void cacheTrack(org.sandev.basics.structs.SandPersistMessage spm, long transmitID)
          Register to track changes to the given message so that our cache stays up to date.
 org.sandev.basics.structs.AggregateUpdate callAggregateUpdate(org.sandev.basics.structs.AggregateUpdate msg)
          Call the base implementation to do the update, then record the result in our cache so we are working from the latest info.
protected  org.sandev.basics.util.AuthUser checkCreateDemoResource(java.lang.String username, java.lang.String password)
          If this is a demo installation, and the password is demo, then create new Resource for this user so they can use the system.
protected  void checkForTemplateImport()
          Look for a TemplateData xml file and import it if found, deleting it after the import succeeds.
 org.sandev.basics.util.UIFormContext doAction(java.lang.String actionName, org.sandev.basics.util.UIFormContext uifc, org.sandev.basics.util.UserWorkLog uwl)
          Do the named action using the information in the form context given.
 void doActionAddHook(org.sandev.basics.util.UIFormContext uifc)
          Given the UIFormContext which will be used to present a new form for the user to fill out, preprocess as needed before returning control to the UIFormManager.
 void doActionEditHook(org.sandev.basics.util.UIFormContext uifc)
          Given the UIFormContext containing the instance we are editing, preprocess as needed before returning control to the UIFormManager.
 void doActionFindHook(org.sandev.basics.util.UIFormContext uifc)
          Given the UIFormContext reconstructed on an ACTION_FIND, preprocess as needed before returning control to the UIFormManager.
 java.lang.String filterDisplayText(java.lang.String value)
          Filter the given display text to trap links and similar low level text conversions.
 java.util.Map filterInputParameters(java.lang.String prefix, java.util.Map params, java.lang.StringBuffer outText)
          This is where we remap any input parameters before each message in the UIFormContext is reconstructed.
protected  void filterTranslateAggregateUpdate(org.sandev.basics.structs.AggregateUpdate au)
          Given an AggregateUpdate, remove any unnecessary updates and translate any proxy updates into their corresponding actual updates.
 java.lang.String forgotPassword(java.lang.String email, java.lang.String secondary)
          Email the user their password.
 org.sandev.basics.structs.SandCollectionMessage formFind(org.sandev.basics.structs.SandQueryMessage msg, org.sandev.basics.util.UIFormContext uifc)
          Process the given query and return the result.
 void formHelp(org.sandev.basics.util.UIFormContext uifc)
          Load the help messages from the properties file and set the outputText in the uifc accordingly.
 void formSave(org.sandev.basics.util.UIFormContext uifc)
          Process the AggregateUpdate and set pendingEdits to false.
 UIActionHandler getActionHandler()
          initializing accessor for actionHandler.
 org.sandev.basics.util.AuthFilter getAuthFilter()
          Get the AuthFilter from our local Authorizer and return it.
 org.sandev.basics.util.Authorizer getAuthorizer()
          initializing accessor for authorizer.
 org.sandev.basics.util.AuthUserLookup getAuthUserLookup()
          Wraps getUserLookup.
 org.sandev.basics.sandmessages.AuthWrapper getBufferedMessages()
          Returns an empty AuthWrapper.
 org.sandev.basics.sandmessages.Stats getCurrStats()
          accessor for currStats
 java.lang.String getDeploymentPrefix()
          Return the prefix for this deployment.
static DisplayParams getDisplayParams(org.sandev.basics.util.AuthUser user)
          Given an AuthUser, return their associated DisplayParams.
 org.sandev.basics.util.SandEncryptor getEncryptor()
          Initializing accessor for encryptor.
 org.sandev.basics.sandmessages.Stats getGeneralStats(org.sandev.basics.util.AuthUser user)
          Return the percentage of unnassigned tasks as a String.
 java.lang.String getInboundFilesDir()
          The directory where uploaded files should be written to.
 java.lang.String getInboundFilesLink()
          Accessor for inboundFilesLink
 org.sandev.basics.structs.SandPersistMessage getInstance(java.lang.String classname, long id, org.sandev.basics.util.AuthUser user)
          Lookup the ID in our cache, then retrieve the instance via query if that fails.
 org.sandev.basics.structs.SandInstanceMessage getInstance(java.lang.String classname, java.lang.String fieldname, java.lang.String value, org.sandev.basics.util.AuthUser user)
          Currently all the data we are dealing with is persistent and uses id references.
 int getMaxRetention()
          Returns 0.
 long getMinSendIntervalMillis()
          Returns zero.
 java.lang.String getOutboundFilesDir()
          The directory where uploaded files should be written to.
 java.lang.String getOutboundFilesLink()
          Accessor for outboundFilesLink
 int getPreferredRetention()
          Returns 0.
 org.sandev.basics.util.ArrayAssociation getResourceSelectionValues(long currResource)
          Retrieve a list of the available Resources and create an ArrayAssociation for dynamic selection with the given currResource as the default value.
 int getRetention()
          accessor for retention
 org.sandev.basics.util.ArrayAssociation getSelectionValues(org.sandev.basics.structs.SandInstanceMessage msg, java.lang.String fieldname, org.sandev.basics.util.AuthUser user)
          Return an appropriate selection list for this field.
 org.sandev.basics.nodecommon.CharSerializer getSerializer()
          Initializing accessor for serializer.
 org.sandev.basics.util.ArrayAssociation getTaskPhaseSelectionValues(Task task, org.sandev.basics.util.AuthUser user)
          Retrieve the TaskPhase possibilities for this task based on its TaskType, and return the ArrayAssociation for it.
 TaskType[] getTaskTypesFromCache()
          Get the current TaskType instances from cache and return an array of all those defined.
 org.sandev.basics.util.AuthUser getUserForID(long authID)
          Return the AuthUser for the specified ID.
 org.sandev.basics.util.AuthUser getUserFromLogin(java.lang.String username, java.lang.String password)
          Lookup the AuthUser for authentication information given.
 org.sandev.basics.util.AuthUserLookup getUserLookup()
          initializing accessor for userLookup.
 org.sandev.basics.util.UserWorkLog getUserWorkLog()
          Return a new UserWorkLog instance.
protected  void initMailSender()
          Instantiate and initialize our email sender.
 boolean isActive(java.lang.String actionName, org.sandev.basics.util.UIFormContext uifc, boolean defaultValue)
          Return true if the named action is supported given the form context.
 java.lang.String normalizeDirString(java.lang.String dirspec)
          Make sure the given directory specification works for our current environment and ends with a file separator.
 void onDelivery(org.sandev.basics.sandmessages.CacheAction ca)
          If we receive a cache update, drop the associated instance if we cached it.
 void onDelivery(org.sandev.basics.sandmessages.Stats stats)
          Update our currStats if we get an update.
 org.sandev.basics.sandmessages.AuthWrapper onReceive(org.sandev.basics.sandmessages.AuthWrapper aw)
          Unpack the incoming AuthWrapper, pass it on to the appropriate node and return the wrapped result.
protected  void onStartup()
          Preload our cache so we don't have a long lag on the first request.
 void popBufferedMessages(org.sandev.basics.structs.SandMessage[] messages)
          Does nothing.
protected  void postSaveProcessing(org.sandev.basics.util.UIFormContext uifc, org.sandev.basics.structs.AggregateUpdate auOld, org.sandev.basics.structs.AggregateUpdate auNew)
          Hook method called immediately after successful save.
protected  void preCacheData(org.sandev.basics.util.IDCache idc)
          Preload our cache with the data we know we are going to need.
protected  void preSaveProcessing(org.sandev.basics.structs.AggregateUpdate au, java.lang.String sourceName)
          Hook method called immediately before saving an update.
protected  org.sandev.basics.structs.SandMessage processMessage(org.sandev.basics.structs.SandMessage sm)
          Process the given message and return the result.
protected  void safeSendMail(java.lang.String from, java.lang.String to, java.lang.String subj, java.lang.String body)
          Tries to send mail but just logs if failure.
 void setActionHandler(UIActionHandler ah)
          mutator for actionHandler
 void setAsynchThread(java.lang.Thread thread)
          Not supported.
 void setAuthorizer(org.sandev.basics.util.Authorizer auth)
          mutator for authorizer
protected  void setCurrStats(org.sandev.basics.sandmessages.Stats stats)
          mutator for currStats
static void setDisplayParams(org.sandev.basics.util.AuthUser user, DisplayParams dp)
          Given an AuthUser, set their DisplayParams to the given instance.
 void setInboundFilesLink(java.lang.String link)
          Mutator for inboundFilesLink.
 void setOutboundFilesLink(java.lang.String link)
          Mutator for outboundFilesLink.
 void setRetention(int val)
          mutator for retention
 void setUserLookup(org.sandev.basics.util.AuthUserLookup val)
          mutator for userLookup
 void trackFormProcessCall(org.sandev.basics.util.UIFormContext uifc)
          Does nothing for now.
protected  java.lang.String translateReportLink(java.lang.String link)
          Translate the given link so the reports area can be found.
 
Methods inherited from class org.sandev.TaskHeap.TaskHeapUI.TaskHeapUINodeBase
addWrapper, callCacheActionRegistration, callDataImportExport, callExternalPlanQuery, callExternalPlanSync, callHeapAttributesQuery, callPlanComponentQuery, callPlanQuery, callPlanRecalc, callReaderQuery, callResourceQuery, callStatsQuery, callTaskPhaseQuery, callTaskQuery, callTaskTypeQuery, deliver, deliverCacheActionSource, deliverStatsSource, fieldHasFlag, getAuthorizerInstanceName, getAuthorizerInstanceNameDefaultValue, getAuthorizerInstanceNameFieldPrintValue, getAuthorizerInstanceNameFlag, getAuthorizerInstanceNameInvalidValue, getAuthorizerInstanceNameLengthMax, getAuthorizerInstanceNameLengthNorm, getAuthorizerInstanceNameMetatype, getAuthorizerInstanceNamePrintValue, getAuthorizerInstanceNameRange, getAuthorizerInstanceNameValidityCheck, getHelperNodes, getIDCache, getIncomingAsyncCacheActionSource, getIncomingAsyncCacheActionSourceDefaultValue, getIncomingAsyncCacheActionSourceFieldPrintValue, getIncomingAsyncCacheActionSourceFlag, getIncomingAsyncCacheActionSourceInvalidValue, getIncomingAsyncCacheActionSourceMetatype, getIncomingAsyncCacheActionSourcePrintValue, getIncomingAsyncCacheActionSourceRange, getIncomingAsyncCacheActionSourceValidityCheck, getIncomingAsyncStatsSource, getIncomingAsyncStatsSourceDefaultValue, getIncomingAsyncStatsSourceFieldPrintValue, getIncomingAsyncStatsSourceFlag, getIncomingAsyncStatsSourceInvalidValue, getIncomingAsyncStatsSourceMetatype, getIncomingAsyncStatsSourcePrintValue, getIncomingAsyncStatsSourceRange, getIncomingAsyncStatsSourceValidityCheck, getInputFileDir, getInputFileDirDefaultValue, getInputFileDirFieldPrintValue, getInputFileDirFlag, getInputFileDirInvalidValue, getInputFileDirLengthMax, getInputFileDirLengthNorm, getInputFileDirMetatype, getInputFileDirPrintValue, getInputFileDirRange, getInputFileDirValidityCheck, getLogger, getLoggerDefaultValue, getLoggerFieldPrintValue, getLoggerFlag, getLoggerInvalidValue, getLoggerMetatype, getLoggerPrintValue, getLoggerRange, getLoggerValidityCheck, getLogLevel, getLogLevelActualVals, getLogLevelDefaultValue, getLogLevelEnumSummary, getLogLevelFieldPrintValue, getLogLevelFlag, getLogLevelInvalidValue, getLogLevelKeyVals, getLogLevelMetatype, getLogLevelPrintVals, getLogLevelPrintValue, getLogLevelRange, getLogLevelValidityCheck, getMessager, getMessagerDefaultValue, getMessagerFieldPrintValue, getMessagerFlag, getMessagerInvalidValue, getMessagerMetatype, getMessagerPrintValue, getMessagerRange, getMessagerValidityCheck, getNodeInstance, getNodeInstanceDefaultValue, getNodeInstanceFieldPrintValue, getNodeInstanceFlag, getNodeInstanceInvalidValue, getNodeInstanceMetatype, getNodeInstanceName, getNodeInstancePrintValue, getNodeInstanceRange, getNodeInstanceValidityCheck, getOutgoingSyncAggregateUpdate, getOutgoingSyncAggregateUpdateDefaultValue, getOutgoingSyncAggregateUpdateFieldPrintValue, getOutgoingSyncAggregateUpdateFlag, getOutgoingSyncAggregateUpdateInvalidValue, getOutgoingSyncAggregateUpdateMetatype, getOutgoingSyncAggregateUpdatePrintValue, getOutgoingSyncAggregateUpdateRange, getOutgoingSyncAggregateUpdateValidityCheck, getOutgoingSyncCacheActionRegistration, getOutgoingSyncCacheActionRegistrationDefaultValue, getOutgoingSyncCacheActionRegistrationFieldPrintValue, getOutgoingSyncCacheActionRegistrationFlag, getOutgoingSyncCacheActionRegistrationInvalidValue, getOutgoingSyncCacheActionRegistrationMetatype, getOutgoingSyncCacheActionRegistrationPrintValue, getOutgoingSyncCacheActionRegistrationRange, getOutgoingSyncCacheActionRegistrationValidityCheck, getOutgoingSyncDataImportExport, getOutgoingSyncDataImportExportDefaultValue, getOutgoingSyncDataImportExportFieldPrintValue, getOutgoingSyncDataImportExportFlag, getOutgoingSyncDataImportExportInvalidValue, getOutgoingSyncDataImportExportMetatype, getOutgoingSyncDataImportExportPrintValue, getOutgoingSyncDataImportExportRange, getOutgoingSyncDataImportExportValidityCheck, getOutgoingSyncExternalPlanQuery, getOutgoingSyncExternalPlanQueryDefaultValue, getOutgoingSyncExternalPlanQueryFieldPrintValue, getOutgoingSyncExternalPlanQueryFlag, getOutgoingSyncExternalPlanQueryInvalidValue, getOutgoingSyncExternalPlanQueryMetatype, getOutgoingSyncExternalPlanQueryPrintValue, getOutgoingSyncExternalPlanQueryRange, getOutgoingSyncExternalPlanQueryValidityCheck, getOutgoingSyncExternalPlanSync, getOutgoingSyncExternalPlanSyncDefaultValue, getOutgoingSyncExternalPlanSyncFieldPrintValue, getOutgoingSyncExternalPlanSyncFlag, getOutgoingSyncExternalPlanSyncInvalidValue, getOutgoingSyncExternalPlanSyncMetatype, getOutgoingSyncExternalPlanSyncPrintValue, getOutgoingSyncExternalPlanSyncRange, getOutgoingSyncExternalPlanSyncValidityCheck, getOutgoingSyncHeapAttributesQuery, getOutgoingSyncHeapAttributesQueryDefaultValue, getOutgoingSyncHeapAttributesQueryFieldPrintValue, getOutgoingSyncHeapAttributesQueryFlag, getOutgoingSyncHeapAttributesQueryInvalidValue, getOutgoingSyncHeapAttributesQueryMetatype, getOutgoingSyncHeapAttributesQueryPrintValue, getOutgoingSyncHeapAttributesQueryRange, getOutgoingSyncHeapAttributesQueryValidityCheck, getOutgoingSyncPlanComponentQuery, getOutgoingSyncPlanComponentQueryDefaultValue, getOutgoingSyncPlanComponentQueryFieldPrintValue, getOutgoingSyncPlanComponentQueryFlag, getOutgoingSyncPlanComponentQueryInvalidValue, getOutgoingSyncPlanComponentQueryMetatype, getOutgoingSyncPlanComponentQueryPrintValue, getOutgoingSyncPlanComponentQueryRange, getOutgoingSyncPlanComponentQueryValidityCheck, getOutgoingSyncPlanQuery, getOutgoingSyncPlanQueryDefaultValue, getOutgoingSyncPlanQueryFieldPrintValue, getOutgoingSyncPlanQueryFlag, getOutgoingSyncPlanQueryInvalidValue, getOutgoingSyncPlanQueryMetatype, getOutgoingSyncPlanQueryPrintValue, getOutgoingSyncPlanQueryRange, getOutgoingSyncPlanQueryValidityCheck, getOutgoingSyncPlanRecalc, getOutgoingSyncPlanRecalcDefaultValue, getOutgoingSyncPlanRecalcFieldPrintValue, getOutgoingSyncPlanRecalcFlag, getOutgoingSyncPlanRecalcInvalidValue, getOutgoingSyncPlanRecalcMetatype, getOutgoingSyncPlanRecalcPrintValue, getOutgoingSyncPlanRecalcRange, getOutgoingSyncPlanRecalcValidityCheck, getOutgoingSyncReaderQuery, getOutgoingSyncReaderQueryDefaultValue, getOutgoingSyncReaderQueryFieldPrintValue, getOutgoingSyncReaderQueryFlag, getOutgoingSyncReaderQueryInvalidValue, getOutgoingSyncReaderQueryMetatype, getOutgoingSyncReaderQueryPrintValue, getOutgoingSyncReaderQueryRange, getOutgoingSyncReaderQueryValidityCheck, getOutgoingSyncResourceQuery, getOutgoingSyncResourceQueryDefaultValue, getOutgoingSyncResourceQueryFieldPrintValue, getOutgoingSyncResourceQueryFlag, getOutgoingSyncResourceQueryInvalidValue, getOutgoingSyncResourceQueryMetatype, getOutgoingSyncResourceQueryPrintValue, getOutgoingSyncResourceQueryRange, getOutgoingSyncResourceQueryValidityCheck, getOutgoingSyncStatsQuery, getOutgoingSyncStatsQueryDefaultValue, getOutgoingSyncStatsQueryFieldPrintValue, getOutgoingSyncStatsQueryFlag, getOutgoingSyncStatsQueryInvalidValue, getOutgoingSyncStatsQueryMetatype, getOutgoingSyncStatsQueryPrintValue, getOutgoingSyncStatsQueryRange, getOutgoingSyncStatsQueryValidityCheck, getOutgoingSyncTaskPhaseQuery, getOutgoingSyncTaskPhaseQueryDefaultValue, getOutgoingSyncTaskPhaseQueryFieldPrintValue, getOutgoingSyncTaskPhaseQueryFlag, getOutgoingSyncTaskPhaseQueryInvalidValue, getOutgoingSyncTaskPhaseQueryMetatype, getOutgoingSyncTaskPhaseQueryPrintValue, getOutgoingSyncTaskPhaseQueryRange, getOutgoingSyncTaskPhaseQueryValidityCheck, getOutgoingSyncTaskQuery, getOutgoingSyncTaskQueryDefaultValue, getOutgoingSyncTaskQueryFieldPrintValue, getOutgoingSyncTaskQueryFlag, getOutgoingSyncTaskQueryInvalidValue, getOutgoingSyncTaskQueryMetatype, getOutgoingSyncTaskQueryPrintValue, getOutgoingSyncTaskQueryRange, getOutgoingSyncTaskQueryValidityCheck, getOutgoingSyncTaskTypeQuery, getOutgoingSyncTaskTypeQueryDefaultValue, getOutgoingSyncTaskTypeQueryFieldPrintValue, getOutgoingSyncTaskTypeQueryFlag, getOutgoingSyncTaskTypeQueryInvalidValue, getOutgoingSyncTaskTypeQueryMetatype, getOutgoingSyncTaskTypeQueryPrintValue, getOutgoingSyncTaskTypeQueryRange, getOutgoingSyncTaskTypeQueryValidityCheck, getOutputFileDir, getOutputFileDirDefaultValue, getOutputFileDirFieldPrintValue, getOutputFileDirFlag, getOutputFileDirInvalidValue, getOutputFileDirLengthMax, getOutputFileDirLengthNorm, getOutputFileDirMetatype, getOutputFileDirPrintValue, getOutputFileDirRange, getOutputFileDirValidityCheck, getParent, getSandNodeErrorMessage, getSandNodeErrorMessageDefaultValue, getSandNodeErrorMessageFieldPrintValue, getSandNodeErrorMessageFlag, getSandNodeErrorMessageInvalidValue, getSandNodeErrorMessageLengthMax, getSandNodeErrorMessageLengthNorm, getSandNodeErrorMessageMetatype, getSandNodeErrorMessagePrintValue, getSandNodeErrorMessageRange, getSandNodeErrorMessageValidityCheck, getSandNodeState, getSandNodeStateActualVals, getSandNodeStateDefaultValue, getSandNodeStateEnumSummary, getSandNodeStateFieldPrintValue, getSandNodeStateFlag, getSandNodeStateInvalidValue, getSandNodeStateKeyVals, getSandNodeStateMetatype, getSandNodeStatePrintVals, getSandNodeStatePrintValue, getSandNodeStateRange, getSandNodeStateValidityCheck, getSandRoot, getServername, getTechSupportEmailAddress, getTechSupportEmailAddressDefaultValue, getTechSupportEmailAddressFieldPrintValue, getTechSupportEmailAddressFlag, getTechSupportEmailAddressInvalidValue, getTechSupportEmailAddressLengthMax, getTechSupportEmailAddressLengthNorm, getTechSupportEmailAddressMetatype, getTechSupportEmailAddressPrintValue, getTechSupportEmailAddressRange, getTechSupportEmailAddressValidityCheck, getUserLookupInstanceName, getUserLookupInstanceNameDefaultValue, getUserLookupInstanceNameFieldPrintValue, getUserLookupInstanceNameFlag, getUserLookupInstanceNameInvalidValue, getUserLookupInstanceNameLengthMax, getUserLookupInstanceNameLengthNorm, getUserLookupInstanceNameMetatype, getUserLookupInstanceNamePrintValue, getUserLookupInstanceNameRange, getUserLookupInstanceNameValidityCheck, init, log, log, logLevelActual2Print, logLevelLabelToValue, logLevelPrint2Actual, logLevelPrint2Key, logLevelValueToLabel, notifyStateChange, onFailure, onRestart, onResume, onShutdown, onSuspend, receive, restart, resume, sandNodeStateActual2Print, sandNodeStateLabelToValue, sandNodeStatePrint2Actual, sandNodeStatePrint2Key, sandNodeStateValueToLabel, setAuthorizerInstanceName, setAuthorizerInstanceName, setHelperNodes, setIncomingAsyncCacheActionSource, setIncomingAsyncCacheActionSource, setIncomingAsyncStatsSource, setIncomingAsyncStatsSource, setInputFileDir, setInputFileDir, setLogger, setLogger, setLogLevel, setMessager, setMessager, setNodeInstance, setNodeInstance, setOutgoingSyncAggregateUpdate, setOutgoingSyncAggregateUpdate, setOutgoingSyncCacheActionRegistration, setOutgoingSyncCacheActionRegistration, setOutgoingSyncDataImportExport, setOutgoingSyncDataImportExport, setOutgoingSyncExternalPlanQuery, setOutgoingSyncExternalPlanQuery, setOutgoingSyncExternalPlanSync, setOutgoingSyncExternalPlanSync, setOutgoingSyncHeapAttributesQuery, setOutgoingSyncHeapAttributesQuery, setOutgoingSyncPlanComponentQuery, setOutgoingSyncPlanComponentQuery, setOutgoingSyncPlanQuery, setOutgoingSyncPlanQuery, setOutgoingSyncPlanRecalc, setOutgoingSyncPlanRecalc, setOutgoingSyncReaderQuery, setOutgoingSyncReaderQuery, setOutgoingSyncResourceQuery, setOutgoingSyncResourceQuery, setOutgoingSyncStatsQuery, setOutgoingSyncStatsQuery, setOutgoingSyncTaskPhaseQuery, setOutgoingSyncTaskPhaseQuery, setOutgoingSyncTaskQuery, setOutgoingSyncTaskQuery, setOutgoingSyncTaskTypeQuery, setOutgoingSyncTaskTypeQuery, setOutputFileDir, setOutputFileDir, setParent, setSandNodeErrorMessage, setSandNodeErrorMessage, setSandNodeState, setSandRoot, setTechSupportEmailAddress, setTechSupportEmailAddress, setupSecureReceive, setupSubscriptions, setUserLookupInstanceName, setUserLookupInstanceName, shutdown, startup, suspend, systemwideShutdown, validTransition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sandev.basics.util.UIFormOwner
getTechSupportEmailAddress
 
Methods inherited from interface org.sandev.basics.util.UIFormAdaptorCallback
log
 
Methods inherited from interface org.sandev.basics.util.CommBridge
getLogger
 

Field Detail

HEAPATTRID

protected static final long HEAPATTRID
The uniqueID of the HeapAttributes instance. Used by the node and by the UIActionHandler.

See Also:
Constant Field Values

actionHandler

protected UIActionHandler actionHandler
Our local instance that we delegate UI action processing to


userLookup

protected org.sandev.basics.util.AuthUserLookup userLookup
The instance we use for looking up users.


authorizer

protected org.sandev.basics.util.Authorizer authorizer
The Authorizer instance we use for retrieving an AuthFilter.


currStats

protected org.sandev.basics.sandmessages.Stats currStats
The latest statistics we have recieved. This is initialized via query onStartup and via subscription after that.


mailSender

protected org.sandev.basics.util.SimpleMailSender mailSender
Our simple mail sender. Initialized at startup, just used locally so no public acc/mut.


inboundFilesLink

protected java.lang.String inboundFilesLink
The base link specification for inbound files.


outboundFilesLink

protected java.lang.String outboundFilesLink
The base link specification for outbound files.


serializer

protected org.sandev.basics.nodecommon.CharSerializer serializer

encryptor

protected org.sandev.basics.util.SandEncryptor encryptor

retention

protected int retention
The maximum size of our broadcast message buffer.

Constructor Detail

TaskHeapUINode

public TaskHeapUINode()
Method Detail

getActionHandler

public UIActionHandler getActionHandler()
initializing accessor for actionHandler. Not synchronized


setActionHandler

public void setActionHandler(UIActionHandler ah)
mutator for actionHandler


getUserLookup

public org.sandev.basics.util.AuthUserLookup getUserLookup()
initializing accessor for userLookup. Not synchronized


setUserLookup

public void setUserLookup(org.sandev.basics.util.AuthUserLookup val)
mutator for userLookup


getAuthorizer

public org.sandev.basics.util.Authorizer getAuthorizer()
initializing accessor for authorizer. Not synchronized


setAuthorizer

public void setAuthorizer(org.sandev.basics.util.Authorizer auth)
mutator for authorizer


getCurrStats

public org.sandev.basics.sandmessages.Stats getCurrStats()
accessor for currStats


setCurrStats

protected void setCurrStats(org.sandev.basics.sandmessages.Stats stats)
mutator for currStats


getUserForID

public org.sandev.basics.util.AuthUser getUserForID(long authID)
                                             throws org.sandev.basics.structs.SandException
Return the AuthUser for the specified ID. Try the cache first for lookup, and then if that fails look it up the long way and cache the returned object.

Specified by:
getUserForID in interface org.sandev.basics.util.AuthUserLookup
Throws:
org.sandev.basics.structs.SandException

getUserFromLogin

public org.sandev.basics.util.AuthUser getUserFromLogin(java.lang.String username,
                                                        java.lang.String password)
                                                 throws org.sandev.basics.structs.SandException
Lookup the AuthUser for authentication information given. Cache the result if found.

Specified by:
getUserFromLogin in interface org.sandev.basics.util.AuthUserLookup
Throws:
org.sandev.basics.structs.SandException

checkCreateDemoResource

protected org.sandev.basics.util.AuthUser checkCreateDemoResource(java.lang.String username,
                                                                  java.lang.String password)
                                                           throws org.sandev.basics.structs.SandException
If this is a demo installation, and the password is demo, then create new Resource for this user so they can use the system. Return the Resource if created or null otherwise.

If creating a new resource fails, then this method returns null. We don't want to modify any existing accounts, so if the user changes their password and then attempts to access using the demo password, access will fail. That's correct behavior. Once a demo account has been created it works just like any other account.

Throws:
org.sandev.basics.structs.SandException

getInstance

public org.sandev.basics.structs.SandPersistMessage getInstance(java.lang.String classname,
                                                                long id,
                                                                org.sandev.basics.util.AuthUser user)
                                                         throws org.sandev.basics.structs.SandException
Lookup the ID in our cache, then retrieve the instance via query if that fails. This method is used to resolve references for display purposes. Because Readers and Resources can pretty much see all the same stuff, our access is pretty simple and we can use a single shared IDCache without fine-grained authorization processing. We only have to be careful that Readers cannot see any internal plans.

When a plan component is updated, our cache is updated directly as part of the update call processing, and again when asynchronous notification of the update is received. This ensures that the TaskHeapUINode instance used for the update call has the latest information, and that all other TaskHeapUINode instances will be updated as fast as the messaging system handles it. Because the cache checks message revision numbers, the duplicate cache update in the originating TaskHeapUINode is ignored.

This method is structured as a series of rules, with fallthrough from one to the next. This allows us to resolve PlanComponent references to the appropriate specific class.

Specified by:
getInstance in interface org.sandev.basics.util.IDLookup
Throws:
org.sandev.basics.structs.SandException

getInstance

public org.sandev.basics.structs.SandInstanceMessage getInstance(java.lang.String classname,
                                                                 java.lang.String fieldname,
                                                                 java.lang.String value,
                                                                 org.sandev.basics.util.AuthUser user)
                                                          throws org.sandev.basics.structs.SandException
Currently all the data we are dealing with is persistent and uses id references. If that changes, this method will throw and we can implement it then.

Specified by:
getInstance in interface org.sandev.basics.util.NameLookup
Throws:
org.sandev.basics.structs.SandException

setInboundFilesLink

public void setInboundFilesLink(java.lang.String link)
Mutator for inboundFilesLink.

Specified by:
setInboundFilesLink in interface org.sandev.basics.util.UIFileLocator

getInboundFilesLink

public java.lang.String getInboundFilesLink()
Accessor for inboundFilesLink

Specified by:
getInboundFilesLink in interface org.sandev.basics.util.UIFileLocator

getInboundFilesDir

public java.lang.String getInboundFilesDir()
The directory where uploaded files should be written to.

Specified by:
getInboundFilesDir in interface org.sandev.basics.util.UIFileLocator

setOutboundFilesLink

public void setOutboundFilesLink(java.lang.String link)
Mutator for outboundFilesLink.

Specified by:
setOutboundFilesLink in interface org.sandev.basics.util.UIFileLocator

getOutboundFilesLink

public java.lang.String getOutboundFilesLink()
Accessor for outboundFilesLink

Specified by:
getOutboundFilesLink in interface org.sandev.basics.util.UIFileLocator

getOutboundFilesDir

public java.lang.String getOutboundFilesDir()
The directory where uploaded files should be written to.

Specified by:
getOutboundFilesDir in interface org.sandev.basics.util.UIFileLocator

formFind

public org.sandev.basics.structs.SandCollectionMessage formFind(org.sandev.basics.structs.SandQueryMessage msg,
                                                                org.sandev.basics.util.UIFormContext uifc)
                                                         throws org.sandev.basics.util.UIFormManagerException
Process the given query and return the result.

Specified by:
formFind in interface org.sandev.basics.util.UIFormOwner
Throws:
org.sandev.basics.util.UIFormManagerException

<