org.argouml.model.uml.behavioralelements.usecases
Class UseCasesFactory

java.lang.Object
  |
  +--org.argouml.model.uml.AbstractUmlModelFactory
        |
        +--org.argouml.model.uml.behavioralelements.usecases.UseCasesFactory

public class UseCasesFactory
extends AbstractUmlModelFactory

Factory to create UML classes for the UML BehaviorialElements::UseCases package.

Since:
ARGO0.11.2

Field Summary
private static UseCasesFactory SINGLETON
          Singleton instance.
 
Fields inherited from class org.argouml.model.uml.AbstractUmlModelFactory
 
Constructor Summary
private UseCasesFactory()
          Don't allow instantiation
 
Method Summary
 MActor buildActor()
          Builds an actor in the project's model namespace.
 MActor buildActor(MNamespace ns)
          Builds an actor in the given namespace.
 MExtend buildExtend(java.lang.Object abase, java.lang.Object anextension)
          Build an extend relationship.
 MExtend buildExtend(java.lang.Object abase, java.lang.Object anextension, java.lang.Object apoint)
           
 MExtensionPoint buildExtensionPoint(java.lang.Object modelElement)
          Build an extension point for a use case.
 MInclude buildInclude(java.lang.Object abase, java.lang.Object anaddition)
          Build an include relationship.
 MActor createActor()
          Create an empty but initialized instance of a Actor.
 MExtend createExtend()
          Create an empty but initialized instance of a Extend.
 MExtensionPoint createExtensionPoint()
          Create an empty but initialized instance of a ExtensionPoint.
 MInclude createInclude()
          Create an empty but initialized instance of a Include.
 MUseCase createUseCase()
          Create an empty but initialized instance of a UseCase.
 MUseCaseInstance createUseCaseInstance()
          Create an empty but initialized instance of a UseCaseInstance
 void deleteActor(MActor elem)
           
 void deleteExtend(MExtend elem)
           
 void deleteExtensionPoint(MExtensionPoint elem)
           
 void deleteInclude(MInclude elem)
           
 void deleteUseCase(MUseCase elem)
           
 void deleteUseCaseInstance(MUseCaseInstance elem)
           
static UseCasesFactory getFactory()
          Singleton instance access method.
 
Methods inherited from class org.argouml.model.uml.AbstractUmlModelFactory
addListenersToModelElement, initialize, isGuiEnabled, setGuiEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SINGLETON

private static UseCasesFactory SINGLETON
Singleton instance.

Constructor Detail

UseCasesFactory

private UseCasesFactory()
Don't allow instantiation

Method Detail

getFactory

public static UseCasesFactory getFactory()
Singleton instance access method.


createExtend

public MExtend createExtend()
Create an empty but initialized instance of a Extend.

Returns:
an initialized Extend instance.

createExtensionPoint

public MExtensionPoint createExtensionPoint()
Create an empty but initialized instance of a ExtensionPoint.

Returns:
an initialized ExtensionPoint instance.

createActor

public MActor createActor()
Create an empty but initialized instance of a Actor.

Returns:
an initialized Actor instance.

createInclude

public MInclude createInclude()
Create an empty but initialized instance of a Include.

Returns:
an initialized Include instance.

createUseCase

public MUseCase createUseCase()
Create an empty but initialized instance of a UseCase.

Returns:
an initialized UseCase instance.

createUseCaseInstance

public MUseCaseInstance createUseCaseInstance()
Create an empty but initialized instance of a UseCaseInstance

Returns:
an initialized UseCaseInstance instance.

buildExtend

public MExtend buildExtend(java.lang.Object abase,
                           java.lang.Object anextension)
Build an extend relationship.

Set the namespace to the base (preferred) or else extension's namespace. We don't do any checking on base and extension. They should be different, but that is someone else's problem.

Parameters:
abase - The base use case for the relationship
anextension - The extension use case for the relationship
Returns:
The new extend relationship or null if it can't be created.

buildExtend

public MExtend buildExtend(java.lang.Object abase,
                           java.lang.Object anextension,
                           java.lang.Object apoint)

buildExtensionPoint

public MExtensionPoint buildExtensionPoint(java.lang.Object modelElement)
Build an extension point for a use case.

Set the namespace to that of the use case if possible.

Parameters:
modelElement - The owning use case for the extension point. May be null.
Returns:
The new extension point or null if it can't be created.

buildInclude

public MInclude buildInclude(java.lang.Object abase,
                             java.lang.Object anaddition)
Build an include relationship.

Set the namespace to the base (preferred) or else extension's namespace. We don't do any checking on base and extension. They should be different, but that is someone else's problem.

Note. There is a bug in NSUML that gets the base and addition associations back to front. We reverse the use of their accessors in the code to correct this.

Parameters:
abase - The base use case for the relationship
anaddition - The extension use case for the relationship
Returns:
The new include relationship or null if it can't be created.

buildActor

public MActor buildActor()
Builds an actor in the project's model namespace.

Returns:
MActor

buildActor

public MActor buildActor(MNamespace ns)
Builds an actor in the given namespace.

Parameters:
ns -
Returns:
MActor

deleteActor

public void deleteActor(MActor elem)

deleteExtend

public void deleteExtend(MExtend elem)

deleteExtensionPoint

public void deleteExtensionPoint(MExtensionPoint elem)

deleteInclude

public void deleteInclude(MInclude elem)

deleteUseCase

public void deleteUseCase(MUseCase elem)

deleteUseCaseInstance

public void deleteUseCaseInstance(MUseCaseInstance elem)


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