|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.sandev.TaskHeap.util.PlanComponentUtil
public class PlanComponentUtil
Useful utility methods for dealing with PlanComponent derived classes.
| Constructor Summary | |
|---|---|
PlanComponentUtil()
|
|
| Method Summary | |
|---|---|
static boolean |
externalPlanDue(ExternalPlan ep,
int defaultLatencyHours)
Return true if the given ExternalPlan is due for refresh, false otherwise. |
static java.util.Date |
getDueDate(PlanComponentInterface pci,
org.sandev.basics.util.IDLookup lookup,
org.sandev.basics.util.AuthUser user)
Return when this task is due, either using the current fixed due date or computing the relative date. |
static java.lang.String |
getName(org.sandev.basics.structs.SandStructMessage ssm)
Return the value of the name field, or the empty string if this is not a PlanComponentStruct derived message. |
static Note[] |
getNotes(org.sandev.basics.structs.SandStructMessage ssm)
Return the notes array of the given PlanComponent message, or an empty array otherwise. |
static long |
getParent(org.sandev.basics.structs.SandStructMessage ssm)
Return the parent id of the given PlanComponent message, or zero if none was found. |
static org.sandev.basics.structs.SandPersistMessage |
getUpdatedInstance(java.lang.String classname,
long id,
org.sandev.basics.util.IDLookup lookup,
org.sandev.basics.util.AuthUser user,
org.sandev.basics.structs.SandUpdateMessage[] updates)
Return the requested instance looking first in the updates and then via the lookup. |
static java.util.Calendar |
roundDate(java.util.Calendar cal,
PlanComponentInterface pci)
Round the calendar as specified in the plan component. |
static PlanComponentInterface[] |
sortComponents(PlanComponentInterface[] comps,
org.sandev.basics.util.IDLookup lookup,
org.sandev.basics.util.AuthUser user)
Sort the given PlanComponentInterface array and return the result. |
static void |
sortElements(Plan plan,
org.sandev.basics.util.IDLookup lookup,
org.sandev.basics.util.AuthUser user,
org.sandev.basics.structs.SandUpdateMessage[] updates)
Given a Plan, sort its components. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PlanComponentUtil()
| Method Detail |
|---|
public static java.lang.String getName(org.sandev.basics.structs.SandStructMessage ssm)
public static long getParent(org.sandev.basics.structs.SandStructMessage ssm)
public static Note[] getNotes(org.sandev.basics.structs.SandStructMessage ssm)
public static java.util.Date getDueDate(PlanComponentInterface pci,
org.sandev.basics.util.IDLookup lookup,
org.sandev.basics.util.AuthUser user)
throws org.sandev.basics.structs.SandException
org.sandev.basics.structs.SandException
public static java.util.Calendar roundDate(java.util.Calendar cal,
PlanComponentInterface pci)
public static PlanComponentInterface[] sortComponents(PlanComponentInterface[] comps,
org.sandev.basics.util.IDLookup lookup,
org.sandev.basics.util.AuthUser user)
throws org.sandev.basics.structs.SandException
org.sandev.basics.structs.SandException
public static void sortElements(Plan plan,
org.sandev.basics.util.IDLookup lookup,
org.sandev.basics.util.AuthUser user,
org.sandev.basics.structs.SandUpdateMessage[] updates)
throws org.sandev.basics.structs.SandException
org.sandev.basics.structs.SandException
public static org.sandev.basics.structs.SandPersistMessage getUpdatedInstance(java.lang.String classname,
long id,
org.sandev.basics.util.IDLookup lookup,
org.sandev.basics.util.AuthUser user,
org.sandev.basics.structs.SandUpdateMessage[] updates)
throws org.sandev.basics.structs.SandException
org.sandev.basics.structs.SandException
public static boolean externalPlanDue(ExternalPlan ep,
int defaultLatencyHours)
Larger latencies like 2x/day etc are computed based on their hourly offset from the current time. We don't want the system doing everything for everyone at noon and midnight each day. If someone really wants that then they can simply do a manual refresh to anchor the base latency time where they want it.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||