Examples of Action


Examples of org.jboss.soa.esb.listeners.config.Action

        final Properties properties = new Properties() ;

        properties.put(WebServiceUtils.JBOSSWS_ENDPOINT, "BlahEndpoint");
        properties.put(AbstractWsdlContractPublisher.REWRITE_ENDPOINT_URL, Boolean.toString(rewriteUrls));
       
        return new Action("name", "class", "process", properties) ;
    }
View Full Code Here

Examples of org.jbpm.api.Action

    @Test
    public void simpleProcessExecution() {
        ProcessDefinition process = new ProcessDefinitionImpl();
        StartEventNode startEvent = new StartEventNode();
        process.addNode(0L, startEvent);
        ActionNode actionNode = new ActionNode(new Action() {

            @Override
            public void execute() {
                System.out.println("Executing the Action!!");
            }
View Full Code Here

Examples of org.jbpm.graph.def.Action

  protected void onTearDown() throws Exception {
    super.onTearDown();
  }

  public void testRetrievalFromSpringContext() throws Exception {
    Action action = processDefinition.getAction("myAction");
    ActionHandler delegate = (ActionHandler) action.getActionDelegation().getInstance();

    // create the context and pass it on to the action
    ProcessInstance instance = processDefinition.createProcessInstance();
    // we have to use transient variables or otherwise HB will get in the way
    instance.getContextInstance().setTransientVariable(DummyActionHandler.TEST_LABEL,
View Full Code Here

Examples of org.jbpm.process.instance.impl.Action

        endNode.setId(2);
        process.addNode(endNode);
        ActionNode actionNode = new ActionNode();
        actionNode.setName("Action");
        DroolsAction action = new DroolsConsequenceAction("java", null);
        action.setMetaData("Action", new Action() {
            public void execute(ProcessContext context) throws Exception {
              System.out.println("Executed action");
              executed = true;
            }
        });
View Full Code Here

Examples of org.jbpm.ui.common.model.Action

            NodeList elementsList = document.getDocumentElement().getElementsByTagName(ELEMENT_NAME);
            for (int j = 0; j < elementsList.getLength(); j++) {
                Element element = (Element) elementsList.item(j);
                String path = element.getAttribute(PATH_ATTRIBUTE_NAME);
                String description = element.getAttribute(DESC_ATTRIBUTE_NAME);
                Action action = findByPath(definition, path);
                if (action != null) {
                    action.setDescription(description);
                }
            }
        } catch (Exception e) {
            DesignerLogger.logError("Unable to apply " + XML_FILE_NAME, e);
        }
View Full Code Here

Examples of org.jdesktop.application.Action

            if (getForm() != null) {
                try {
                    // find the action method
                    actionMethod = getForm().getClass().getMethod(code);
                    // find the @Action annotation.
                    Action ac = actionMethod.getAnnotation(Action.class);
                    String eprop = ac.enabledProperty();
                    if(eprop!=null && !eprop.isEmpty()) {
                        Utils.addPropertyChangeListener(getForm(), eprop, enabledListener);
                    }
                    String sprop = ac.selectedProperty();
                    if(sprop!=null && !sprop.isEmpty()) {
                        Utils.addPropertyChangeListener(getForm(), sprop, selectedListener);
                    }
                } catch (NoSuchMethodException ex) {
                    log.severe(String.format("No method named %s in %s", code, getForm().getClass().getName()));
View Full Code Here

Examples of org.jdesktop.jdic.filetypes.Action

                Association assoc = getFileAccociation(".txt");

                Association newAssoc = new Association();

                newAssoc.addFileExtension(FileExtensionFilter.getExtension(showFile));
                Action openAction = new Action("open", assoc.getActionByVerb("open").getCommand());
                newAssoc.addAction(openAction);

                assocService.registerSystemAssociation(newAssoc);
                shouldUnregister = true;
                return true;
View Full Code Here

Examples of org.jdesktop.wonderland.common.security.Action

        Map<Action, DefaultMutableTreeNode> actions =
                new HashMap<Action, DefaultMutableTreeNode>();
        while (!aps.isEmpty()) {
            for (Iterator<ActionDTO> i = aps.iterator(); i.hasNext();) {
                ActionDTO actionDTO = i.next();
                Action action = actionDTO.getAction();
                DefaultMutableTreeNode node = null;

                if (action.getParent() == null) {
                    // top level action
                    node = new DefaultMutableTreeNode(new ActionHolder(action));
                    edit.add(node);
                } else if (actions.containsKey(action.getParent())) {
                    // we found the parent of this action -- add it to
                    // the tree
                    node = new DefaultMutableTreeNode(new ActionHolder(action));
                    actions.get(action.getParent()).add(node);
                }

                if (node != null) {
                    i.remove();
                    actions.put(action, node);
View Full Code Here

Examples of org.jemmy.action.Action

    public void to(double value) {
        scroll.to(value);
    }

    public void to(final Direction condition) {
        wrap.getEnvironment().getExecutor().execute(wrap.getEnvironment(), false, new Action() {

            @Override
            public void run(Object... parameters) {
                int toOrig;
                int dragAttempt = 0;
View Full Code Here

Examples of org.jivesoftware.smackx.commands.AdHocCommand.Action

                if (!command.hasPermission(requestData.getFrom())) {
                    respondError(response, XMPPError.Condition.forbidden);
                    return;
                }

                Action action = requestData.getAction();

                // If the action is unknown then respond an error.
                if (action != null && action.equals(Action.unknown)) {
                    respondError(response, XMPPError.Condition.bad_request,
                            AdHocCommand.SpecificErrorCondition.malformedAction);
                    return;
                }

                // If the action is not execute, then it is an invalid action.
                if (action != null && !action.equals(Action.execute)) {
                    respondError(response, XMPPError.Condition.bad_request,
                            AdHocCommand.SpecificErrorCondition.badAction);
                    return;
                }

                // Increase the state number, so the command knows in witch
                // stage it is
                command.incrementStage();
                // Executes the command
                command.execute();

                if (command.isLastStage()) {
                    // If there is only one stage then the command is completed
                    response.setStatus(Status.completed);
                }
                else {
                    // Else it is still executing, and is registered to be
                    // available for the next call
                    response.setStatus(Status.executing);
                    executingCommands.put(sessionId, command);
                    // See if the session reaping thread is started. If not, start it.
                    if (!sessionsSweeper.isAlive()) {
                        sessionsSweeper.start();
                    }
                }

                // Sends the response packet
                connection.sendPacket(response);

            }
            catch (XMPPException e) {
                // If there is an exception caused by the next, complete,
                // prev or cancel method, then that error is returned to the
                // requester.
                XMPPError error = e.getXMPPError();

                // If the error type is cancel, then the execution is
                // canceled therefore the status must show that, and the
                // command be removed from the executing list.
                if (XMPPError.Type.CANCEL.equals(error.getType())) {
                    response.setStatus(Status.canceled);
                    executingCommands.remove(sessionId);
                }
                respondError(response, error);
                e.printStackTrace();
            }
        }
        else {
            LocalCommand command = executingCommands.get(sessionId);

            // Check that a command exists for the specified sessionID
            // This also handles if the command was removed in the meanwhile
            // of getting the key and the value of the map.
            if (command == null) {
                respondError(response, XMPPError.Condition.bad_request,
                        AdHocCommand.SpecificErrorCondition.badSessionid);
                return;
            }

            // Check if the Session data has expired (default is 10 minutes)
            long creationStamp = command.getCreationDate();
            if (System.currentTimeMillis() - creationStamp > SESSION_TIMEOUT * 1000) {
                // Remove the expired session
                executingCommands.remove(sessionId);

                // Answer a not_allowed error (session-expired)
                respondError(response, XMPPError.Condition.not_allowed,
                        AdHocCommand.SpecificErrorCondition.sessionExpired);
                return;
            }

            /*
             * Since the requester could send two requests for the same
             * executing command i.e. the same session id, all the execution of
             * the action must be synchronized to avoid inconsistencies.
             */
            synchronized (command) {
                Action action = requestData.getAction();

                // If the action is unknown the respond an error
                if (action != null && action.equals(Action.unknown)) {
                    respondError(response, XMPPError.Condition.bad_request,
                            AdHocCommand.SpecificErrorCondition.malformedAction);
                    return;
                }

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.