|
||||||||||
| 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
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.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 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 |
protected static final long HEAPATTRID
protected UIActionHandler actionHandler
protected org.sandev.basics.util.AuthUserLookup userLookup
protected org.sandev.basics.util.Authorizer authorizer
protected org.sandev.basics.sandmessages.Stats currStats
protected org.sandev.basics.util.SimpleMailSender mailSender
protected java.lang.String inboundFilesLink
protected java.lang.String outboundFilesLink
protected org.sandev.basics.nodecommon.CharSerializer serializer
protected org.sandev.basics.util.SandEncryptor encryptor
protected int retention
| Constructor Detail |
public TaskHeapUINode()
| Method Detail |
public UIActionHandler getActionHandler()
public void setActionHandler(UIActionHandler ah)
public org.sandev.basics.util.AuthUserLookup getUserLookup()
public void setUserLookup(org.sandev.basics.util.AuthUserLookup val)
public org.sandev.basics.util.Authorizer getAuthorizer()
public void setAuthorizer(org.sandev.basics.util.Authorizer auth)
public org.sandev.basics.sandmessages.Stats getCurrStats()
protected void setCurrStats(org.sandev.basics.sandmessages.Stats stats)
public org.sandev.basics.util.AuthUser getUserForID(long authID)
throws org.sandev.basics.structs.SandException
getUserForID in interface org.sandev.basics.util.AuthUserLookuporg.sandev.basics.structs.SandException
public org.sandev.basics.util.AuthUser getUserFromLogin(java.lang.String username,
java.lang.String password)
throws org.sandev.basics.structs.SandException
getUserFromLogin in interface org.sandev.basics.util.AuthUserLookuporg.sandev.basics.structs.SandException
protected org.sandev.basics.util.AuthUser checkCreateDemoResource(java.lang.String username,
java.lang.String password)
throws org.sandev.basics.structs.SandException
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.
org.sandev.basics.structs.SandException
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
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.
getInstance in interface org.sandev.basics.util.IDLookuporg.sandev.basics.structs.SandException
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
getInstance in interface org.sandev.basics.util.NameLookuporg.sandev.basics.structs.SandExceptionpublic void setInboundFilesLink(java.lang.String link)
setInboundFilesLink in interface org.sandev.basics.util.UIFileLocatorpublic java.lang.String getInboundFilesLink()
getInboundFilesLink in interface org.sandev.basics.util.UIFileLocatorpublic java.lang.String getInboundFilesDir()
getInboundFilesDir in interface org.sandev.basics.util.UIFileLocatorpublic void setOutboundFilesLink(java.lang.String link)
setOutboundFilesLink in interface org.sandev.basics.util.UIFileLocatorpublic java.lang.String getOutboundFilesLink()
getOutboundFilesLink in interface org.sandev.basics.util.UIFileLocatorpublic java.lang.String getOutboundFilesDir()
getOutboundFilesDir in interface org.sandev.basics.util.UIFileLocator
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
formFind in interface org.sandev.basics.util.UIFormOwnerorg.sandev.basics.util.UIFormManagerException