All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.uml2.uml.UseCase Maven / Gradle / Ivy

/*
 * Copyright (c) 2005, 2014 IBM Corporation, CEA, and others.
 * All rights reserved.   This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *   IBM - initial API and implementation
 *   Kenn Hussey (CEA) - 327039, 418466
 *   Christian W. Damus (CEA) - 251963
 *
 */
package org.eclipse.uml2.uml;

import java.util.Map;

import org.eclipse.emf.common.util.DiagnosticChain;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;

/**
 * 
 * A representation of the model object 'Use Case'.
 * 
 *
 * 
 * A UseCase specifies a set of actions performed by its subjects, which yields an observable result that is of value for one or more Actors or other stakeholders of each subject.
 * 

From package UML::UseCases.

* * *

* The following features are supported: *

    *
  • {@link org.eclipse.uml2.uml.UseCase#getExtends Extend}
  • *
  • {@link org.eclipse.uml2.uml.UseCase#getExtensionPoints Extension Point}
  • *
  • {@link org.eclipse.uml2.uml.UseCase#getIncludes Include}
  • *
  • {@link org.eclipse.uml2.uml.UseCase#getSubjects Subject}
  • *
*

* * @see org.eclipse.uml2.uml.UMLPackage#getUseCase() * @model * @generated */ public interface UseCase extends BehavioredClassifier { /** * Returns the value of the 'Include' containment reference list. * The list contents are of type {@link org.eclipse.uml2.uml.Include}. * It is bidirectional and its opposite is '{@link org.eclipse.uml2.uml.Include#getIncludingCase Including Case}'. *

* This feature subsets the following features: *

    *
  • '{@link org.eclipse.uml2.uml.Namespace#getOwnedMembers() Owned Member}'
  • *
*

* * * * The Include relationships owned by this UseCase. *

From package UML::UseCases.

* * @return the value of the 'Include' containment reference list. * @see org.eclipse.uml2.uml.UMLPackage#getUseCase_Include() * @see org.eclipse.uml2.uml.Include#getIncludingCase * @model opposite="includingCase" containment="true" resolveProxies="true" ordered="false" * @generated */ EList getIncludes(); /** * Creates a new {@link org.eclipse.uml2.uml.Include}, with the specified 'Name', and 'Addition', and appends it to the 'Include' containment reference list. * * * @param name The 'Name' for the new {@link org.eclipse.uml2.uml.Include}, or null. * @param addition The 'Addition' for the new {@link org.eclipse.uml2.uml.Include}, or null. * @return The new {@link org.eclipse.uml2.uml.Include}. * @see #getIncludes() * @generated */ Include createInclude(String name, UseCase addition); /** * Retrieves the first {@link org.eclipse.uml2.uml.Include} with the specified 'Name', and 'Addition' from the 'Include' containment reference list. * * * @param name The 'Name' of the {@link org.eclipse.uml2.uml.Include} to retrieve, or null. * @param addition The 'Addition' of the {@link org.eclipse.uml2.uml.Include} to retrieve, or null. * @return The first {@link org.eclipse.uml2.uml.Include} with the specified 'Name', and 'Addition', or null. * @see #getIncludes() * @generated */ Include getInclude(String name, UseCase addition); /** * Retrieves the first {@link org.eclipse.uml2.uml.Include} with the specified 'Name', and 'Addition' from the 'Include' containment reference list. * * * @param name The 'Name' of the {@link org.eclipse.uml2.uml.Include} to retrieve, or null. * @param addition The 'Addition' of the {@link org.eclipse.uml2.uml.Include} to retrieve, or null. * @param ignoreCase Whether to ignore case in {@link java.lang.String} comparisons. * @param createOnDemand Whether to create a {@link org.eclipse.uml2.uml.Include} on demand if not found. * @return The first {@link org.eclipse.uml2.uml.Include} with the specified 'Name', and 'Addition', or null. * @see #getIncludes() * @generated */ Include getInclude(String name, UseCase addition, boolean ignoreCase, boolean createOnDemand); /** * Returns the value of the 'Extend' containment reference list. * The list contents are of type {@link org.eclipse.uml2.uml.Extend}. * It is bidirectional and its opposite is '{@link org.eclipse.uml2.uml.Extend#getExtension Extension}'. *

* This feature subsets the following features: *

    *
  • '{@link org.eclipse.uml2.uml.Namespace#getOwnedMembers() Owned Member}'
  • *
*

* * * * The Extend relationships owned by this UseCase. *

From package UML::UseCases.

* * @return the value of the 'Extend' containment reference list. * @see org.eclipse.uml2.uml.UMLPackage#getUseCase_Extend() * @see org.eclipse.uml2.uml.Extend#getExtension * @model opposite="extension" containment="true" resolveProxies="true" ordered="false" * @generated */ EList getExtends(); /** * Creates a new {@link org.eclipse.uml2.uml.Extend}, with the specified 'Name', and 'Extended Case', and appends it to the 'Extend' containment reference list. * * * @param name The 'Name' for the new {@link org.eclipse.uml2.uml.Extend}, or null. * @param extendedCase The 'Extended Case' for the new {@link org.eclipse.uml2.uml.Extend}, or null. * @return The new {@link org.eclipse.uml2.uml.Extend}. * @see #getExtends() * @generated */ Extend createExtend(String name, UseCase extendedCase); /** * Retrieves the first {@link org.eclipse.uml2.uml.Extend} with the specified 'Name', and 'Extended Case' from the 'Extend' containment reference list. * * * @param name The 'Name' of the {@link org.eclipse.uml2.uml.Extend} to retrieve, or null. * @param extendedCase The 'Extended Case' of the {@link org.eclipse.uml2.uml.Extend} to retrieve, or null. * @return The first {@link org.eclipse.uml2.uml.Extend} with the specified 'Name', and 'Extended Case', or null. * @see #getExtends() * @generated */ Extend getExtend(String name, UseCase extendedCase); /** * Retrieves the first {@link org.eclipse.uml2.uml.Extend} with the specified 'Name', and 'Extended Case' from the 'Extend' containment reference list. * * * @param name The 'Name' of the {@link org.eclipse.uml2.uml.Extend} to retrieve, or null. * @param extendedCase The 'Extended Case' of the {@link org.eclipse.uml2.uml.Extend} to retrieve, or null. * @param ignoreCase Whether to ignore case in {@link java.lang.String} comparisons. * @param createOnDemand Whether to create a {@link org.eclipse.uml2.uml.Extend} on demand if not found. * @return The first {@link org.eclipse.uml2.uml.Extend} with the specified 'Name', and 'Extended Case', or null. * @see #getExtends() * @generated */ Extend getExtend(String name, UseCase extendedCase, boolean ignoreCase, boolean createOnDemand); /** * Returns the value of the 'Extension Point' containment reference list. * The list contents are of type {@link org.eclipse.uml2.uml.ExtensionPoint}. * It is bidirectional and its opposite is '{@link org.eclipse.uml2.uml.ExtensionPoint#getUseCase Use Case}'. *

* This feature subsets the following features: *

    *
  • '{@link org.eclipse.uml2.uml.Namespace#getOwnedMembers() Owned Member}'
  • *
*

* * * * The ExtensionPoints owned by this UseCase. *

From package UML::UseCases.

* * @return the value of the 'Extension Point' containment reference list. * @see org.eclipse.uml2.uml.UMLPackage#getUseCase_ExtensionPoint() * @see org.eclipse.uml2.uml.ExtensionPoint#getUseCase * @model opposite="useCase" containment="true" resolveProxies="true" ordered="false" * @generated */ EList getExtensionPoints(); /** * Creates a new {@link org.eclipse.uml2.uml.ExtensionPoint}, with the specified 'Name', and appends it to the 'Extension Point' containment reference list. * * * @param name The 'Name' for the new {@link org.eclipse.uml2.uml.ExtensionPoint}, or null. * @return The new {@link org.eclipse.uml2.uml.ExtensionPoint}. * @see #getExtensionPoints() * @generated */ ExtensionPoint createExtensionPoint(String name); /** * Retrieves the first {@link org.eclipse.uml2.uml.ExtensionPoint} with the specified 'Name' from the 'Extension Point' containment reference list. * * * @param name The 'Name' of the {@link org.eclipse.uml2.uml.ExtensionPoint} to retrieve, or null. * @return The first {@link org.eclipse.uml2.uml.ExtensionPoint} with the specified 'Name', or null. * @see #getExtensionPoints() * @generated */ ExtensionPoint getExtensionPoint(String name); /** * Retrieves the first {@link org.eclipse.uml2.uml.ExtensionPoint} with the specified 'Name' from the 'Extension Point' containment reference list. * * * @param name The 'Name' of the {@link org.eclipse.uml2.uml.ExtensionPoint} to retrieve, or null. * @param ignoreCase Whether to ignore case in {@link java.lang.String} comparisons. * @param createOnDemand Whether to create a {@link org.eclipse.uml2.uml.ExtensionPoint} on demand if not found. * @return The first {@link org.eclipse.uml2.uml.ExtensionPoint} with the specified 'Name', or null. * @see #getExtensionPoints() * @generated */ ExtensionPoint getExtensionPoint(String name, boolean ignoreCase, boolean createOnDemand); /** * Returns the value of the 'Subject' reference list. * The list contents are of type {@link org.eclipse.uml2.uml.Classifier}. * It is bidirectional and its opposite is '{@link org.eclipse.uml2.uml.Classifier#getUseCases Use Case}'. * * * * The subjects to which this UseCase applies. Each subject or its parts realize all the UseCases that apply to it. *

From package UML::UseCases.

* * @return the value of the 'Subject' reference list. * @see org.eclipse.uml2.uml.UMLPackage#getUseCase_Subject() * @see org.eclipse.uml2.uml.Classifier#getUseCases * @model opposite="useCase" ordered="false" * @generated */ EList getSubjects(); /** * Retrieves the first {@link org.eclipse.uml2.uml.Classifier} with the specified 'Name' from the 'Subject' reference list. * * * @param name The 'Name' of the {@link org.eclipse.uml2.uml.Classifier} to retrieve, or null. * @return The first {@link org.eclipse.uml2.uml.Classifier} with the specified 'Name', or null. * @see #getSubjects() * @generated */ Classifier getSubject(String name); /** * Retrieves the first {@link org.eclipse.uml2.uml.Classifier} with the specified 'Name' from the 'Subject' reference list. * * * @param name The 'Name' of the {@link org.eclipse.uml2.uml.Classifier} to retrieve, or null. * @param ignoreCase Whether to ignore case in {@link java.lang.String} comparisons. * @param eClass The Ecore class of the {@link org.eclipse.uml2.uml.Classifier} to retrieve, or null. * @return The first {@link org.eclipse.uml2.uml.Classifier} with the specified 'Name', or null. * @see #getSubjects() * @generated */ Classifier getSubject(String name, boolean ignoreCase, EClass eClass); /** * * * * A UseCase must have a name. * name -> notEmpty () * @param diagnostics The chain of diagnostics to which problems are to be appended. * @param context The cache of context-specific information. * * @model * @generated */ boolean validateMustHaveName(DiagnosticChain diagnostics, Map context); /** * * * * UseCases can only be involved in binary Associations. * Association.allInstances()->forAll(a | a.memberEnd.type->includes(self) implies a.memberEnd->size() = 2) * @param diagnostics The chain of diagnostics to which problems are to be appended. * @param context The cache of context-specific information. * * @model * @generated */ boolean validateBinaryAssociations(DiagnosticChain diagnostics, Map context); /** * * * * UseCases cannot have Associations to UseCases specifying the same subject. * Association.allInstances()->forAll(a | a.memberEnd.type->includes(self) implies * ( * let usecases: Set(UseCase) = a.memberEnd.type->select(oclIsKindOf(UseCase))->collect(oclAsType(UseCase))->asSet() in * usecases->size() > 1 implies usecases->collect(subject)->size() > 1 * ) * ) * @param diagnostics The chain of diagnostics to which problems are to be appended. * @param context The cache of context-specific information. * * @model * @generated */ boolean validateNoAssociationToUseCase(DiagnosticChain diagnostics, Map context); /** * * * * A UseCase cannot include UseCases that directly or indirectly include it. * not allIncludedUseCases()->includes(self) * @param diagnostics The chain of diagnostics to which problems are to be appended. * @param context The cache of context-specific information. * * @model * @generated */ boolean validateCannotIncludeSelf(DiagnosticChain diagnostics, Map context); /** * * * * The query allIncludedUseCases() returns the transitive closure of all UseCases (directly or indirectly) included by this UseCase. * result = (self.include.addition->union(self.include.addition->collect(uc | uc.allIncludedUseCases()))->asSet()) *

From package UML::UseCases.

* * @model ordered="false" * @generated */ EList allIncludedUseCases(); } // UseCase




© 2015 - 2025 Weber Informatics LLC | Privacy Policy