1 package org.andromda.metafacades.uml14;
2
3 import java.util.ArrayList;
4 import java.util.Collection;
5 import java.util.Iterator;
6 import java.util.List;
7 import org.andromda.metafacades.uml.FrontEndController;
8 import org.andromda.metafacades.uml.FrontEndUseCase;
9 import org.andromda.metafacades.uml.ModelElementFacade;
10
11
12
13
14
15
16
17 public class FrontEndPackageLogicImpl
18 extends FrontEndPackageLogic
19 {
20 private static final long serialVersionUID = 34L;
21
22
23
24
25 public FrontEndPackageLogicImpl (Object metaObject, String context)
26 {
27 super (metaObject, context);
28 }
29
30
31
32
33 @Override
34 protected List<FrontEndUseCase> handleGetFrontEndUseCases()
35 {
36 final List<FrontEndUseCase> useCases = new ArrayList<FrontEndUseCase>();
37 final Collection<ModelElementFacade> ownedElements = getOwnedElements();
38 for (final Iterator<ModelElementFacade> elementIterator = ownedElements.iterator(); elementIterator.hasNext();)
39 {
40 final Object object = elementIterator.next();
41 if (object instanceof FrontEndUseCase)
42 {
43 useCases.add((FrontEndUseCase)object);
44 }
45 }
46 return useCases;
47 }
48
49
50
51
52 @Override
53 protected List<FrontEndController> handleGetFrontEndControllers()
54 {
55 final List<FrontEndController> useCases = new ArrayList<FrontEndController>();
56 final Collection<ModelElementFacade> ownedElements = getOwnedElements();
57 for (final Iterator<ModelElementFacade> elementIterator = ownedElements.iterator(); elementIterator.hasNext();)
58 {
59 final Object object = elementIterator.next();
60 if (object instanceof FrontEndController)
61 {
62 useCases.add((FrontEndController)object);
63 }
64 }
65 return useCases;
66 }
67
68 }