Skip navigation links

Oracle® Information Rights Management Server Java API Reference
11g Release 1 (11.1.1)

E12907-03


oracle.irm.engine.core.time
Class TimeRangeFactory

java.lang.Object
  extended by oracle.irm.engine.core.time.TimeRangeFactory


public final class TimeRangeFactory
extends Object

Time Range factory. This class provides methods for creating new instances of TimeRange objects.


Method Summary
static TimeRange createTimeRange(Date begin, Date end)
          Create a time range.
static TimeRange createTimeRange(Date date, TimeRange.Direction direction, TimeRange.Interval interval, int size)
          Create a time range using a time interval.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

createTimeRange

public static TimeRange createTimeRange(Date begin,
                                        Date end)
Create a time range. Both a start time and stop time must be provided.
Parameters:
begin - start of the time range. e.g. 17 August 2007 10:34.
end - end of the time range. e.g. 23 November 2008 14:45.
Returns:
a new Time Range instance.

createTimeRange

public static TimeRange createTimeRange(Date date,
                                        TimeRange.Direction direction,
                                        TimeRange.Interval interval,
                                        int size)
Create a time range using a time interval. The time range is calculate from the reference date using the interval provided. The direction specifies whether the interval is forwards or backwards in time. e.g. create a time range from the reference date 15 August 2008 20:00, forward in time two hours. This would result in a time range with a begin time of 15 August 2008 20:00 and an end time of 15 August 2008 22:00.
Parameters:
date - reference date.
direction - time direction.
interval - interval.
size - interval size.
Returns:
a new Time Range instance.

Skip navigation links

Oracle® Information Rights Management Server Java API Reference
11g Release 1 (11.1.1)

E12907-03


Copyright © 2011, Oracle. All rights reserved.