cz.cuni.mff.procasor.core.helper
Class UseCaseStepHelper

java.lang.Object
  extended bycz.cuni.mff.procasor.core.helper.UseCaseStepHelper

public final class UseCaseStepHelper
extends java.lang.Object

Helper class for UseCaseStep.

Author:
Jirka

Method Summary
static UseCaseStep create(java.lang.String stepMark, java.lang.String text)
          Creates new UseCaseStep and inicializes all parametrs.
static java.lang.String getExtensionStepMark(UseCaseStep step)
          Generates new stepMark, that extends step from parameter.
static java.lang.String getNextStepMark(UseCaseStep step)
          Generates new stepMark, that follows step from parameter.
static void reMarkSteps(UseCase useCase, UseCaseStep step, java.lang.String mark)
          Remarks useCaseSteps.
static void remove(UseCase useCase, UseCaseStep useCaseStep)
          Remove uasCaseStep from project.
static void save(UseCaseStep useCaseStep, UseCase useCase, int position)
          Generate id for useCaseStep and add this step to the UseCase to the specified postion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static UseCaseStep create(java.lang.String stepMark,
                                 java.lang.String text)
Creates new UseCaseStep and inicializes all parametrs.

Parameters:
stepMark - text of stepMark
text - text of step
Returns:
new BranchStep with initialized parameters.

save

public static void save(UseCaseStep useCaseStep,
                        UseCase useCase,
                        int position)
Generate id for useCaseStep and add this step to the UseCase to the specified postion

Parameters:
useCaseStep - use case step, which id is generated
useCase - use case, step belongs to
position - position of step in List of use case steps

remove

public static void remove(UseCase useCase,
                          UseCaseStep useCaseStep)
Remove uasCaseStep from project.

Parameters:
useCase - use case, step belongs to
useCaseStep - step to be removed from project

getNextStepMark

public static java.lang.String getNextStepMark(UseCaseStep step)
Generates new stepMark, that follows step from parameter.

Parameters:
step - step
Returns:
new step mark following step

getExtensionStepMark

public static java.lang.String getExtensionStepMark(UseCaseStep step)
Generates new stepMark, that extends step from parameter.

Parameters:
step - step
Returns:
new step mark extending step

reMarkSteps

public static void reMarkSteps(UseCase useCase,
                               UseCaseStep step,
                               java.lang.String mark)
Remarks useCaseSteps. Stepmark of step is set to mark, all next steps are remarked.

Parameters:
useCase - use case, steps belong to
step - step to be remarked first
mark - new mark for the step