01: package org.andromda.metafacades.uml14;
02:
03: import java.util.ArrayList;
04: import java.util.Collection;
05: import java.util.Iterator;
06: import java.util.List;
07:
08: import org.andromda.metafacades.uml.FrontEndController;
09: import org.andromda.metafacades.uml.FrontEndUseCase;
10:
11: /**
12: * MetafacadeLogic implementation for org.andromda.metafacades.uml.FrontEndPackage.
13: *
14: * @see org.andromda.metafacades.uml.FrontEndPackage
15: */
16: public class FrontEndPackageLogicImpl extends FrontEndPackageLogic {
17:
18: public FrontEndPackageLogicImpl(Object metaObject, String context) {
19: super (metaObject, context);
20: }
21:
22: /**
23: * @see org.andromda.metafacades.uml.FrontEndPackage#getFrontEndUseCases()
24: */
25: protected java.util.List handleGetFrontEndUseCases() {
26: final List useCases = new ArrayList();
27: final Collection ownedElements = getOwnedElements();
28: for (final Iterator elementIterator = ownedElements.iterator(); elementIterator
29: .hasNext();) {
30: final Object object = elementIterator.next();
31: if (object instanceof FrontEndUseCase) {
32: useCases.add(object);
33: }
34: }
35: return useCases;
36: }
37:
38: /**
39: * @see org.andromda.metafacades.uml.FrontEndPackage#getFrontEndControllers()
40: */
41: protected java.util.List handleGetFrontEndControllers() {
42: final List useCases = new ArrayList();
43: final Collection ownedElements = getOwnedElements();
44: for (final Iterator elementIterator = ownedElements.iterator(); elementIterator
45: .hasNext();) {
46: final Object object = elementIterator.next();
47: if (object instanceof FrontEndController) {
48: useCases.add(object);
49: }
50: }
51: return useCases;
52: }
53:
54: }
|