watch
Class Cli2Xml

java.lang.Object
  extended by watch.Watch
      extended by watch.Cli2Xml

public class Cli2Xml
extends Watch

Watch class overriding for CLI to XML watch syntax translation. The CLI events normally sent to the Watch class are caught by this Cli2Xml class and redirected to a XmlInput instance instead.


Field Summary
 
Fields inherited from class watch.Watch
AUTHOR, COPYRIGHT, EMAIL, m_wInstance, URL, VERSION
 
Constructor Summary
Cli2Xml(java.lang.String J_OutputFile)
          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 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)
          No executions.
 boolean getbResult()
          Result accessor.
 void imputation(java.lang.String J_TaskId, java.lang.String J_Date, double D_Imputed)
          Imputation.
 void load(java.lang.String J_XmlPath)
          No XML watch syntax file loading.
 void locale(java.lang.String J_Locale)
          Locale declaration.
 void lock(java.lang.String J_TaskId, java.lang.String J_Date)
          Lock operation.
static void main(java.lang.String[] ARJ_Args)
          Main function of the 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)
          Revision.
 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 watch.Watch
comment, getCli, getInstance, getShell, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cli2Xml

public Cli2Xml(java.lang.String J_OutputFile)
Constructor.

Parameters:
J_OutputFile - XML watch syntax output file path.
Method Detail

main

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

Parameters:
ARJ_Args - Arguments passed to the program.

getbResult

public boolean getbResult()
Result accessor.

Returns:
The result status.

load

public void load(java.lang.String J_XmlPath)
No XML watch syntax file loading. Disabling of Watch.load().

Overrides:
load in class Watch
Parameters:
J_XmlPath - Path of an XML watch syntax file.

comment

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

Overrides:
comment in class Watch
Parameters:
J_Words - Collection of words, making a sentence.

projectName

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

Overrides:
projectName in class Watch
Parameters:
J_ProjectName - New project name.

locale

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

Overrides:
locale in class Watch
Parameters:
J_Locale - New locale in its string form.
See Also:
Watch.locale(java.lang.String)

beginTaskGroup

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

Overrides:
beginTaskGroup in class Watch
Parameters:
J_TaskId - Task identifier.
J_StartDate - Task start date.

endTaskGroup

public void endTaskGroup()
End of a task group.

Overrides:
endTaskGroup in class Watch

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.

Overrides:
singleTask in class Watch
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. Either Task.SCHEDULING_NONE, 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.

Overrides:
setCurrentUser in class Watch
Parameters:
J_UserName - User identifier.

imputation

public void imputation(java.lang.String J_TaskId,
                       java.lang.String J_Date,
                       double D_Imputed)
Imputation.

Overrides:
imputation in class Watch
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.

Overrides:
setCurrentRevisionDate in class Watch
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)
Revision.

Overrides:
revision in class Watch
Parameters:
J_TaskId - Identifier of the task wich remaining value is being revised.
J_Date - Date of the revision.
D_Remaining - Revision of the remaining value.
D_Risks - Revision of the risks value.
D_Opportunities - Revision of the opportunities value.
D_Earned - Revision of the earned value.

lock

public void lock(java.lang.String J_TaskId,
                 java.lang.String J_Date)
Lock operation.

Overrides:
lock in class Watch
Parameters:
J_TaskId - Identifier of the task being locked.
J_Date - Date of the lock operation.

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)
No executions. Disabling of Watch.execute().

Overrides:
execute in class Watch
Parameters:
J_FocusTask - Task to focus the computation onto.
J_Users - List of users to focus the computation onto.
J_ReferenceDate - Date to consider as the reference date.
J_StartDate - Date to start the computation from.
J_EndDate - Date to end the computation at.
B_SumImputationsOnly - When true, limits the computation at summing imputations.
B_History - When true, launches the history computation instead of a regular computation.
W_Transformation - Output transformation.
J_OutputFileName - Results output file name.

onError

public void onError(cli.ResourceString location,
                    cli.ResourceString message)
CLI error handler. Permits the translation to fail if a CLI syntax error has been detected.

Overrides:
onError in class Watch
Parameters:
location - CLI error location information.
message - CLI error message.

onExit

public void onExit()
CLI exit handler. Automatic output XML watch syntax file generation if sucessful until there.

Overrides:
onExit in class Watch