Skip navigation links

Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server
11g Release 2 (11.1.2)

E54416-01


oracle.security.jps.service.policystore.info
Class OpssTime

java.lang.Object
  extended by oracle.security.jps.service.policystore.info.DataType
      extended by oracle.security.jps.service.policystore.info.OpssDateTimeObject
          extended by oracle.security.jps.service.policystore.info.OpssTime

All Implemented Interfaces:
ExpressionComponent

public class OpssTime
extends OpssDateTimeObject

This class supports time object as defined in http://www.w3.org/2001/XMLSchema#time Arbitrary precision in decimal seconds is supported via fractionsal seconds Also, note that as per ISO 8601 date and time specification, midnight is 00:00:00 (and not 24:00:00), so hour value of 24 is not supported. For more information on how OES supports timezones, see javadoc for OpssDateTimeObject.


Nested Class Summary

 

Nested classes/interfaces inherited from class oracle.security.jps.service.policystore.info.DataType
DataType.TYPE

 

Nested classes/interfaces inherited from interface oracle.security.jps.service.policystore.info.ExpressionComponent
ExpressionComponent.Type

 

Field Summary

 

Fields inherited from class oracle.security.jps.service.policystore.info.OpssDateTimeObject
OES_SPECIFIC_TZ_OFFSET, PDP_TIMEZONE, PEP_TIMEZONE

 

Constructor Summary
OpssTime(java.util.Date date, int fracs, int tzoffset)
          Construct a time object from Date object and fractional seconds.
OpssTime(int hour, int min, int sec)
          Constructor
OpssTime(int hours, int minutes, int seconds, int fracs, int tzoffset)
          Construct a time object from timezone, hours, minutes, seconds and nanoseconds.
OpssTime(int hours, int minutes, int seconds, int fracs, java.lang.String timezone)
          Construct a time object from timezone, hours, minutes, seconds and nanoseconds.

 

Method Summary
static int compare(OpssTime time1, OpssTime time2)
          Compares two OpssTime objects.
 boolean equals(java.lang.Object that)
          Override java method for accurate list and hashtable lookups.
 ExpressionComponent.Type getComponentType()
          Returns type of the component.
 int getFractionalSeconds()
           
 int getHour()
          Returns the hours set in the OpssTime object.
 int getMinutes()
          Returns the minutes set in the OpssTime object.A minute is represented by an integer from 0 to 59.
 java.lang.Class getRuntimeType()
          Gets runtime type
 int getSeconds()
          Returns the seconds set in the OpssTime object.A second is represented by an integer from 0 to 59.
 long getTimeInMillis()
           
 DataType.TYPE getType()
          For all concrete subclasses, this method is required so that function evaluators at runtime don't need to keep doing instanceof
 OpssTime getValue()
          Returns an object representing real value of this data type.
 int hashCode()
          Overwrite Object's hashCode, since the equals method was overwritten.
 boolean isTimeZoneEqual(OpssTime other)
           
 boolean isValid()
           
 java.lang.String toString()
           
static OpssTime valueOf(java.lang.String str)
           

 

Methods inherited from class oracle.security.jps.service.policystore.info.OpssDateTimeObject
getTimeZoneName, getTimeZonesForOffset, getTimeZoneString, getUTCOffset, isTimeZonePresent, isUTC, nthOccurrence

 

Methods inherited from class oracle.security.jps.service.policystore.info.DataType
getDataTypeObjectFromString, getDataTypeObjectFromString, getTypeClassFromClassName, getTypeFromClass

 

Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait

 

Constructor Detail

OpssTime

public OpssTime(int hour,
                int min,
                int sec)
Constructor
Parameters:
hour -
min -
sec -

OpssTime

public OpssTime(java.util.Date date,
                int fracs,
                int tzoffset)
         throws java.lang.IllegalArgumentException
Construct a time object from Date object and fractional seconds. Fractional seconds must be positive.
Parameters:
date - Date object
fracs - Fractional seconds
tzoffset - offset from UTC
Throws:
java.lang.IllegalArgumentException

OpssTime

public OpssTime(int hours,
                int minutes,
                int seconds,
                int fracs,
                int tzoffset)
         throws java.lang.IllegalArgumentException
Construct a time object from timezone, hours, minutes, seconds and nanoseconds. Hours, minutes and seconds must be in the range. Nanoseconds must be +ve.
Parameters:
hours - hours between 0 to 23 inclusive
minutes - minutes between 0 to 59 inclusive
seconds - seconds between 0 to 59 inclusive
fracs - fractional seconds
tzoffset - UTC offset for this timezone.
Throws:
java.lang.IllegalArgumentException - if precision seconds are -ve or hours (0 - 23), minutes (0 - 59) or seconds (0 - 59) are out of range.

OpssTime

public OpssTime(int hours,
                int minutes,
                int seconds,
                int fracs,
                java.lang.String timezone)
         throws java.lang.IllegalArgumentException
Construct a time object from timezone, hours, minutes, seconds and nanoseconds. Hours, minutes and seconds must be in the range. Nanoseconds must be +ve.
Parameters:
hours - hours between 0 to 23 inclusive
minutes - minutes between 0 to 59 inclusive
seconds - seconds between 0 to 59 inclusive
fracs - fractional seconds
tzName - Name of the time zone.
Throws:
java.lang.IllegalArgumentException - if precision seconds are -ve or hours (0 - 23), minutes (0 - 59) or seconds (0 - 59) are out of range.

Method Detail

getRuntimeType

public java.lang.Class getRuntimeType()
Gets runtime type

toString

public java.lang.String toString()
Specified by:
toString in class DataType

valueOf

public static OpssTime valueOf(java.lang.String str)

compare

public static int compare(OpssTime time1,
                          OpssTime time2)
Compares two OpssTime objects. Returns -1 if time1 is smaller than time2, 0 if the two are equal and 1 if time1 is greater than time2

equals

public boolean equals(java.lang.Object that)
Description copied from class: DataType
Override java method for accurate list and hashtable lookups.
Specified by:
equals in class DataType

getComponentType

public ExpressionComponent.Type getComponentType()
Description copied from interface: ExpressionComponent
Returns type of the component.
Returns:

isValid

public boolean isValid()

getHour

public int getHour()
Returns the hours set in the OpssTime object. An hour is represented by an integer from 0 to 23. Thus, the hour from midnight to 1 a.m. is hour 0 * and the hour from noon to 1 p.m. is hour 12.
Returns:
the hours set in the OpssTime object.

getMinutes

public int getMinutes()
Returns the minutes set in the OpssTime object.A minute is represented by an integer from 0 to 59.
Returns:
the minutes set in the OpssTime object.

getSeconds

public int getSeconds()
Returns the seconds set in the OpssTime object.A second is represented by an integer from 0 to 59.
Returns:
the seconds set in the OpssTime object.

getValue

public OpssTime getValue()
Description copied from class: DataType
Returns an object representing real value of this data type. For example, OpssInteger.getValue will return an Integer object.
Specified by:
getValue in class DataType

getType

public DataType.TYPE getType()
Description copied from class: DataType
For all concrete subclasses, this method is required so that function evaluators at runtime don't need to keep doing instanceof
Specified by:
getType in class DataType
Returns:
data type of this object, always TYPE.TIME

getTimeInMillis

public long getTimeInMillis()
Returns:
value of millisec of this object.

getFractionalSeconds

public int getFractionalSeconds()
Returns:
value of precision seconds of this object.

isTimeZoneEqual

public boolean isTimeZoneEqual(OpssTime other)
Parameters:
other -
Returns:
true if this time object's timezone is equal to given time object's timezone, otherwise return false.

hashCode

public int hashCode()
Overwrite Object's hashCode, since the equals method was overwritten.
Overrides:
hashCode in class OpssDateTimeObject
Returns:
hash value of this object.

Skip navigation links

Oracle Fusion Middleware Management Java API Reference for Oracle Entitlements Server
11g Release 2 (11.1.2)

E54416-01


Copyright © 2011, 2015, Oracle and/or its affiliates. All rights reserved.