Cisco Systems, Inc.

com.pcube.apps.engage.policy
Class TimeFrame

java.lang.Object
  extended by com.pcube.apps.engage.policy.TimeFrame
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class TimeFrame
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

The time is divided into four types - TF1, TF2, TF3 and TF4. The Policy's week is devided into hours, and each hour gets a time frame value. In each timeslot a package can define different rule for each service.
The Policy can define aliases for the time frames to give it a meaningful name by using the function setTimeFrameName.

See Also:
Serialized Form

Field Summary
static TimeFrame T1
          Time frame #1.
static TimeFrame T2
          Time frame #2.
static TimeFrame T3
          Time frame #3.
static TimeFrame T4
          Time frame #4.
static java.lang.String[] timeFrame_List
          The predefined TimeFrames names.
static java.util.List VALUES
          The list of the TimeFrames.
 
Method Summary
 int compareTo(java.lang.Object o)
          Equating an object with this object.
 int getIntValue()
          Gets this TimeFrame's index.
static TimeFrame getTimeFrame(java.lang.String name)
          Gets the TimeFrame bearing the specific name.
 java.lang.String toString()
          Gets this TimeFrame's name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

T1

public static final TimeFrame T1
Time frame #1.


T2

public static final TimeFrame T2
Time frame #2.


T3

public static final TimeFrame T3
Time frame #3.


T4

public static final TimeFrame T4
Time frame #4.


timeFrame_List

public static final java.lang.String[] timeFrame_List
The predefined TimeFrames names.


VALUES

public static final java.util.List VALUES
The list of the TimeFrames.

Method Detail

toString

public java.lang.String toString()
Gets this TimeFrame's name.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the TimeFrame.

getIntValue

public int getIntValue()
Gets this TimeFrame's index.

Returns:
this TimeFrame's index

compareTo

public int compareTo(java.lang.Object o)
Equating an object with this object. The two objects are considerd equal only if all of their parameters equal in value and in order of apperance, such as is the case in arrays.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - the object which is compared to this object
Returns:
0 if the object and this object are equal, 1 otherwise

getTimeFrame

public static TimeFrame getTimeFrame(java.lang.String name)
                              throws ItemNotFoundException
Gets the TimeFrame bearing the specific name.

Parameters:
name - the desired TimeFrame's name
Returns:
the timeFrame
Throws:
ItemNotFoundException - if tehre is no such TimeFrame

Cisco Systems, Inc.

Copyright © 2013 Cisco Systems, Inc. Confidential.