org.telscenter.pas.util
Class PasCurnitUtils

java.lang.Object
  extended by org.telscenter.pas.util.PasCurnitUtils

public class PasCurnitUtils
extends java.lang.Object


Constructor Summary
PasCurnitUtils()
           
 
Method Summary
static PasActivity activityFromPod(net.sf.sail.core.beans.Pod activityPod)
           
static void addActivity(PasProject project, int activityIndex, PasActivity activity)
          Adds the activity bean into the project bean at the specified index.
static void addActivity(net.sf.sail.core.beans.Pod projectPod, int index, net.sf.sail.core.beans.Pod activityPod)
          Deprecated. 
static void addStep(PasActivity activity, int stepIndex, PasStep step)
          Adds the step bean into the activity bean at the specified index.
static void addStep(net.sf.sail.core.beans.Pod activityPod, int stepIndex, net.sf.sail.core.beans.Pod stepPod)
          Deprecated. 
static PasProject findPasProject(net.sf.sail.core.beans.Pod pod)
           
static void insertActivityInProjectBean(PasProject project, int activityIndex, PasActivity activity)
           
static void insertStepInActivityBean(PasActivity activity, int stepIndex, PasStep step)
           
static void moveTo(PasActivity activityDes, PasActivity activitySource, PasStep movedStep, int newIndex)
          move step to a different activity
static void moveTo(PasActivity activity, PasStep movedStep, int newIndex)
          moves a step to a new position in the same activity
static void moveTo(PasProject pasProject, PasActivity movedActivity, int newIndex)
          reorder the activities
static PasProject projectFromPod(net.sf.sail.core.beans.Pod projectPod)
           
static void removeActivity(PasProject project, PasActivity activity)
          Removes the step bean and its enclosing pod from the project bean and its enclosing pod.
static int removeActivityFromProjectBean(PasProject project, PasActivity activity)
           
static void removeStep(PasActivity activity, PasStep step)
          Removes the step bean and its enclosing pod from the project bean and its enclosing pod.
static int removeStepFromActivityBean(PasActivity activity, PasStep step)
           
static PasStep stepFromPod(net.sf.sail.core.beans.Pod stepPod)
           
static java.io.File writeCurnit(java.lang.String path, java.lang.String curnitTitle, net.sf.sail.core.uuid.CurnitUuid curnitId, net.sf.sail.core.beans.Pod rootPod)
          writes the curnit to a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasCurnitUtils

public PasCurnitUtils()
Method Detail

activityFromPod

public static PasActivity activityFromPod(net.sf.sail.core.beans.Pod activityPod)
Parameters:
activityPod -
Returns:

addActivity

public static void addActivity(PasProject project,
                               int activityIndex,
                               PasActivity activity)
Adds the activity bean into the project bean at the specified index. If the two beans are in the same pod, they will remain in the same pod. If they are in separate pods, a hierarchical relationship will be made between them and inter-pod links to reference the beans across the pod boundaries. Assumes that projectPod has one PasProject bean and activityPod has one PasActivity bean. Also that each bean has an enclosing pod.


addActivity

@Deprecated
public static void addActivity(net.sf.sail.core.beans.Pod projectPod,
                                          int index,
                                          net.sf.sail.core.beans.Pod activityPod)
Deprecated. 

To the project pod and its project bean, adds the activity pod and its activity bean at the specified index. Assumes that projectPod has one PasProject bean and activityPod has one PasActivity bean.


addStep

public static void addStep(PasActivity activity,
                           int stepIndex,
                           PasStep step)
Adds the step bean into the activity bean at the specified index. If the two beans are in the same pod, they will remain in the same pod. If they are in separate pods, a hierarchical relationship will be made between them and inter-pod links to reference the beans across the pod boundaries. Assumes that activityPod has one PasActivity bean and stepPod has one PasStep bean. Also that each bean has an enclosing pod.


addStep

@Deprecated
public static void addStep(net.sf.sail.core.beans.Pod activityPod,
                                      int stepIndex,
                                      net.sf.sail.core.beans.Pod stepPod)
Deprecated. 

To the activity pod and its activity bean, adds the step pod and its step bean at the specified index. Assumes that activityPod has one PasActivity bean and stepPod has one PasStep bean.


findPasProject

public static PasProject findPasProject(net.sf.sail.core.beans.Pod pod)

insertActivityInProjectBean

public static void insertActivityInProjectBean(PasProject project,
                                               int activityIndex,
                                               PasActivity activity)
Parameters:
project -
activityIndex -
activity -

insertStepInActivityBean

public static void insertStepInActivityBean(PasActivity activity,
                                            int stepIndex,
                                            PasStep step)
Parameters:
activity -
stepIndex -
step -

moveTo

public static void moveTo(PasActivity activityDes,
                          PasActivity activitySource,
                          PasStep movedStep,
                          int newIndex)
move step to a different activity

Parameters:
activityDes -
activitySource -
movedStep -
newIndex -

moveTo

public static void moveTo(PasActivity activity,
                          PasStep movedStep,
                          int newIndex)
moves a step to a new position in the same activity

Parameters:
activity -
movedStep -
newIndex -

moveTo

public static void moveTo(PasProject pasProject,
                          PasActivity movedActivity,
                          int newIndex)
reorder the activities

Parameters:
pasProject - - the pasProject
movedActivity - - the activity to move somewhere
newIndex - - its new position

projectFromPod

public static PasProject projectFromPod(net.sf.sail.core.beans.Pod projectPod)
Parameters:
projectPod -
Returns:

removeActivity

public static void removeActivity(PasProject project,
                                  PasActivity activity)
Removes the step bean and its enclosing pod from the project bean and its enclosing pod.

Parameters:
project -
activity -

removeActivityFromProjectBean

public static int removeActivityFromProjectBean(PasProject project,
                                                PasActivity activity)
Parameters:
project -
activity -
Returns:
index of activity that was removed

removeStep

public static void removeStep(PasActivity activity,
                              PasStep step)
Removes the step bean and its enclosing pod from the project bean and its enclosing pod.

Parameters:
project -
activity -

removeStepFromActivityBean

public static int removeStepFromActivityBean(PasActivity activity,
                                             PasStep step)
Parameters:
activity -
step -
Returns:
index of step that was removed

stepFromPod

public static PasStep stepFromPod(net.sf.sail.core.beans.Pod stepPod)
Parameters:
stepPod -
Returns:

writeCurnit

public static java.io.File writeCurnit(java.lang.String path,
                                       java.lang.String curnitTitle,
                                       net.sf.sail.core.uuid.CurnitUuid curnitId,
                                       net.sf.sail.core.beans.Pod rootPod)
                                throws java.lang.Exception
writes the curnit to a file

Parameters:
curnitTitle -
curnitId -
rootPod -
Returns:
Throws:
java.lang.Exception


Copyright © 2004-2008 TELS Center. All Rights Reserved.