Examples of Event


Examples of org.jbpm.ui.jpdl3.model.Event

        for (ActionNode actionNode : actionNodeNodes) {
            Element actionNodeElement = writeNode(document, root, actionNode, null);
            for (Action action : actionNode.getActions()) {
                ActionImpl actionImpl = (ActionImpl) action;
                if (!Event.NODE_ACTION.equals(actionImpl.getEventType())) {
                    writeEvent(document, actionNodeElement, new Event(actionImpl.getEventType()), actionImpl);
                }
            }
        }

        List<Decision> decisions = definition.getChildren(Decision.class);
        for (Decision decision : decisions) {
            writeNode(document, root, decision, HANDLER_NODE);
        }

        List<TaskState> states = definition.getChildren(TaskState.class);
        for (TaskState state : states) {
            Element stateElement = writeTaskState(document, root, state);
            if (state.timerExist()) {
                Element timerElement = document.createElement(TIMER_NODE);
                setAttribute(timerElement, DUEDATE_ATTR, state.getDuration().getDuration());
                if (!state.hasTimeoutTransition() && state.getTimerAction() != null) {
                    if (state.getTimerAction().getRepeat().hasDuration()) {
                        setAttribute(timerElement, REPEAT_ATTR, state.getTimerAction().getRepeat().getDuration());
                    }
                    writeDelegation(document, timerElement, ACTION_NODE, state.getTimerAction());
                } else {
                    setAttribute(timerElement, TRANSITION_NODE, PluginConstants.TIMER_TRANSITION_NAME);
                }
                stateElement.appendChild(timerElement);
            }
            writeTransitions(document, stateElement, state);
        }

        List<WaitState> waitStates = definition.getChildren(WaitState.class);
        for (WaitState waitState : waitStates) {
            Element stateElement = writeWaitState(document, root, waitState);
            writeTransitions(document, stateElement, waitState);
        }

        List<MailNode> mailNodes = definition.getChildren(MailNode.class);
        for (MailNode mailNode : mailNodes) {
            Element nodeElement = writeNode(document, root, mailNode, null);
            setAttribute(nodeElement, "to", mailNode.getRecipient());
            writeTransitions(document, nodeElement, mailNode);
            Element subject = document.createElement("subject");
            setNodeValue(subject, mailNode.getSubject());
            nodeElement.appendChild(subject);
            Element body = document.createElement("body");
            setNodeValue(body, mailNode.getMailBody());
            nodeElement.appendChild(body);
        }

        List<Fork> forks = definition.getChildren(Fork.class);
        for (org.jbpm.ui.common.model.Node node : forks) {
            writeNode(document, root, node, null);
        }

        List<Join> joins = definition.getChildren(Join.class);
        for (org.jbpm.ui.common.model.Node node : joins) {
            writeNode(document, root, node, null);
        }

        List<Subprocess> subprocesses = definition.getChildren(Subprocess.class);
        boolean addSubprocessPermissionHandler = false;
        for (Subprocess subprocess : subprocesses) {
            addSubprocessPermissionHandler = true;
            Element processStateElement = writeNode(document, root, subprocess, null);
            Element subProcessElement = document.createElement(SUB_PROCESS_NODE);
            setAttribute(subProcessElement, NAME_ATTR, subprocess.getSubProcessName());
            setAttribute(subProcessElement, "binding", "late");
            processStateElement.appendChild(subProcessElement);
            for (VariableMapping variable : subprocess.getVariablesList()) {
                Element variableElement = document.createElement(VARIABLE_NODE);
                setAttribute(variableElement, NAME_ATTR, variable.getProcessVariable());
                setAttribute(variableElement, MAPPED_NAME_ATTR, variable.getSubprocessVariable());
                setAttribute(variableElement, ACCESS_ATTR, variable.getUsage());
                processStateElement.appendChild(variableElement);
            }
        }

        /*
        List<MultiInstance> multiInstances = definition.getChildren(MultiInstance.class);
        for (MultiInstance multiInstance : multiInstances) {
            addSubprocessPermissionHandler = true;
            Element processStateElement = writeNode(document, root, multiInstance, null);
            Element subProcessElement = document.createElement(SUB_PROCESS_NODE);
            setAttribute(subProcessElement, NAME_ATTR, multiInstance.getSubProcessName());
            setAttribute(subProcessElement, "binding", "late");
            processStateElement.appendChild(subProcessElement);
            for (VariableMapping variable : multiInstance.getVariablesList()) {
                Element variableElement = document.createElement(VARIABLE_NODE);
                setAttribute(variableElement, NAME_ATTR, variable.getProcessVariable());
                setAttribute(variableElement, MAPPED_NAME_ATTR, variable.getSubprocessVariable());
                setAttribute(variableElement, ACCESS_ATTR, variable.getAccess());
                processStateElement.appendChild(variableElement);
            }
        }
        */

        if (addSubprocessPermissionHandler) {
            // TODO add XML comment and move to own method (after event support will be added)
            ActionImpl action = new ActionImpl();
            action.setDelegationClassName("ru.runa.wf.jbpm.delegation.action.SetSubProcessPermissionsActionHandler");
            writeEvent(document, root, new Event(Event.SUBPROCESS_CREATED), action);
        }

        EndState endState = definition.getFirstChild(EndState.class);
        if (endState != null) {
            writeElement(document, root, endState);
View Full Code Here

Examples of org.jclouds.digitalocean.domain.Event

   protected Predicate<Integer> provideDropletRunningPredicate(final DigitalOceanApi api, Timeouts timeouts,
         PollPeriod pollPeriod) {
      return Predicates2.retry(new Predicate<Integer>() {
         @Override
         public boolean apply(Integer input) {
            Event event = api.getEventApi().get(input);
            return Event.Status.DONE == event.getStatus();
         }
      }, timeouts.nodeRunning, pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
   }
View Full Code Here

Examples of org.jdesktop.wonderland.client.input.Event

    /**
     * {@inheritDoc}
     */
    @InternalAPI
    public Event createWonderlandEvent(EventObject eventObj) {
        Event event = null;

        if (eventObj instanceof KeyEvent) {
            event = new KeyEvent3D((KeyEvent) eventObj);
        } else if (eventObj instanceof FocusEvent) {
            event = new FocusEvent3D((FocusEvent) eventObj);
View Full Code Here

Examples of org.jgroups.Event

    public void init() throws Exception {
        local_addr=new org.jgroups.stack.IpAddress("localhost", 10000); // fake address
    }

    public void start() throws Exception {
        up_prot.up(new Event(Event.SET_LOCAL_ADDRESS, local_addr));
    }
View Full Code Here

Examples of org.jibeframework.core.ui.Event

  }

  @SuppressWarnings("unchecked")
  public void fireEvent(Object source, String id, String event, Object... data) {
    ConfigMap handlers = (ConfigMap) configService.getConfig("core.binding");
    Event eventData = new Event(source, data);
    if (handlers.containsKey(id)) {
      Map map = (Map) handlers.get(id);
      if (map.containsKey(event)) {
        invoke((String) map.get(event), eventData);
      }
View Full Code Here

Examples of org.jpokemon.trainer.Event

public class EventSelector extends JPokemonSelector<Event> {
  @Override
  protected void reloadItems() {
    removeAllItems();

    Event event;
    for (int i = 1; (event = Event.get(i)) != null; i++) {
      addElementToModel(event);
    }
  }
View Full Code Here

Examples of org.keycloak.events.Event

        grantPage.accept();

        Assert.assertTrue(oauth.getCurrentQuery().containsKey(OAuth2Constants.CODE));

        Event loginEvent = events.expectLogin().client("third-party").assertEvent();
        String codeId = loginEvent.getDetails().get(Details.CODE_ID);
        String sessionId = loginEvent.getSessionId();

        OAuthClient.AccessTokenResponse accessToken = oauth.doAccessTokenRequest(oauth.getCurrentQuery().get(OAuth2Constants.CODE), "password");

        String tokenString = accessToken.getAccessToken();
        Assert.assertNotNull(tokenString);
        AccessToken token = oauth.verifyToken(tokenString);
        assertEquals(sessionId, token.getSessionState());

        AccessToken.Access realmAccess = token.getRealmAccess();
        assertEquals(1, realmAccess.getRoles().size());
        Assert.assertTrue(realmAccess.isUserInRole("user"));

        Map<String,AccessToken.Access> resourceAccess = token.getResourceAccess();
        assertEquals(1, resourceAccess.size());
        assertEquals(1, resourceAccess.get("test-app").getRoles().size());
        Assert.assertTrue(resourceAccess.get("test-app").isUserInRole("customer-user"));

        events.expectCodeToToken(codeId, loginEvent.getSessionId()).client("third-party").assertEvent();
    }
View Full Code Here

Examples of org.koshuke.stapler.simile.timeline.Event

    }

    public TimelineEventList doData(StaplerRequest req, @QueryParameter long min, @QueryParameter long max) throws IOException {
        TimelineEventList result = new TimelineEventList();
        for (Run r : builds.byTimestamp(min,max)) {
            Event e = new Event();
            e.start = r.getTime();
            e.end   = new Date(r.timestamp+r.getDuration());
            e.title = r.getFullDisplayName();
            // what to put in the description?
            // e.description = "Longish description of event "+r.getFullDisplayName();
View Full Code Here

Examples of org.meb.speedway.model.event.Event

      ;
    Team awayTeam = teams.get(awayIdx);
    System.out.println("home team: " + homeTeam);
    System.out.println("away team: " + awayTeam);

    Event meeting = new Event();
    meeting.setHomeTeam(homeTeam);
    meeting.setHomeEventRiders(createMeetingRiders(meeting, homeTeam, RiderKind.HOME));
    meeting.setAwayTeam(awayTeam);
    meeting.setAwayEventRiders(createMeetingRiders(meeting, awayTeam, RiderKind.AWAY));
    meeting.setDate(new Date());
    em.persist(meeting);
  }
View Full Code Here

Examples of org.megatome.frame2.event.Event

   * @throws ConfigException
   *             DOCUMENT ME!
   */
  public EventProxy getEventProxy(String eventName) throws ConfigException {
    EventDef eventDef = this.events.get(eventName);
    Event event = null;

    if (eventDef == null) {
      throw new ConfigException("Invalid Event Name: " + eventName); //$NON-NLS-1$
    }

    try {
      String type = eventDef.getType();

      if (type != null) {
        // event = (Event) getClass().forName(type).newInstance();
        event = (Event) Class.forName(type).newInstance();
        event.setEventName(eventName);
      }
    } catch (Exception e) {
      throw new ConfigException("Invalid Event ", e); //$NON-NLS-1$
    }

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.