|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
ucot.input.UseCaseCollection
public class UseCaseCollection
Collection of usecases. Handles finds and merges for them.
Field Summary | |
---|---|
protected static java.lang.String |
CANNOT_LOAD_USE_CASES_ERROR
|
private java.util.Vector<UseCase> |
useCases
|
Constructor Summary | |
---|---|
UseCaseCollection()
|
Method Summary | |
---|---|
boolean |
addUseCase(UseCase usecase)
Add usecase to collection and notify observers |
boolean |
addUseCase(UseCase usecase,
boolean notify)
Add usecase to collection and notify observers |
void |
clear()
Clears loaded usecases. |
boolean |
exists(UseCase usecase)
Checks if given UseCase exists in this collection |
UseCase |
find(java.lang.String id)
Finds usecase that has the given id |
java.util.List<java.net.URL> |
getURLs()
Returns list of source URLs |
UseCase |
getUseCase(int index)
Returns UseCase from index |
int |
getUseCaseCount()
Returns the count of use cases inside this collection. |
java.util.List<UseCase> |
getUseCasesFromURL(java.net.URL url)
Returns list of usecases from source described in url. |
void |
markAllUnanalyzed()
Marks all usecases within this collection as unanalyzed |
private void |
markAllUnanalyzed(UseCase usecase)
Marks given usecase and it's sub usecases as unanalyzed |
void |
merge(UseCaseCollection collection)
Merges given UseCaseCollection to this |
void |
remove(int index)
Removes usecase with given index |
void |
removeAllSubUseCase()
Removes all usecases that have been marked as subusecase |
void |
removeFromUrl(java.net.URL url)
Removes all usecases that are loaded from given url |
void |
resolveSubUseCases(boolean markAsSubUseCases)
Resolves step and sub-usecase relations, removes sub-usecases from usecasecollection and stores their reference to the corresponding usecase step |
java.lang.String |
toString()
Stores all usecases within this collection to a string and returns it |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static java.lang.String CANNOT_LOAD_USE_CASES_ERROR
private java.util.Vector<UseCase> useCases
Constructor Detail |
---|
public UseCaseCollection()
Method Detail |
---|
public void merge(UseCaseCollection collection) throws CannotLoadUseCasesException
collection
- UseCaseCollection to merge
CannotLoadUseCasesException
public boolean exists(UseCase usecase)
usecase
- UseCase to test
public int getUseCaseCount()
public boolean addUseCase(UseCase usecase)
usecase
- UseCase to add
public boolean addUseCase(UseCase usecase, boolean notify)
usecase
- UseCase to addnotify
- should we notifyobservers and set usecase as changed
public UseCase find(java.lang.String id)
id
- id to find
public UseCase getUseCase(int index)
index
-
public void removeFromUrl(java.net.URL url)
url
- usecases that are loaded from this url are removedpublic java.util.List<java.net.URL> getURLs()
public java.util.List<UseCase> getUseCasesFromURL(java.net.URL url)
url
-
public void clear()
public void remove(int index)
index
- index of the usecase to removepublic void removeAllSubUseCase()
public void markAllUnanalyzed()
private void markAllUnanalyzed(UseCase usecase)
usecase
- usecase to be markedpublic java.lang.String toString()
toString
in class java.lang.Object
public void resolveSubUseCases(boolean markAsSubUseCases)
markAsSubUseCases
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |