Examples of Task


Examples of org.apache.synapse.startup.Task

        String jobClassName = (String) jdm.get(CLASSNAME);
        if (jobClassName == null) {
            handleException("No " + CLASSNAME + " in JobDetails");
        }

        Task task = null;
        try {
            task = (Task) getClass().getClassLoader().loadClass(jobClassName).newInstance();
        } catch (Exception e) {
            handleException("Cannot instantiate task : " + jobClassName, e);
        }

        Set properties = (Set) jdm.get(PROPERTIES);
        Iterator it = properties.iterator();
        while (it.hasNext()) {
            OMElement prop = (OMElement) it.next();
            log.debug("Found Property : " + prop.toString());
            PropertyHelper.setStaticProperty(prop, task);
        }

        SynapseEnvironment se = (SynapseEnvironment) jdm.get("SynapseEnvironment");
        if (task instanceof ManagedLifecycle) {
            if (se != null) {
                ((ManagedLifecycle) task).init(se);
            }
        }

        if (se.isInitialized()) {
            task.execute();
        }
    }
View Full Code Here

Examples of org.apache.synapse.task.Task

        String jobClassName = (String) jdm.get(CLASSNAME);
        if (jobClassName == null) {
            handleException("No " + CLASSNAME + " in JobDetails");
        }

        Task task = null;
        try {
            task = (Task) getClass().getClassLoader().loadClass(jobClassName).newInstance();
        } catch (Exception e) {
            handleException("Cannot instantiate task : " + jobClassName, e);
        }

        Set properties = (Set) jdm.get(PROPERTIES);
        for (Object property : properties) {
            OMElement prop = (OMElement) property;
            log.debug("Found Property : " + prop.toString());
            PropertyHelper.setStaticProperty(prop, task);
        }

        // 1. Initialize
        SynapseEnvironment se = (SynapseEnvironment) jdm.get("SynapseEnvironment");
        if (task instanceof ManagedLifecycle && se != null) {
            ((ManagedLifecycle) task).init(se);
        }

        // 2. Execute
        if (se != null && task != null && se.isInitialized()) {
            task.execute();
        }

        // 3. Destroy
        if (task instanceof ManagedLifecycle && se != null) {
            ((ManagedLifecycle) task).destroy();
View Full Code Here

Examples of org.apache.syncope.core.persistence.beans.Task

     * @throws InvalidEntityException if any bean validation fails
     */
    @Override
    @Transactional(rollbackFor = {Throwable.class})
    public void saveAndAdd(final Long taskId, final TaskExec execution) throws InvalidEntityException {
        Task task = taskDAO.find(taskId);
        task.addExec(execution);
        taskDAO.save(task);
    }
View Full Code Here

Examples of org.apache.tapestry.timetracker.model.Task

    /**
     * Invoked by form to add a new task.
     */
    public void addTask()
    {
        Task task = new Task();
        task.setProjectId(getSelectedProject().getId());
        task.setDescription(getDescription());
       
        _log.debug("addTask date: " + getDate()
                + "\n startTime: " + getStartTime()
                + "\n endTime: " + getEndTime());
       
        task.setStartDate(getStartTime());
        task.setEndDate(getEndTime());
       
        getTaskDao().addTask(task);
    }
View Full Code Here

Examples of org.apache.tez.dag.app.dag.Task

    @SuppressWarnings("unchecked")
    @Override
    public void handle(TaskAttemptEvent event) {
      VertexImpl vertex = vertexIdMap.get(
        event.getTaskAttemptID().getTaskID().getVertexID());
      Task task = vertex.getTask(event.getTaskAttemptID().getTaskID());
      ((EventHandler<TaskAttemptEvent>)task.getAttempt(
          event.getTaskAttemptID())).handle(event);
    }
View Full Code Here

Examples of org.apache.tools.ant.Task

    Object ref = project.getReference(taskref);
    if (!(ref instanceof Task)) {
      throw new BuildException("Reference (" + taskref
          + ") does not refer to a task");
    }
    Task target = (Task) ref;

    // Assign the autowire value for the bean factory
    int autowireValue = AutowireCapableBeanFactory.AUTOWIRE_BY_NAME;
    if (AUTOWIRE_BY_TYPE.equals(autowire)) {
      autowireValue = AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE;
View Full Code Here

Examples of org.apache.wicket.util.thread.Task

  @Override
  public void start(final Duration pollFrequency)
  {
    // Construct task with the given polling frequency
    task = new Task("ModificationWatcher");

    task.run(pollFrequency, new ICode()
    {
      @Override
      public void run(final Logger log)
View Full Code Here

Examples of org.apache.wiki.workflow.Task

        // For new accounts, create approval workflow for user profile save.
        if ( newProfile && oldProfile != null && oldProfile.isNew() )
        {
            WorkflowBuilder builder = WorkflowBuilder.getBuilder( m_engine );
            Principal submitter = session.getUserPrincipal();
            Task completionTask = new SaveUserProfileTask( m_engine, session.getLocale() );

            // Add user profile attribute as Facts for the approver (if required)
            boolean hasEmail = profile.getEmail() != null;
            Fact[] facts = new Fact[ hasEmail ? 4 : 3];
            facts[0] = new Fact( PREFS_FULL_NAME, profile.getFullname() );
View Full Code Here

Examples of org.blueoxygen.ramen.task.entity.Task

        log = new LogInformation();
        log.setCreateBy(sessionCredentials.getCurrentUser().getId());
        log.setCreateDate(new Timestamp(System.currentTimeMillis()));
        getTask().setId(null);
      } else {
        Task temp = getTask();
        setTask((Task) manager.getById(Task.class, getTask().getId()));
        log = getTask().getLogInformation();
        try {
          PropertyUtils.copyProperties(getTask(), temp);
        } catch (IllegalAccessException e) {
View Full Code Here

Examples of org.blync.client.calendar.tasks.Task

            Appointment appointment = new Appointment(data);
            alarmMinutes = appointment.getAlarmMinutes();
            itemTitle = appointment.getTitle();
        }
        else {
            Task task = new Task(data);
            alarmMinutes = task.getAlarmMinutes();
            itemTitle = task.getTitle();
        }
        Date start = new Date(alarmTime.getTime() +  alarmMinutes * 60000);

        String alarmText = new CalendarDate(start).formatShort() + "\n" +
                           new TimeOfDay(start).toString() + "\n" +
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.