Package org.enhydra.shark.utilities

Examples of org.enhydra.shark.utilities.SequencedHashMap


    public XMLPanel getPanel(Performer el) {
        Activity act = XMLUtil.getActivity(el);
        int type = act.getActivityType();
        if (type == XPDLConstants.ACTIVITY_TYPE_NO || type == XPDLConstants.ACTIVITY_TYPE_TOOL) {
            SequencedHashMap choices = XMLUtil.getPossibleParticipants(XMLUtil.getWorkflowProcess(el),
                    JaWEManager.getInstance().getXPDLHandler());
            Object choosen = choices.get(el.toValue());
            if (choosen == null) {
                if (!el.toValue().equals("")) {
                    choosen = el.toValue();
                }
            }
            SpecialChoiceElement cc = new SpecialChoiceElement(el,
                    "",
                    new ArrayList(choices.values()),
                    choosen,
                    true,
                    "Id",
                    el.toName(),
                    el.isRequired());
View Full Code Here


        // TODO
        return generateStandardPanel(el);
    }

    public XMLPanel getPanel(Responsible el) {
        SequencedHashMap choices = JaWEManager.getInstance().getXPDLUtils().getPossibleResponsibles((Responsibles) el.getParent(), el);
        Participant choosen = null;
        String pId = el.toValue();
        if (!pId.equals("")) {
            Iterator it = choices.values().iterator();
            while (it.hasNext()) {
                Participant p = (Participant) it.next();
                if (pId.equals(p.getId())) {
                    choosen = p;
                    break;
                }
            }
        }
        if (choosen != null) {
            choices.put(choosen.getId(), choosen);
        }

        SpecialChoiceElement cc = new SpecialChoiceElement(el,
                "",
                new ArrayList(choices.values()),
                choosen,
                false,
                "Id",
                el.toName(),
                el.isRequired());
View Full Code Here

    }

    public XMLPanel getPanel(SubFlow el) {
        Set hidden = getHiddenElements("XMLGroupPanel", el);
        List panelElements = new ArrayList();
        SequencedHashMap choices = XMLUtil.getPossibleSubflowProcesses(el,
                JaWEManager.getInstance().getXPDLHandler());
        Object choosen = choices.get(el.getId());
        if (choosen == null) {
            if (!el.getId().equals("")) {
                choosen = el.getId();
            }
        }
        SpecialChoiceElement cc = new SpecialChoiceElement(el.get("Id"),
                "",
                new ArrayList(choices.values()),
                choosen,
                true,
                "Id",
                "WorkflowProcess",
                true);
View Full Code Here

    }

    public XMLPanel getPanel(Tool el) {
        Set hidden = getHiddenElements("XMLGroupPanel", el);
        List panelElements = new ArrayList();
        SequencedHashMap choices = XMLUtil.getPossibleApplications(XMLUtil.getWorkflowProcess(el),
                JaWEManager.getInstance().getXPDLHandler());
        Object choosen = choices.get(el.getId());
        if (choosen == null) {
            if (!el.getId().equals("")) {
                choosen = el.getId();
            }
        }
        SpecialChoiceElement cc = new SpecialChoiceElement(el.get("Id"),
                "",
                new ArrayList(choices.values()),
                choosen,
                true,
                "Id",
                "Application",
                el.isRequired());
View Full Code Here

        return generateStandardPanel(el);
    }

    protected XMLPanel getPanelForFROMAttribute(Transition transition) {
        SequencedHashMap choices = JaWEManager.getInstance().getTransitionHandler().getPossibleSourceActivities(transition);

        String tFrom = transition.getFrom();

        Activity current = ((Activities) ((XMLCollectionElement) transition.getParent().getParent()).get("Activities")).getActivity(tFrom);
        if (current != null) {
            choices.put(current.getId(), current);
        }

        Activity choosen = null;
        if (!tFrom.equals("")) {
            choosen = (Activity) choices.get(tFrom);
        }

        XMLAttribute from = (XMLAttribute) transition.get("From");
        SpecialChoiceElement cc = new SpecialChoiceElement(from,
                "",
                new ArrayList(choices.values()),
                choosen,
                true,
                "Id",
                "From",
                from.isRequired());
View Full Code Here

                false,
                JaWEManager.getInstance().getJaWEController().canModifyElement(from));
    }

    protected XMLPanel getPanelForTOAttribute(Transition transition) {
        SequencedHashMap choices = JaWEManager.getInstance().getTransitionHandler().getPossibleTargetActivities(transition);
        String tTo = transition.getTo();

        Activity current = ((Activities) ((XMLCollectionElement) transition.getParent().getParent()).get("Activities")).getActivity(tTo);
        if (current != null) {
            choices.put(current.getId(), current);
        }

        Activity choosen = null;
        if (!tTo.equals("")) {
            choosen = (Activity) choices.get(tTo);
        }

        XMLAttribute to = (XMLAttribute) transition.get("To");
        SpecialChoiceElement cc = new SpecialChoiceElement(to,
                "",
                new ArrayList(choices.values()),
                choosen,
                true,
                "Id",
                "To",
                to.isRequired());
View Full Code Here

TOP

Related Classes of org.enhydra.shark.utilities.SequencedHashMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.