/** * @see org.andromda.metafacades.uml.FrontEndUseCase#getReferencingFinalStates() */ @Override protected List<FinalStateFacade> handleGetReferencingFinalStates() { return new ArrayList<FinalStateFacade>(this.getModel().findFinalStatesWithNameOrHyperlink(this)); }
/** * @see org.andromda.metafacades.uml.FrontEndUseCase#getViews() */ @Override protected List<ActionStateFacade> handleGetViews() { // TODO: Return type FrontEndView, instead of ActionStateFacade final List views = new ArrayList<ActionStateFacade>(); final ActivityGraphFacade graph = this.getActivityGraph(); if (graph != null) { views.addAll(this.getModel().getAllActionStatesWithStereotype( graph, UMLProfile.STEREOTYPE_FRONT_END_VIEW)); } return views; }
/** * @see org.andromda.metafacades.uml14.ManageableEntityLogic#handleGetAllManageables() */ protected List<ClassifierFacade> handleGetAllManageables() { final Set<ClassifierFacade> allManageableEntities = new TreeSet(new ManageableComparator()); final Collection<ClassifierFacade> allClasses = getModel().getAllClasses(); for (final Iterator<ClassifierFacade> classIterator = allClasses.iterator(); classIterator.hasNext();) { final ClassifierFacade classObject = classIterator.next(); if (classObject instanceof ManageableEntity) { allManageableEntities.add(classObject); } } return new ArrayList<ClassifierFacade>(allManageableEntities); }
/** * @see org.andromda.metafacades.uml.FrontEndUseCase#getAllUseCases() */ @Override protected List<FrontEndUseCase> handleGetAllUseCases() { final List<FrontEndUseCase> useCases = new ArrayList<FrontEndUseCase>(); for (UseCaseFacade useCase : this.getModel().getAllUseCases()) { if (useCase instanceof FrontEndUseCase) { useCases.add((FrontEndUseCase)useCase); } } return useCases; }
/** * Retrieves the usecase that owns this activity. * * @see org.andromda.metafacades.uml14.ActivityGraphFacadeLogic#handleGetUseCase() */ protected Object handleGetUseCase() { Object useCase = super.handleGetUseCase(); if (useCase == null) { useCase = getModel().findUseCaseWithTaggedValueOrHyperlink(UMLProfile.TAGGEDVALUE_PRESENTATION_USECASE_ACTIVITY, getName()); } return useCase; }
if (StringUtils.isNotBlank(name)) final UseCaseFacade useCase = getModel().findUseCaseByName(name); if (useCase instanceof FrontEndUseCase)
/** * @see org.andromda.metafacades.uml.FrontEndUseCase#getActivityGraph() */ @Override protected ActivityGraphFacade handleGetActivityGraph() { ActivityGraphFacade activityGraph = null; // - in case there is a tagged value pointing to an activity graph, and this graph is found, // return it. final Object activity = this.findTaggedValue(UMLProfile.TAGGEDVALUE_PRESENTATION_USECASE_ACTIVITY); if (activity != null) { final String activityName = String.valueOf(activity.toString()); activityGraph = this.getModel().findActivityGraphByName(activityName); } // - otherwise just take the first one in this use-case's namespace. if (activityGraph == null) { final Collection<ModelElementFacade> ownedElements = this.getOwnedElements(); for (final Iterator<ModelElementFacade> iterator = ownedElements.iterator(); iterator.hasNext();) { final Object object = iterator.next(); if (object instanceof FrontEndActivityGraph) { return (ActivityGraphFacade)object; } } } return activityGraph; }
/** * @see org.andromda.metafacades.uml.FrontEndController#getUseCase() */ @Override protected UseCaseFacade handleGetUseCase() { UseCaseFacade useCase = null; final StateMachineFacade graphContext = this.getStateMachineContext(); if (graphContext instanceof FrontEndActivityGraph) { useCase = ((ActivityGraphFacade)graphContext).getUseCase(); } else { final Object useCaseTaggedValue = findTaggedValue( UMLProfile.TAGGEDVALUE_PRESENTATION_CONTROLLER_USECASE); if (useCaseTaggedValue != null) { final String tag = useCaseTaggedValue.toString(); // - return the first use-case with this name useCase = this.getModel().findUseCaseWithNameAndStereotype( tag, UMLProfile.STEREOTYPE_FRONT_END_USECASE); } } return useCase; }
controller = this.getModel().findClassWithTaggedValueOrHyperlink( UMLProfile.TAGGEDVALUE_PRESENTATION_CONTROLLER_USECASE, useCaseName);
/** * @see org.andromda.metafacades.uml.FrontEndUseCase#getAllUseCases() */ @Override protected List handleGetAllUseCases() { final List useCases = new ArrayList(); for (final Iterator useCaseIterator = getModel().getAllUseCases().iterator(); useCaseIterator.hasNext();) { final Object object = useCaseIterator.next(); if (object instanceof FrontEndUseCase) { useCases.add(object); } } return useCases; }
/** * Retrieves the usecase that owns this activity. * * @see org.andromda.metafacades.emf.uml22.ActivityGraphFacadeLogic#handleGetUseCase() */ @Override protected UseCase handleGetUseCase() { UseCase useCase = super.handleGetUseCase(); if (useCase == null) { useCase = (UseCase) this.getModel().findUseCaseWithTaggedValueOrHyperlink( UMLProfile.TAGGEDVALUE_PRESENTATION_USECASE_ACTIVITY, this.handleGetName()); } return useCase; }
if (StringUtils.isNotBlank(name)) final UseCaseFacade useCase = this.getModel().findUseCaseByName(name); if (useCase instanceof FrontEndUseCase)
/** * @see org.andromda.metafacades.uml.FrontEndUseCase#getReferencingFinalStates() */ @Override protected List handleGetReferencingFinalStates() { return new ArrayList(this.getModel().findFinalStatesWithNameOrHyperlink(this)); }
/** * @see org.andromda.metafacades.uml.FrontEndUseCase#getAllUseCases() */ @Override protected List<FrontEndUseCase> handleGetAllUseCases() { final List<FrontEndUseCase> useCases = new ArrayList<FrontEndUseCase>(); for (UseCaseFacade useCase : this.getModel().getAllUseCases()) { if (useCase instanceof FrontEndUseCase) { useCases.add((FrontEndUseCase)useCase); } } return useCases; }
/** * @see org.andromda.metafacades.emf.uml22.ManageableEntityLogic#handleGetAllManageables() */ @Override protected List<ManageableEntity> handleGetAllManageables() { final Set<ManageableEntity> allManageableEntities = new TreeSet<ManageableEntity>(new ManageableComparator()); final Collection<ClassifierFacade> allClasses = this.getModel().getAllClasses(); for (final Iterator<ClassifierFacade> classIterator = allClasses.iterator(); classIterator.hasNext();) { final Object classObject = classIterator.next(); if (classObject instanceof ManageableEntity) { allManageableEntities.add((ManageableEntity)classObject); } } return new ArrayList<ManageableEntity>(allManageableEntities); }
/** * Retrieves the usecase that owns this activity. * * @see org.andromda.metafacades.emf.uml22.ActivityGraphFacadeLogic#handleGetUseCase() */ @Override protected UseCase handleGetUseCase() { UseCase useCase = super.handleGetUseCase(); if (useCase == null) { useCase = (UseCase) this.getModel().findUseCaseWithTaggedValueOrHyperlink( UMLProfile.TAGGEDVALUE_PRESENTATION_USECASE_ACTIVITY, this.handleGetName()); } return useCase; }
/** * @see org.andromda.metafacades.uml.FrontEndUseCase#getViews() */ @Override protected List<ActionStateFacade> handleGetViews() { // TODO: Return type FrontEndView, instead of ActionStateFacade final List views = new ArrayList<ActionStateFacade>(); final ActivityGraphFacade graph = this.getActivityGraph(); if (graph != null) { views.addAll(this.getModel().getAllActionStatesWithStereotype( graph, UMLProfile.STEREOTYPE_FRONT_END_VIEW)); } return views; }
if (StringUtils.isNotBlank(name)) final UseCaseFacade useCase = this.getModel().findUseCaseByName(name); if (useCase instanceof FrontEndUseCase)
/** * @see org.andromda.metafacades.uml.FrontEndUseCase#getReferencingFinalStates() */ @Override protected List<FinalStateFacade> handleGetReferencingFinalStates() { return new ArrayList<FinalStateFacade>(this.getModel().findFinalStatesWithNameOrHyperlink(this)); }
/** * @see org.andromda.metafacades.emf.uml22.ManageableEntityLogic#handleGetAllManageables() */ @Override protected List<ManageableEntity> handleGetAllManageables() { final Set<ManageableEntity> allManageableEntities = new TreeSet<ManageableEntity>(new ManageableComparator()); final Collection<ClassifierFacade> allClasses = this.getModel().getAllClasses(); for (final Iterator<ClassifierFacade> classIterator = allClasses.iterator(); classIterator.hasNext();) { final Object classObject = classIterator.next(); if (classObject instanceof ManageableEntity) { allManageableEntities.add((ManageableEntity)classObject); } } return new ArrayList<ManageableEntity>(allManageableEntities); }