com.hp.ucmdb.api.discovery.types
Interface TimeFrame

All Superinterfaces:
java.io.Serializable

public interface TimeFrame
extends java.io.Serializable

The definition of a period of time.
Each period, or frame, is defined by a day or days, a start time and an end time.


Nested Class Summary
static class TimeFrame.Day
          Days of the week.
 
Method Summary
 void addFrame(int startTime, int endTime, TimeFrame.Day... days)
          Adds a period to this TimeFrame.
 

Method Detail

addFrame

void addFrame(int startTime,
              int endTime,
              TimeFrame.Day... days)
              throws java.lang.IllegalArgumentException
Adds a period to this TimeFrame.

For example, to add to a TimeFrame the period on Sundays between 1AM and 4PM:
addFrame (1, 16, Day.SUNDAY);

To add to a TimeFrame the period on Sundays, Mondays, Tuesdays between 2PM and 4PM:
addFrame (14, 16, Day.SUNDAY, Day.MONDAY, Day.TUESDAY);

Parameters:
startTime - a short integer between 0 and 24.
endTime - a short integer between 0 and 24.
days - a day or a comma-separated list of days.
Throws:
java.lang.IllegalArgumentException - if the start time is later than the end time or the days are invalid.


Documentation Feedback
Copyright 2010 Hewlett-Packard Development Company, L.P.