Package org.apache.lenya.cms.usecase.scheduling

Examples of org.apache.lenya.cms.usecase.scheduling.UsecaseScheduler


        boolean schedule = Boolean.valueOf(getBooleanCheckboxParameter(SCHEDULE)).booleanValue();
        if (schedule) {
            deleteParameter(SCHEDULE);
            String dateString = getParameterAsString(SCHEDULE_TIME);
            DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            UsecaseScheduler scheduler = null;
            try {
                Date date = format.parse(dateString);
                scheduler = (UsecaseScheduler) this.manager.lookup(UsecaseScheduler.ROLE);
                scheduler.schedule(this, date);
            } catch (ParseException e) {
                addErrorMessage("scheduler-date-format-invalid");
            } finally {
                if (scheduler != null) {
                    this.manager.release(scheduler);
View Full Code Here


        boolean schedule = Boolean.valueOf(getBooleanCheckboxParameter(SCHEDULE)).booleanValue();
        if (schedule) {
            deleteParameter(SCHEDULE);
            String dateString = getParameterAsString(SCHEDULE_TIME);
            DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            UsecaseScheduler scheduler = null;
            try {
                Date date = format.parse(dateString);
                scheduler = (UsecaseScheduler) this.manager.lookup(UsecaseScheduler.ROLE);
                scheduler.schedule(this, date);
            } catch (ParseException e) {
                addErrorMessage("scheduler-date-format-invalid");
            } finally {
                if (scheduler != null) {
                    this.manager.release(scheduler);
View Full Code Here

        boolean schedule = Boolean.valueOf(getBooleanCheckboxParameter(SCHEDULE)).booleanValue();
        if (schedule) {
            deleteParameter(SCHEDULE);
            String dateString = getParameterAsString(SCHEDULE_TIME);
            DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            UsecaseScheduler scheduler = null;
            try {
                Date date = format.parse(dateString);
                scheduler = (UsecaseScheduler) this.manager.lookup(UsecaseScheduler.ROLE);
                scheduler.schedule(this, date);
            } catch (ParseException e) {
                addErrorMessage("scheduler-date-format-invalid");
            } finally {
                if (scheduler != null) {
                    this.manager.release(scheduler);
View Full Code Here

        boolean schedule = Boolean.valueOf(getBooleanCheckboxParameter(SCHEDULE)).booleanValue();
        if (schedule) {
            deleteParameter(SCHEDULE);
            String dateString = getParameterAsString(SCHEDULE_TIME);
            DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            UsecaseScheduler scheduler = null;
            try {
                Date date = format.parse(dateString);
                scheduler = (UsecaseScheduler) this.manager.lookup(UsecaseScheduler.ROLE);
                scheduler.schedule(this, date);
            } catch (ParseException e) {
                addErrorMessage("scheduler-date-format-invalid");
            } finally {
                if (scheduler != null) {
                    this.manager.release(scheduler);
View Full Code Here

        boolean schedule = Boolean.valueOf(getBooleanCheckboxParameter(SCHEDULE)).booleanValue();
        if (schedule) {
            deleteParameter(SCHEDULE);
            String dateString = getParameterAsString(SCHEDULE_TIME);
            DateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
            UsecaseScheduler scheduler = null;
            try {
                Date date = null;
                try {
                    date = format.parse(dateString);
                } catch (ParseException e) {
                    addErrorMessage("The scheduler date must be of the form 'yyyy-MM-dd hh:mm:ss'.");
                }
                if (date != null) {
                    scheduler = (UsecaseScheduler) this.manager.lookup(UsecaseScheduler.ROLE);
                    scheduler.schedule(this, date);
                }
            } finally {
                if (scheduler != null) {
                    this.manager.release(scheduler);
                }
View Full Code Here

TOP

Related Classes of org.apache.lenya.cms.usecase.scheduling.UsecaseScheduler

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.