Package org.apache.lenya.cms.task

Examples of org.apache.lenya.cms.task.DefaultTaskWrapper


       
        NamespaceMap taskParameters = new NamespaceMap(TaskParameters.PREFIX);
        taskParameters.putAll(wrapperMap);
        wrapperMap.putAll(taskParameters.getPrefixedMap());
       
        DefaultTaskWrapper wrapper = new DefaultTaskWrapper(wrapperMap);
        return wrapper.getParameters();
    }
View Full Code Here


     */
    public void execute(JobExecutionContext context) throws JobExecutionException {
        log.info("Executing job");
        JobDetail jobDetail = context.getJobDetail();
       
        DefaultTaskWrapper wrapper = new DefaultTaskWrapper(jobDetail.getJobDataMap());
        try {
            wrapper.execute();
        } catch (ExecutionException e) {
          log.error("Task execution failed: ", e);
        }
    }
View Full Code Here

     */
    public JobDetail load(Element jobElement, String jobGroup, String servletContextPath) throws SchedulerException {
        JobDetail jobDetail = super.load(jobElement, jobGroup, servletContextPath);
       
        NamespaceHelper helper = SchedulerStore.getNamespaceHelper();
        DefaultTaskWrapper wrapper = new DefaultTaskWrapper(helper, jobElement);
        wrapper.getTaskParameters().setServletContextPath(servletContextPath);
       
        JobDataMap map = new JobDataMap(wrapper.getParameters());
        jobDetail.setJobDataMap(map);
       
        return jobDetail;
    }
View Full Code Here

     * @return DOCUMENT ME!
     */
    public Element save(NamespaceHelper helper, JobDetail jobDetail) throws SchedulerException {
       
        Element jobElement = super.save(helper, jobDetail);
        TaskWrapper wrapper = new DefaultTaskWrapper(jobDetail.getJobDataMap());
        jobElement.appendChild(wrapper.save(helper));
       
        return jobElement;
    }
View Full Code Here

       
        NamespaceMap taskParameters = new NamespaceMap(TaskParameters.PREFIX);
        taskParameters.putAll(wrapperMap);
        wrapperMap.putAll(taskParameters.getPrefixedMap());
       
        DefaultTaskWrapper wrapper = new DefaultTaskWrapper(wrapperMap, null);
        return wrapper.getParameters();
    }
View Full Code Here

     */
    public void execute(JobExecutionContext context) throws JobExecutionException {
        log.info("Executing job");
        JobDetail jobDetail = context.getJobDetail();
       
        DefaultTaskWrapper wrapper = new DefaultTaskWrapper(jobDetail.getJobDataMap(), null);
        try {
            wrapper.execute();
        } catch (ExecutionException e) {
          log.error("Task execution failed: ", e);
          throw new JobExecutionException();
        }
    }
View Full Code Here

     */
    public JobDetail load(Element jobElement, String jobGroup, String servletContextPath) throws SchedulerException {
        JobDetail jobDetail = super.load(jobElement, jobGroup, servletContextPath);
       
        NamespaceHelper helper = SchedulerStore.getNamespaceHelper();
        DefaultTaskWrapper wrapper = new DefaultTaskWrapper(helper, jobElement);
        wrapper.getTaskParameters().setServletContextPath(servletContextPath);
       
        JobDataMap map = new JobDataMap(wrapper.getParameters());
        jobDetail.setJobDataMap(map);
       
        return jobDetail;
    }
View Full Code Here

     * @return The job element
     */
    public Element save(NamespaceHelper helper, JobDetail jobDetail) throws SchedulerException {
       
        Element jobElement = super.save(helper, jobDetail);
        TaskWrapper wrapper = new DefaultTaskWrapper(jobDetail.getJobDataMap(), null);
        jobElement.appendChild(wrapper.save(helper));
       
        return jobElement;
    }
View Full Code Here

       
        NamespaceMap taskParameters = new NamespaceMap(TaskParameters.PREFIX);
        taskParameters.putAll(wrapperMap);
        wrapperMap.putAll(taskParameters.getPrefixedMap());
       
        DefaultTaskWrapper wrapper = new DefaultTaskWrapper(wrapperMap);
        return wrapper.getParameters();
    }
View Full Code Here

     */
    public void execute(JobExecutionContext context) throws JobExecutionException {
        log.info("Executing job");
        JobDetail jobDetail = context.getJobDetail();
       
        DefaultTaskWrapper wrapper = new DefaultTaskWrapper(jobDetail.getJobDataMap());
        try {
            wrapper.execute();
        } catch (ExecutionException e) {
          log.error("Task execution failed: ", e);
//            throw new JobExecutionException(e, true);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.lenya.cms.task.DefaultTaskWrapper

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.