Package org.netxms.client.events
Class TimeFrame
java.lang.Object
org.netxms.client.events.TimeFrame
Time frame configuration
 
 Server format: time has format: startHours startMinutes endHours endMinutes dddddddd in int BCD format
 
 date has format: 12 bits of months form December to January, 7 bits of week days form Sunday to Monday, 31 dates of month + last
 bit is last day of month
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidfillMessage(NXCPMessage msg, long baseId) Fill NXCP messagelongboolean[]intintgetFormattedDateString(DateFormat dfTime, Locale locale) Format time frame to human readableboolean[]intintbooleanisAnyDay()Check if any date filter is selectedbooleanCheck if any time filter is selectedbooleanisNever()Check if this schedule will never be executedvoidupdate(int startHour, int startMinute, int endHour, int endMinute, boolean[] daysOfWeek, String daysOfMonth, boolean[] months) Update time frame with new data
- 
Field Details- 
DAYS_OF_THE_WEEK
- 
MONTHS
 
- 
- 
Constructor Details- 
TimeFramepublic TimeFrame()Default constructor
- 
TimeFramepublic TimeFrame(int time, long date) Constructor- Parameters:
- time- time form server
- date- date from server
 
- 
TimeFrameCopy constructor- Parameters:
- src- source object
 
 
- 
- 
Method Details- 
getFormattedDateStringFormat time frame to human readable- Parameters:
- dfTime- time format
- locale- loacale to use
- Returns:
- formatted and translated time frame string
 
- 
fillMessageFill NXCP message- Parameters:
- msg- NXCP message
- baseId- base field ID
 
- 
getStartMinutepublic int getStartMinute()- Returns:
- the startMinute
 
- 
getStartHourpublic int getStartHour()- Returns:
- the startHour
 
- 
getEndMinutepublic int getEndMinute()- Returns:
- the endMinute
 
- 
getEndHourpublic int getEndHour()- Returns:
- the endHour
 
- 
getDaysOfMonth- Returns:
- the daysOfMonth
 
- 
getDaysOfWeekpublic boolean[] getDaysOfWeek()- Returns:
- the daysOfWeek
 
- 
getMonthspublic boolean[] getMonths()- Returns:
- the months
 
- 
getDaysConfigurationpublic long getDaysConfiguration()- Returns:
- the daysConfiguration
 
- 
updatepublic void update(int startHour, int startMinute, int endHour, int endMinute, boolean[] daysOfWeek, String daysOfMonth, boolean[] months) throws TimeFrameFormatException Update time frame with new data- Parameters:
- startHour- start hour
- startMinute- start minute
- endHour- end hour
- endMinute- end minute
- daysOfWeek- selected days of week
- daysOfMonth- selected days of month
- months- selected months
- Throws:
- TimeFrameFormatException- exception in case of parsing error
 
- 
isAnyDaypublic boolean isAnyDay()Check if any date filter is selected- Returns:
- true if any date pass thought filter
 
- 
isAnyTimepublic boolean isAnyTime()Check if any time filter is selected- Returns:
- true if any time pass thought filter
 
- 
isNeverpublic boolean isNever()Check if this schedule will never be executed- Returns:
- true if this filter is equal to never execute
 
 
-