Skip navigation links

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

E12907-03


oracle.irm.engine.core.time
Interface TimeSpan

All Known Subinterfaces:
AbsoluteTimeSpan, RelativeTimeSpan

public interface TimeSpan

A time span. A time span can have an optional start and stop time and a flexible time reference point.

Collections

Collections for TimeSpan objects can be created using the following factory method. This method creates the most appropriate collection implementation class for storing TimeSpan elements.

 Collection<TimeSpan> object = createTimeSpans();

XML Serialization

Time Span instances can be serialized as an XML document. This XML document can also be used to recreate a Time Span object. The following XML document shows an example Time Span in XML form.

<?xml version="1.0" encoding="UTF-8"?>
<core:AbsoluteTimeSpan xmlns:core="http://xmlns.oracle.com/irm/core">
    <referencePoint>CURRENT</referencePoint>
    <startTime>2007-01-01T12:00:00.000+01:00</startTime>
    <stopTime>2007-01-01T13:00:00.000+01:00</stopTime>
</core:AbsoluteTimeSpan>


Nested Class Summary
static class TimeSpan.ReferencePoint
          Time reference point.

 

Method Summary
 TimeSpan.ReferencePoint getReferencePoint()
          The reference point for a time span.
 Date getStartTime(Classification classification, License license)
          Get the absolute start time of this time span.
 Date getStopTime(Classification classification, License license)
          Get the absolute stop time of this time span.

 

Method Detail

getReferencePoint

TimeSpan.ReferencePoint getReferencePoint()
The reference point for a time span.
Returns:
the value of the property. This method will never return null.

getStartTime

Date getStartTime(Classification classification,
                  License license)
Get the absolute start time of this time span. Although the time span may use a reference point other that current time, this method returns the actual start time for the supplied classification/license.
Parameters:
classification - classification. This parameter is optional, it is valid to pass null.
license - license. This parameter is optional, it is valid to pass null.
Returns:
the start time, or null if there is no start time. This method will never return null.

getStopTime

Date getStopTime(Classification classification,
                 License license)
Get the absolute stop time of this time span. Although the time span may use a reference point other that current time, this method returns the actual stop time for the supplied classification/license.
Parameters:
classification - classification. This parameter is optional, it is valid to pass null.
license - license. This parameter is optional, it is valid to pass null.
Returns:
the stop time, or null if there is no stop time. This method will never return null.

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.