org.argouml.model.uml
Class UseCasesHelperImpl

java.lang.Object
  extended byorg.argouml.model.uml.UseCasesHelperImpl
All Implemented Interfaces:
org.argouml.model.UseCasesHelper

class UseCasesHelperImpl
extends Object
implements org.argouml.model.UseCasesHelper

Helper class for UML BehavioralElements::UseCases Package. Current implementation is a placeholder.

Since:
ARGO0.11.2

Field Summary
private  NSUMLModelImplementation nsmodel
          The model implementation.
 
Constructor Summary
(package private) UseCasesHelperImpl(NSUMLModelImplementation implementation)
          Don't allow instantiation.
 
Method Summary
 void addExtend(Object elem, Object extend)
          Add an extend to a Use Case or Extension Point.
 void addExtensionPoint(Object handle, Object extensionPoint)
          Adds an extension point to some model element.
 void addInclude(Object usecase, Object include)
          Add an include to a Use Case.
 Collection getAllActors(Object ns)
          Returns all actors in some namespace ns.
 Collection getAllUseCases(Object ns)
          Returns all usecases in some namespace ns.
 Collection getExtendedUseCases(Object ausecase)
          Returns all usecases this given usecase extends.
 Collection getExtendingUseCases(Object usecase)
           
 Object getExtends(Object abase, Object anextension)
          Returns the extend relation between two usecases base and extension.
 Collection getExtensionPoints(Object useCase)
          This method returns all extension points of a given use case.
 Collection getIncludedUseCases(Object ausecase)
          Returns all usecases this usecase includes.
 Object getIncludes(Object abase, Object aninclusion)
          Returns the include relation between two usecases base and inclusion.
 Collection getSpecificationPath(Object ausecase)
          Returns the specificationpath operation of some usecase.
 void removeExtend(Object elem, Object extend)
          Remove an extend to a Use Case or Extension Point.
 void removeExtensionPoint(Object elem, Object ep)
          This method removes an Extension Point from a Use Case or an Extend.
 void removeInclude(Object usecase, Object include)
          Remove an include from a Use Case.
 void setAddition(Object handle, Object useCase)
          Sets the addition to an include.
 void setBase(Object extend, Object base)
          Sets the base usecase of a given extend.
 void setCondition(Object handle, Object booleanExpression)
          Set the condition of an extend.
 void setExtension(Object handle, Object ext)
          Set the extension of a usecase.
 void setExtensionPoints(Object handle, Collection extensionPoints)
          Sets the extension points of some use cases.
 void setIncludes(Object handle, Collection includes)
          Set the collection of Include relationships for a usecase.
 void setLocation(Object handle, String loc)
          Sets a location of some extension point.
 void setUseCase(Object elem, Object usecase)
          Set a Use Case for an Extension Point.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nsmodel

private NSUMLModelImplementation nsmodel
The model implementation.

Constructor Detail

UseCasesHelperImpl

UseCasesHelperImpl(NSUMLModelImplementation implementation)
Don't allow instantiation.

Parameters:
implementation - To get other helpers and factories.
Method Detail

getExtensionPoints

public Collection getExtensionPoints(Object useCase)
This method returns all extension points of a given use case.

Here for completeness, but actually just a wrapper for the NSUML function.

Specified by:
getExtensionPoints in interface org.argouml.model.UseCasesHelper
Parameters:
useCase - The use case for which we want the extension points.
Returns:
A collection of the extension points.

getAllUseCases

public Collection getAllUseCases(Object ns)
Returns all usecases in some namespace ns.

Specified by:
getAllUseCases in interface org.argouml.model.UseCasesHelper
Parameters:
ns - is the namespace
Returns:
Collection

getAllActors

public Collection getAllActors(Object ns)
Returns all actors in some namespace ns.

Specified by:
getAllActors in interface org.argouml.model.UseCasesHelper
Parameters:
ns - is the namespace
Returns:
Collection

getExtendedUseCases

public Collection getExtendedUseCases(Object ausecase)
Returns all usecases this given usecase extends.

Specified by:
getExtendedUseCases in interface org.argouml.model.UseCasesHelper
Parameters:
ausecase - the given usecase
Returns:
Collection all usecases this given usecase extends

getExtendingUseCases

public Collection getExtendingUseCases(Object usecase)
Specified by:
getExtendingUseCases in interface org.argouml.model.UseCasesHelper
Parameters:
usecase - the given usecase
Returns:
Collection all usecases that extend the given usecase

getExtends

public Object getExtends(Object abase,
                         Object anextension)
Returns the extend relation between two usecases base and extension. If there is none null is returned.

Specified by:
getExtends in interface org.argouml.model.UseCasesHelper
Parameters:
abase - the given base usecase
anextension - the given extension usecase
Returns:
MExtend the extend relation

getIncludedUseCases

public Collection getIncludedUseCases(Object ausecase)
Returns all usecases this usecase includes.

Specified by:
getIncludedUseCases in interface org.argouml.model.UseCasesHelper
Parameters:
ausecase - the given usecase
Returns:
Collection all usecases the given usecase includes

getIncludes

public Object getIncludes(Object abase,
                          Object aninclusion)
Returns the include relation between two usecases base and inclusion. If there is none null is returned.

Specified by:
getIncludes in interface org.argouml.model.UseCasesHelper
Parameters:
abase - the given base usecase
aninclusion - the given inclusion usecase
Returns:
MExtend the include relation

getSpecificationPath

public Collection getSpecificationPath(Object ausecase)
Returns the specificationpath operation of some usecase. See section 2.11.3.5 of the UML 1.3 spec for a definition.

Specified by:
getSpecificationPath in interface org.argouml.model.UseCasesHelper
Parameters:
ausecase - the given usecase
Returns:
Collection the specificationpath operation of the given usecase

setBase

public void setBase(Object extend,
                    Object base)
Sets the base usecase of a given extend. Updates the extensionpoints of the extend too.

Specified by:
setBase in interface org.argouml.model.UseCasesHelper
Parameters:
extend - the given extend
base - the base usecase

removeExtend

public void removeExtend(Object elem,
                         Object extend)
Remove an extend to a Use Case or Extension Point.

Specified by:
removeExtend in interface org.argouml.model.UseCasesHelper
Parameters:
elem - The Use Case or Extension Point.
extend - The Extend to add.

removeExtensionPoint

public void removeExtensionPoint(Object elem,
                                 Object ep)
This method removes an Extension Point from a Use Case or an Extend.

Specified by:
removeExtensionPoint in interface org.argouml.model.UseCasesHelper
Parameters:
elem - is The Use Case or Extend.
ep - is the extension point

removeInclude

public void removeInclude(Object usecase,
                          Object include)
Remove an include from a Use Case.

Specified by:
removeInclude in interface org.argouml.model.UseCasesHelper
Parameters:
usecase - The Use Case.
include - The Include.

addExtend

public void addExtend(Object elem,
                      Object extend)
Add an extend to a Use Case or Extension Point.

Specified by:
addExtend in interface org.argouml.model.UseCasesHelper
Parameters:
elem - The Use Case or Extension Point.
extend - The Extend to add.

addExtensionPoint

public void addExtensionPoint(Object handle,
                              Object extensionPoint)
Adds an extension point to some model element.

Specified by:
addExtensionPoint in interface org.argouml.model.UseCasesHelper
Parameters:
handle - is the model element
extensionPoint - is the extension point

addInclude

public void addInclude(Object usecase,
                       Object include)
Add an include to a Use Case.

Specified by:
addInclude in interface org.argouml.model.UseCasesHelper
Parameters:
usecase - The Use Case.
include - The Include.

setAddition

public void setAddition(Object handle,
                        Object useCase)
Sets the addition to an include. There is a bug in NSUML that reverses additions and bases for includes.

Specified by:
setAddition in interface org.argouml.model.UseCasesHelper
Parameters:
handle - Include
useCase - UseCase

setCondition

public void setCondition(Object handle,
                         Object booleanExpression)
Set the condition of an extend.

Specified by:
setCondition in interface org.argouml.model.UseCasesHelper
Parameters:
handle - is the extend
booleanExpression - is the condition

setExtension

public void setExtension(Object handle,
                         Object ext)
Set the extension of a usecase.

Specified by:
setExtension in interface org.argouml.model.UseCasesHelper
Parameters:
handle - Extend
ext - UseCase or null

setExtensionPoints

public void setExtensionPoints(Object handle,
                               Collection extensionPoints)
Sets the extension points of some use cases.

Specified by:
setExtensionPoints in interface org.argouml.model.UseCasesHelper
Parameters:
handle - the use case
extensionPoints - is the extension points

setIncludes

public void setIncludes(Object handle,
                        Collection includes)
Set the collection of Include relationships for a usecase.

Specified by:
setIncludes in interface org.argouml.model.UseCasesHelper
Parameters:
handle - UseCase
includes - the collection of Include relationships

setLocation

public void setLocation(Object handle,
                        String loc)
Sets a location of some extension point.

Specified by:
setLocation in interface org.argouml.model.UseCasesHelper
Parameters:
handle - is the extension point
loc - is the location

setUseCase

public void setUseCase(Object elem,
                       Object usecase)
Set a Use Case for an Extension Point.

Specified by:
setUseCase in interface org.argouml.model.UseCasesHelper
Parameters:
elem - The Extension Point.
usecase - The Use Case.


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook