watch
Class Watch

java.lang.Object
  extended by watch.Watch
Direct Known Subclasses:
Cli2Xml, EditorInput

public class Watch
extends java.lang.Object

Watch application class.


Field Summary
static java.lang.String AUTHOR
          Author of the application.
static java.lang.String COPYRIGHT
          Copyright notice.
static java.lang.String EMAIL
          Email of the author.
protected static Watch m_wInstance
          Watch application singleton variable.
static java.lang.String URL
          URL of the project.
static java.lang.String VERSION
          Version of the application.
 
Constructor Summary
Watch()
          Constructor.
 
Method Summary
 void beginTaskGroup(java.lang.String J_TaskId, java.lang.String J_StartDate)
          Beginning of a task group.
 void comment(java.util.Collection<java.lang.String> J_Words)
          Comment input.
 void comment(java.lang.String J_Comment)
          Comment input.
 void endTaskGroup()
          End of a task group.
 void execute(java.lang.String J_FocusTask, java.util.Collection<java.lang.String> J_Users, java.lang.String J_ReferenceDate, java.lang.String J_StartDate, java.lang.String J_EndDate, boolean B_SumImputationsOnly, boolean B_History, Transformation W_Transformation, java.lang.String J_OutputFileName)
          Watch execution.
static cli.Cli getCli()
          CLI instance accessor.
static Watch getInstance()
          Watch application instance accessor.
static cli.Shell getShell()
          CLI shell instance accessor.
 void imputation(java.lang.String J_TaskId, java.lang.String J_Date, double D_Imputed)
          Make an imputation.
 void load(java.lang.String J_XmlPath)
          Load an XML watch syntax file.
 void locale(java.lang.String J_Locale)
          Locale declaration.
 void lock(java.lang.String J_TaskId, java.lang.String J_Date)
          Make a lock operation.
static void main(java.lang.String[] ARJ_Args)
          Main function of the Watch application.
 void onError(cli.ResourceString location, cli.ResourceString message)
          CLI error handler.
 void onExit()
          CLI exit handler.
 void projectName(java.lang.String J_ProjectName)
          Project name declaration.
 void revision(java.lang.String J_TaskId, java.lang.String J_Date, double D_Remaining, double D_Risks, double D_Opportunities, double D_Earned)
          Make a revision.
protected static void run(Watch W_Watch, Args W_Args)
          Main function of the Watch applications.
 void setCurrentRevisionDate(java.lang.String J_Date)
          Current revision date setting.
 void setCurrentUser(java.lang.String J_UserName)
          Current user setting.
 void singleTask(java.lang.String J_TaskId, java.lang.String J_ReferenceStartDate, double D_Reference, double D_ReferenceRisks, double D_ReferenceOpportunities, java.lang.String J_PlannedStartDate, java.lang.String J_PlannedEndDate, int E_SchedulingMode)
          Single task definition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
Version of the application.

See Also:
Constant Field Values

AUTHOR

public static final java.lang.String AUTHOR
Author of the application.

See Also:
Constant Field Values

EMAIL

public static final java.lang.String EMAIL
Email of the author.

See Also:
Constant Field Values

URL

public static final java.lang.String URL
URL of the project.

See Also:
Constant Field Values

COPYRIGHT

public static final java.lang.String COPYRIGHT
Copyright notice.

See Also:
Constant Field Values

m_wInstance

protected static Watch m_wInstance
Watch application singleton variable. This member is protected so that Cli2Xml can set this singleton member with a Cli2Xml instance immediately.

Constructor Detail

Watch

public Watch()
Constructor.

Method Detail

main

public static void main(java.lang.String[] ARJ_Args)
Main function of the Watch application. Analyze arguments and launches the CLI.

Parameters:
ARJ_Args - Arguments passed to the program.

run

protected static void run(Watch W_Watch,
                          Args W_Args)
Main function of the Watch applications.

Parameters:
W_Watch - Watch instance to run.
W_Args - Arguments passed to the program.

getCli

public static cli.Cli getCli()
CLI instance accessor.

Returns:
The only one CLI instance.

getShell

public static cli.Shell getShell()
CLI shell instance accessor.

Returns:
The only one CLI shell instance.

getInstance

public static Watch getInstance()
Watch application instance accessor.

Returns:
The only one Watch application instance.

load

public void load(java.lang.String J_XmlPath)
Load an XML watch syntax file.

Parameters:
J_XmlPath - Path of the XML watch syntax file to load.

comment

public void comment(java.util.Collection<java.lang.String> J_Words)
Comment input.

Parameters:
J_Words - Collection of words, making a sentence.

comment

public final void comment(java.lang.String J_Comment)
Comment input.

Parameters:
J_Comment - Comment sentence.

projectName

public void projectName(java.lang.String J_ProjectName)
Project name declaration.

Parameters:
J_ProjectName - New project name.

locale

public void locale(java.lang.String J_Locale)
Locale declaration.

Parameters:
J_Locale - New locale in its string form:
  • 'chinese'
  • 'english'
  • 'french'
  • 'german'
  • 'italian'
  • 'japanese'.

beginTaskGroup

public void beginTaskGroup(java.lang.String J_TaskId,
                           java.lang.String J_StartDate)
Beginning of a task group.

Parameters:
J_TaskId - Task identifier.
J_StartDate - Task start date. Can be null if no specific start date.

endTaskGroup

public void endTaskGroup()
End of a task group.


singleTask

public void singleTask(java.lang.String J_TaskId,
                       java.lang.String J_ReferenceStartDate,
                       double D_Reference,
                       double D_ReferenceRisks,
                       double D_ReferenceOpportunities,
                       java.lang.String J_PlannedStartDate,
                       java.lang.String J_PlannedEndDate,
                       int E_SchedulingMode)
Single task definition.

Parameters:
J_TaskId - Task identifier.
J_ReferenceStartDate - Reference start date. Can be null if no specific reference start date.
D_Reference - Reference value for the task. -1.0 if this task should not be checked against its reference.
D_ReferenceRisks - Reference risks of the task.
D_ReferenceOpportunities - Reference opportunities of the task.
J_PlannedStartDate - Planned start date. Can be null if no planification is done.
J_PlannedEndDate - Planned end date. Can be null if no planification is done.
E_SchedulingMode - Scheduling mode. Can be either Task.SCHEDULING_AT_END or Task.SCHEDULING_LINEAR.

setCurrentUser

public void setCurrentUser(java.lang.String J_UserName)
Current user setting. Useful for imputations for instance.

Parameters:
J_UserName - User identifier: either the full name, or initials... whatever, it is up to the user to choose.

imputation

public void imputation(java.lang.String J_TaskId,
                       java.lang.String J_Date,
                       double D_Imputed)
Make an imputation. Within the context of the user defined by Watch.setCurrentUser().

Parameters:
J_TaskId - Identifier of the task the imputation is related to.
J_Date - Date of the imputation.
D_Imputed - Imputation value.

setCurrentRevisionDate

public void setCurrentRevisionDate(java.lang.String J_Date)
Current revision date setting. Permits Watch.revision() and Watch.lock() to be called without repeating the revision date.

Parameters:
J_Date - Revision date to remember for next revisions and lock operations.

revision

public void revision(java.lang.String J_TaskId,
                     java.lang.String J_Date,
                     double D_Remaining,
                     double D_Risks,
                     double D_Opportunities,
                     double D_Earned)
Make a revision.

Parameters:
J_TaskId - Identifier of the task wich remaining value is being revised.
J_Date - Date of the revision. Can be null if Watch.setCurrentDateRevision() has been called previously.
D_Remaining - Revision of the remaining value. Applicable only if positive or nul.
D_Risks - Revision of the risks value. Applicable only if positive or nul.
D_Opportunities - Revision of the opportunities value. Applicable only if positive or nul.
D_Earned - Revision of the earned value. Applicable only if positive or nul.

lock

public void lock(java.lang.String J_TaskId,
                 java.lang.String J_Date)
Make a lock operation. The task locked cannot be imputed neither reviewed after the lock date.

Parameters:
J_TaskId - Identifier of the task being locked.
J_Date - Date of the lock operation. Can be null if Watch.setCurrentDateRevision() has been called previously.

execute

public void execute(java.lang.String J_FocusTask,
                    java.util.Collection<java.lang.String> J_Users,
                    java.lang.String J_ReferenceDate,
                    java.lang.String J_StartDate,
                    java.lang.String J_EndDate,
                    boolean B_SumImputationsOnly,
                    boolean B_History,
                    Transformation W_Transformation,
                    java.lang.String J_OutputFileName)
Watch execution. Consists in a computation followed by an output, either in the standard output or in an output file.

Parameters:
J_FocusTask - Task to focus the computation onto. If null, the whole project will be computed.
J_Users - List of users to focus the computation onto. If null or empty, all users imputations will be taken in account.
J_ReferenceDate - Date to consider as the reference date. This can allow one to check the project against a certain date. If null, the initial values remain the reference.
J_StartDate - Date to start the computation from. Imputations and revisions before will not be taken in account. Useful if B_SumImputationsOnly is true. If null, no specific start date will be considered for imputations and revisions validity.
J_EndDate - Date to end the computation at. Imputations and revisions after will not be taken in account. Useful if B_SumImputationsOnly is true. If null, no specific and date will be considered for imputations and revisions validity.
B_SumImputationsOnly - When true, limits the computation at summing imputations. Ignored when B_History is true.
B_History - When true, launches the history computation instead of a regular computation. The history computation is different in the way that it retrieves reference, imputed, remaining, risks and opportunities values along the time for the focus task, whereas the regular computation retrieves these values for the focus task and all its sub-tasks, but at the end date only. The history computation implies an history transformation for W_Transformation.
W_Transformation - The computation results in an XML structure in memory. This parameter indicates the transformation to apply for presenting the results.
J_OutputFileName - Results output file name. If null, the output is the standard output.

onError

public void onError(cli.ResourceString location,
                    cli.ResourceString message)
CLI error handler. Nothing special to do here, the errors should be notified by the CLI itself.

Parameters:
location - CLI error location information.
message - CLI error message.

onExit

public void onExit()
CLI exit handler.