flux
Interface AllowableBusinessInterval

All Known Subinterfaces:
BusinessInterval

public interface AllowableBusinessInterval

Indicates whether a business interval permits a job to run on a specific date.

Author:
Copyright 2014 Flux Corporation. All rights reserved.

Method Summary
 java.lang.String getName()
          Returns the name of this interval.
 boolean isAllowed(java.util.Date start, java.lang.String duration, boolean includeEntireSpan, java.util.TimeZone timeZone)
          Creates a span of time, starting with the "start" date and continuing for the Time Expression specified in "duration".
 boolean isAllowed(java.util.Date instant, java.util.TimeZone timeZone)
          Determines if a job is allowed to run at the specified instant in time in the specified time zone.
 void setName(java.lang.String name)
          Sets the name of this interval.
 

Method Detail

getName

java.lang.String getName()
Returns the name of this interval.

Returns:
The name of this interval.

isAllowed

boolean isAllowed(java.util.Date start,
                  java.lang.String duration,
                  boolean includeEntireSpan,
                  java.util.TimeZone timeZone)
                  throws EngineException
Creates a span of time, starting with the "start" date and continuing for the Time Expression specified in "duration". Afterwards, that span of time is evaluated as follows.

If "includeEntireSpan" is true, returns true if and only if that entire span of time is in this allowable business interval.

On the other hand, if "includeEntireSpan" is false, returns true if and only if at least one millisecond of that span of time is in this allowable business interval.

Parameters:
start - The start of the span of time.
duration - A Time Expression that indicates the duration of the span of time.
includeEntireSpan - Indicates whether all, or part of, the specified span of time is in this allowable business interval.
timeZone - The time zone in which the business interval will be evaluated.
Returns:
An indication of whether the whole of, or parts of, the specified span of time is in this allowable business interval.
Throws:
EngineException - If an error occurs, which will cause the job action to throw this exception.

isAllowed

boolean isAllowed(java.util.Date instant,
                  java.util.TimeZone timeZone)
                  throws EngineException
Determines if a job is allowed to run at the specified instant in time in the specified time zone.

Parameters:
instant - An instant in time. A job is tested to determine if it is allowed to run at that instant.
timeZone - The time zone in which the business interval will be evaluated.
Returns:
Whether a job is allowed to run on the specified instant in time.
Throws:
EngineException - If an error occurs, which will cause the job action to throw this exception.

setName

void setName(java.lang.String name)
Sets the name of this interval.

Parameters:
name - The name of this interval.


© 2014 Flux Corporation. All rights reserved.