com.bea.wli.calendar.management
Interface BusinessCalendarMBean


public interface BusinessCalendarMBean

MBean for configuring business calendars.


Method Summary
 boolean calendarNameExists(String name)
          Checks if a calendar with the given name exists.
 void createCalendar(String cDoc)
          Creates a new calendar from the information passed in the CalendarDocument XML text.
 void deleteCalendar(String calendarName)
          Delete the calendar with the given name.
 void deleteCalendars(String[] names)
          Delete the named calendars.
 String[] getAllCalendarNames()
          Get the names of all calendars in the system.
 String[] getAllCalendars()
          Gets all calendars (as XML text that can be parsed into CalendarDocument), including rules info and mapped groups and users.
 int getAllCalendarsCount()
           
 String getCalendar(String calendarName)
          Retrieve the XML text for the calendar with the given name.
 String getGroupCalendar(String groupId)
          Get the calendar XML text for the calendar that is associated with the given group (or null if no such association has been set).
 String getSystemCalendar()
          Get the XML text for the system calendar if it exists.
 String getUserCalendar(String userId)
          Get the calendar XML text for the calendar that is associated with the given user (or null if no such association has been set).
 void setGroupCalendar(String groupId, String calendarName)
          Set the group's calendar.
 void setUserCalendar(String userId, String calendarName)
          Set the user's calendar.
 boolean systemCalendarExists()
          Does the system calendar exist yet?
 void unsetGroupCalendar(String groupId)
          Clear the mapping from the named group's profile to any calendar.
 void unsetUserCalendar(String userId)
          Clear the mapping of any calendar to the given user's profile.
 void updateCalendar(String oldCalendarName, String cDoc)
          Update the calendar - oldCalendarName, using the passed calendar XML text (from a CalendarDocument).
 void updateSystemCalendar(String cDoc)
          Update the system calendar using the passed calendar XML text (from a CalendarDocument).
 

Method Detail

calendarNameExists

boolean calendarNameExists(String name)
                           throws MBeanException
Checks if a calendar with the given name exists.

Parameters:
name -
Returns:
Throws:
MBeanException

createCalendar

void createCalendar(String cDoc)
                    throws MBeanException
Creates a new calendar from the information passed in the CalendarDocument XML text.

Parameters:
cDoc - The XML from a CalendarDocument instance.
Throws:
MBeanException - - if a calendar with the given name exists or of the document is not valid.

getCalendar

String getCalendar(String calendarName)
                   throws MBeanException
Retrieve the XML text for the calendar with the given name.

Parameters:
calendarName - Name of the calendar to retrieve XML for.
Returns:
The XML text (can be parsed into a CalendarDocument) or null if a calendar with the given name does not exist.
Throws:
MBeanException

updateCalendar

void updateCalendar(String oldCalendarName,
                    String cDoc)
                    throws MBeanException
Update the calendar - oldCalendarName, using the passed calendar XML text (from a CalendarDocument). The name of the calendar is also updated based on the name passed in. The 'new' calendar name is taken from the XML text for the calendar. Use updateSystemCalendar to update the system calendar.

Parameters:
oldCalendarName - The existing/old name of the calendar to be updated.
cDoc - The XML text for the calendar (from a CalendarDocument)
Throws:
MBeanException

updateSystemCalendar

void updateSystemCalendar(String cDoc)
                          throws MBeanException
Update the system calendar using the passed calendar XML text (from a CalendarDocument). If the name of the calendar is differnt than the name of the existing system calendar, then the existing system calendar is changed to non-system calendar. If a calendar with this name does not exist then it is created.

Parameters:
cDoc - The XML text for the calendar (from a CalendarDocument)
Throws:
MBeanException

deleteCalendar

void deleteCalendar(String calendarName)
                    throws MBeanException
Delete the calendar with the given name. If no calendar with the given name exists, this method simply returns.

Parameters:
calendarName - Name of the calendar to delete.
Throws:
MBeanException

deleteCalendars

void deleteCalendars(String[] names)
                     throws MBeanException
Delete the named calendars. This method ignores calendar names for calendars that do not exist.

Throws:
MBeanException

systemCalendarExists

boolean systemCalendarExists()
                             throws MBeanException
Does the system calendar exist yet?

Throws:
MBeanException

getSystemCalendar

String getSystemCalendar()
                         throws MBeanException
Get the XML text for the system calendar if it exists. If it does not exist, MBeanException is thrown.

Throws:
MBeanException

getAllCalendarNames

String[] getAllCalendarNames()
                             throws MBeanException
Get the names of all calendars in the system.

Throws:
MBeanException

getAllCalendars

String[] getAllCalendars()
                         throws MBeanException
Gets all calendars (as XML text that can be parsed into CalendarDocument), including rules info and mapped groups and users.

Throws:
MBeanException

setUserCalendar

void setUserCalendar(String userId,
                     String calendarName)
                     throws MBeanException
Set the user's calendar. Does not do anything if either the given user or the calendar does not exist. A user can have only one calendar, so if a calendar is already mapped to the user then it is unmapped.

Parameters:
userId -
calendarName -
Throws:
MBeanException

unsetUserCalendar

void unsetUserCalendar(String userId)
                       throws MBeanException
Clear the mapping of any calendar to the given user's profile.

Throws:
MBeanException

getUserCalendar

String getUserCalendar(String userId)
                       throws MBeanException
Get the calendar XML text for the calendar that is associated with the given user (or null if no such association has been set).

Throws:
MBeanException

setGroupCalendar

void setGroupCalendar(String groupId,
                      String calendarName)
                      throws MBeanException
Set the group's calendar. Does not do anything if either the given group or the calendar does not exist. A group can have only one calendar, so if a calendar is already mapped to the group then it is unmapped.

Throws:
MBeanException

unsetGroupCalendar

void unsetGroupCalendar(String groupId)
                        throws MBeanException
Clear the mapping from the named group's profile to any calendar.

Parameters:
groupId -
Throws:
MBeanException

getGroupCalendar

String getGroupCalendar(String groupId)
                        throws MBeanException
Get the calendar XML text for the calendar that is associated with the given group (or null if no such association has been set).

Throws:
MBeanException

getAllCalendarsCount

int getAllCalendarsCount()
                         throws MBeanException
Throws:
MBeanException