Package org.rhq.coregui.client.components.form

Examples of org.rhq.coregui.client.components.form.DurationItem


    }

    public Long getRepeatInterval() {
        Long intervalMillis;
        if (this.isRecurring) {
            DurationItem repeatInterval = (DurationItem) this.repeatForm.getItem(FIELD_REPEAT_INTERVAL);
            intervalMillis = repeatInterval.getValueAsLong() * 1000;
        } else {
            intervalMillis = null;
        }
        return intervalMillis;
    }
View Full Code Here


    public Integer getRepeatCount() {
        Integer repetitions;
        if (this.isRecurring) {
            if (this.isRepeatDuration) {
                DurationItem repeatDurationItem = (DurationItem) this.repeatForm.getItem(FIELD_REPEAT_DURATION);
                if (repeatDurationItem.getUnitType() == UnitType.ITERATIONS) {
                    // n repetitions
                    repetitions = repeatDurationItem.getValueAsInteger();
                } else {
                    // n units of time - compute end time
                    repetitions = null;
                }
            } else {
View Full Code Here

    public Date getEndTime() {
        Date endTime;
        if (this.isRecurring) {
            if (this.isRepeatDuration) {
                DurationItem repeatDurationItem = (DurationItem) this.repeatForm.getItem(FIELD_REPEAT_DURATION);
                if (repeatDurationItem.getUnitType() == UnitType.ITERATIONS) {
                    // n repetitions
                    endTime = null;
                } else {
                    // n units of time - compute end time
                    long delay = repeatDurationItem.getValueAsLong() * 1000;
                    long endTimestamp = System.currentTimeMillis() + delay;
                    endTime = new Date(endTimestamp);
                }
            } else if (this.isEndTime) {
                DateTimeItem endTimeItem = (DateTimeItem) this.repeatForm.getField(FIELD_END_TIME);
View Full Code Here

TOP

Related Classes of org.rhq.coregui.client.components.form.DurationItem

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.