Package org.jboss.as.ejb3.timerservice.schedule.value

Examples of org.jboss.as.ejb3.timerservice.schedule.value.RangeValue


            case SINGLE_VALUE:
                SingleValue singleVal = new SingleValue(listItem);
                this.processSingleValue(singleVal);
                return;
            case RANGE:
                RangeValue range = new RangeValue(listItem);
                this.processRangeValue(range);
                return;
            default:
                throw MESSAGES.invalidListValue(listItem);
        }
View Full Code Here


                SingleValue singleValue = (SingleValue) relativeValue;
                String value = singleValue.getValue();
                Integer absoluteDayOfMonth = this.getAbsoluteDayOfMonth(cal, value);
                eligibleDaysOfMonth.add(absoluteDayOfMonth);
            } else if (relativeValue instanceof RangeValue) {
                RangeValue range = (RangeValue) relativeValue;
                String start = range.getStart();
                String end = range.getEnd();

                Integer dayOfMonthStart = null;
                // either start will be relative or end will be relative or both are relative
                if (this.isRelativeValue(start)) {
                    dayOfMonthStart = this.getAbsoluteDayOfMonth(cal, start);
View Full Code Here

        if (this.accepts(scheduleExpressionType) == false) {
            throw EjbLogger.ROOT_LOGGER.invalidScheduleExpressionType(value, this.getClass().getName(), this.scheduleExpressionType.toString());
        }
        switch (this.scheduleExpressionType) {
            case RANGE:
                RangeValue range = new RangeValue(value);
                // process the range value
                this.processRangeValue(range);
                break;

            case LIST:
View Full Code Here

            case SINGLE_VALUE:
                SingleValue singleVal = new SingleValue(listItem);
                this.processSingleValue(singleVal);
                return;
            case RANGE:
                RangeValue range = new RangeValue(listItem);
                this.processRangeValue(range);
                return;
            default:
                throw EjbLogger.ROOT_LOGGER.invalidListValue(listItem);
        }
View Full Code Here

        for (String invalidRange : invalidRangeValues) {
            boolean accepts = RangeValue.accepts(invalidRange);
            Assert.assertFalse("Range value accepted an invalid value: " + invalidRange, accepts);

            try {
                RangeValue invalidRangeValue = new RangeValue(invalidRange);
                Assert.fail("Range value did *not* throw IllegalArgumentException for an invalid range: " + invalidRange);
            } catch (IllegalArgumentException iae) {
                // expected
            }
        }
View Full Code Here

        String[] validRanges =
                {"1-8", "-7--1", "7--1", "1st Fri-1st Mon"};
        for (String validRange : validRanges) {
            boolean accepts = RangeValue.accepts(validRange);
            Assert.assertTrue("Valid range value wasn't accepted: " + validRange, accepts);
            RangeValue validRangeValue = new RangeValue(validRange);
        }
    }
View Full Code Here

                SingleValue singleValue = (SingleValue) relativeValue;
                String value = singleValue.getValue();
                Integer absoluteDayOfMonth = this.getAbsoluteDayOfMonth(cal, value);
                eligibleDaysOfMonth.add(absoluteDayOfMonth);
            } else if (relativeValue instanceof RangeValue) {
                RangeValue range = (RangeValue) relativeValue;
                String start = range.getStart();
                String end = range.getEnd();

                Integer dayOfMonthStart = null;
                // either start will be relative or end will be relative or both are relative
                if (this.isRelativeValue(start)) {
                    dayOfMonthStart = this.getAbsoluteDayOfMonth(cal, start);
View Full Code Here

        if (this.accepts(scheduleExpressionType) == false) {
            throw MESSAGES.invalidScheduleExpressionType(value,this.getClass().getName(),this.scheduleExpressionType.toString());
        }
        switch (this.scheduleExpressionType) {
            case RANGE:
                RangeValue range = new RangeValue(value);
                // process the range value
                this.processRangeValue(range);
                break;

            case LIST:
View Full Code Here

            case SINGLE_VALUE:
                SingleValue singleVal = new SingleValue(listItem);
                this.processSingleValue(singleVal);
                return;
            case RANGE:
                RangeValue range = new RangeValue(listItem);
                this.processRangeValue(range);
                return;
            default:
                throw MESSAGES.invalidListValue(listItem);
        }
View Full Code Here

        if (exceptionClassName == null || exceptionClassName.isEmpty()) {
            throw EjbMessages.MESSAGES.stringParamCannotBeNullOrEmpty("Exception class name");
        }
        //TODO: Is this a good idea? ApplicationException's equals/hashCode
        //will not work the way that would be expected
        ApplicationExceptionDetails appException = new ApplicationExceptionDetails(exceptionClassName, inherited, rollback);
        // add it to the map
        this.applicationExceptions.put(exceptionClassName, appException);
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.ejb3.timerservice.schedule.value.RangeValue

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.