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

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

public class ActorHelper
extends java.lang.Object

Class providing helper functions for the class Actor.


Field Summary
protected static java.lang.String[] actorRoleNames
          Constants representating roles.
static java.lang.String[] actorRoleNamesDisplaying
          Names of roles, that will be displayed in the gui.
static int PRIMARY_ACTOR
          Constant
static int SUPPORTING_ACTOR
          Constant
static int SYSTEM_UNDER_DESIGN
          Constant
 
Method Summary
static Actor create(Entity entity, UseCase useCase, int role)
          Creates actor of the chosen type belonging to selected use case.
static int getActorRole(Actor a)
          Returns role of the actor
static void removeActor(Actor actor, UseCase useCase)
          Remove actor from useCase
static void setActorRole(Actor a, int role)
          Sets role to the actor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actorRoleNamesDisplaying

public static final java.lang.String[] actorRoleNamesDisplaying
Names of roles, that will be displayed in the gui. Their values are created from actorRoleNames.


actorRoleNames

protected static final java.lang.String[] actorRoleNames
Constants representating roles.


SYSTEM_UNDER_DESIGN

public static final int SYSTEM_UNDER_DESIGN
Constant

See Also:
Constant Field Values

PRIMARY_ACTOR

public static final int PRIMARY_ACTOR
Constant

See Also:
Constant Field Values

SUPPORTING_ACTOR

public static final int SUPPORTING_ACTOR
Constant

See Also:
Constant Field Values
Method Detail

getActorRole

public static int getActorRole(Actor a)
Returns role of the actor

Parameters:
a - actor role is getted from
Returns:
role

setActorRole

public static void setActorRole(Actor a,
                                int role)
Sets role to the actor.

Parameters:
a - changing actor
role - new role to be set to actor

create

public static Actor create(Entity entity,
                           UseCase useCase,
                           int role)
Creates actor of the chosen type belonging to selected use case. Use case is then registered to SuD entity of the use case.

Parameters:
entity - entity - SuD of the use case
useCase - use case actor will belong to
role - role for new actor
Returns:
newly created actor.

removeActor

public static void removeActor(Actor actor,
                               UseCase useCase)
Remove actor from useCase

Parameters:
actor - actor to be removed
useCase - use case actors belongs to