|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.sandev.TaskHeap.TaskHeapUI.TaskHeapUINodeDecl
org.sandev.TaskHeap.TaskHeapUI.TaskHeapUINodeBase
org.sandev.TaskHeap.TaskHeapUI.TaskHeapUINode
public class TaskHeapUINode
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 java.lang.String |
inboundFilesLink
The base link specification for inbound files. |
protected org.sandev.basics.util.SimpleMailSender |
mailSender
Our simple mail sender. |
protected static int |
MAXPAGESIZE
The maximum amount of instances to return in a single query when we are actively paging through data. |
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
|
| Fields inherited from class org.sandev.TaskHeap.TaskHeapUI.TaskHeapUINodeDecl |
|---|
authorizerInstanceName, inputFileDir, internalCommsUsername, outputFileDir, peerAuthUserLookupNode, recalcUsername, techSupportEmailAddress |
| 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 HeapAssociation |
acceptHeapInvite(HeapAssociation ha,
org.sandev.basics.util.AuthUser user)
Update the given HeapAssociation to reference the users account if it hasn't been accepted yet. |
protected double |
asMB(long bytes)
Return the given number of bytes as a megabytes value. |
void |
cacheRemoved(org.sandev.basics.structs.SandPersistMessage spm)
Receive notification of the cache removing an item. |
protected void |
cacheTrack(org.sandev.basics.structs.SandPersistMessage spm,
long transmitID)
Call the parent method to track changes so our cache stays up to date, then fault in any additional supporting information we need. |
void |
cacheUserData(org.sandev.basics.util.AuthUser user)
Given a user, cache their HeapAssociations so we can verify what they have access to. |
org.sandev.basics.sandmessages.AggregateUpdate |
callAggregateUpdate(org.sandev.basics.sandmessages.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 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 |
doActionCancelHook(org.sandev.basics.util.UIFormContext uifc)
Given the UIFormContext that is being used for adding a new instance or editing an existing instance, preprocess as needed before returning control to the UIFormManager. |
void |
doActionDeleteHook(org.sandev.basics.util.UIFormContext uifc)
Given the UIFormContext that is being used for deleting the current instance, preprocess as needed before returning control to the UIFormManager. |
void |
doActionDisplayHook(org.sandev.basics.util.UIFormContext uifc)
Given the UIFormContext that will be used to present a form for displaying an existing instance, 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. |
protected org.sandev.basics.util.UIFormContext |
doActionMove(java.lang.String actionText,
org.sandev.basics.util.UIFormContext uifc,
org.sandev.basics.util.UserWorkLog uwl)
Handle the specified move action. |
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,
org.sandev.basics.util.FormOutput outText)
This is where we remap any input parameters before each message in the UIFormContext is reconstructed. |
protected void |
filterTranslateAggregateUpdate(org.sandev.basics.sandmessages.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.ArrayAssociation |
getAssignmentSelections(PlanComponentInterface pci,
org.sandev.basics.util.AuthUser user)
Retrieve a list of the available Resources and create an ArrayAssociation for dynamic selection with the given currResource as the default value. |
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. |
java.lang.String |
getFieldPrintname(java.lang.String field,
org.sandev.basics.structs.SandInstanceMessage msg,
java.util.Locale locale)
Return the printname for the given field. |
org.sandev.basics.sandmessages.Stats |
getGeneralStats(org.sandev.basics.util.AuthUser user)
Return the percentage of unnassigned tasks as a String. |
protected HeapAssociation[] |
getHeapAssociations(Account acc)
Return all the HeapAssociations for the given Account. |
protected org.sandev.basics.util.ArrayAssociation |
getHeapAttributesDefaultTaskType(HeapAttributes ha)
Get the available task types for the default task type field in the HeapAttributes. |
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 specified class instance. |
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 |
protected org.sandev.basics.util.ArrayAssociation |
getPlanComponentDueRefs(PlanComponentInterface pci,
org.sandev.basics.util.AuthUser authUser)
Return a list of the parent plans that the user can select from when setting a relative due date. |
int |
getPreferredRetention()
Returns 0. |
protected org.sandev.basics.util.ArrayAssociation |
getResponsibilities(PlanComponentInterface pci,
org.sandev.basics.util.AuthUser authUser)
Return a list of the roles available to assign responsibilty to. |
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. |
protected org.sandev.basics.util.ArrayAssociation |
getTaskTypesForTask(Task task)
Given a task, return the task types available for it. |
TaskType[] |
getTaskTypesFromCache(long heapID)
Get the current TaskType instances from cache and return an array of all those defined. |
protected org.sandev.basics.util.ArrayAssociation |
getUIFormQuerySelectionOptions(org.sandev.basics.sandmessages.UIFormQuery uifq,
org.sandev.basics.util.AuthUser user)
Remove PlanComponent as a choice when creating a new PlanComponent, so the choice is limited to Task, Plan, ExternalPlan. |
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.UserWorkLog |
getUserWorkLog()
Return a new UserWorkLog instance. |
protected boolean |
hasAncestor(PlanComponentInterface pci,
long parentID,
org.sandev.basics.util.AuthUser user)
Return true if any parent of the given component matches the specified ID, false otherwise. |
protected void |
htaccessVerify(HeapAttributes heap)
Verify the output directory for this heap exists and has basic authorization in place. |
protected java.lang.String |
improveErrorText(java.lang.String errorText)
If we can improve on the given error text, then return the improved text, otherwise return what we got. |
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. |
protected boolean |
isCachedClass(java.lang.String classname)
Skip caching some classes to save on memory overhead. |
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. |
protected void |
noteNewHeap(org.sandev.basics.sandmessages.AggregateUpdate au,
org.sandev.basics.util.UIFormContext uifc)
If the given AggregateUpdate created a new heap, then set it as the current heap for this user and switch to the heap display. |
protected void |
noteNewUser(org.sandev.basics.sandmessages.AggregateUpdate au,
org.sandev.basics.util.UIFormContext uifc)
If the given AggregateUpdate was to create a new account, modify the given UIFormContext to trigger switching to that account. |
boolean |
okToUncache(org.sandev.basics.structs.SandPersistMessage spm)
Return true if the given item is not permanently cached |
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 |
postSaveHeap(org.sandev.basics.util.UIFormContext uifc,
org.sandev.basics.sandmessages.AggregateUpdate auOld,
org.sandev.basics.sandmessages.AggregateUpdate auNew)
Verify the reports dir exists and is protected based on the username and password specified. |
protected void |
postSaveProcessing(org.sandev.basics.util.UIFormContext uifc,
org.sandev.basics.sandmessages.AggregateUpdate auOld,
org.sandev.basics.sandmessages.AggregateUpdate auNew)
Hook method called immediately after successful save. |
protected void |
precacheLoad()
Precache anything we want around from app startup. |
protected void |
preSaveProcessing(org.sandev.basics.sandmessages.AggregateUpdate au,
java.lang.String sourceName)
Hook method called immediately before saving an update. |
Account |
rebuildHeapAssocs(Account acc)
Rebuild the HeapAssociations for the given account if they have changed, and default the current heap association. |
HeapAssociation[] |
retrieveHeapAssociations(Account acc)
Retrieve and cache the HeapAssociations for the specified account. |
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. |
protected void |
setNewComponentValues(PlanComponentInterface pci,
org.sandev.basics.util.UIFormContext uifc,
Account acc)
Given some kind of a plan component, initialize the fields appropriately. |
void |
setOutboundFilesLink(java.lang.String link)
Mutator for outboundFilesLink. |
void |
setRetention(int val)
mutator for retention |
int |
stdActionFromText(java.lang.String actionText)
Given action text from stdActionToText, translate it back to a standard action value. |
java.lang.String |
stdActionToText(int action,
org.sandev.basics.util.UIFormContext uifc)
Given a standard action value, return the text used when displaying it. |
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. |
java.lang.String |
verifyDefaultAction(java.lang.String currAction,
org.sandev.basics.util.UIFormContext uifc,
java.lang.String formName)
Change the default action if needed. |
java.lang.String |
verifyDefaultScreen(java.lang.String defaultScreen,
org.sandev.basics.util.AuthUser user,
java.lang.String[] screens,
java.util.Map params)
Return the name of the default screen to be presented. |
org.sandev.basics.structs.SandAttrVal[] |
verifyGeneralInfo(org.sandev.basics.structs.SandAttrVal[] generalInfo,
org.sandev.basics.util.AuthUser authUser)
Return an array of general information to be made globally available in display processing. |
protected void |
verifyTransmission(org.sandev.basics.structs.SandTransmitMessage stm)
Throws if the transmit status is anything other than normal. |