com.crystaldecisions.sdk.plugin.desktop.event
Interface IEventBase

All Known Subinterfaces:
IEvent, IFileEvent, INotificationEvent, IScheduleEvent, IUserEvent

public interface IEventBase

The IEvent interface provides properties to set the general information for all events, including, name. description, and type of event. You can also retrieve the specific event object (FileEvent, ScheduleEvent, UserEvent) based on the type of event set in the IEvent interface.

Starting in version 4.0, specific event types are represented as sub-types of IEvent. Instead of the previous Event creation pattern:

 IEvent event = (IEvent) objs.add(IEvent.KIND);
 event.setEventType(CeEvents.USER);
 IUserEvent userEvent = (IUserEvent) event.getEventInterface();
 
Now you must create user events more directly:
 IUserEvent userEvent = (IUserEvent) objs.add(IUserEvent.SPECIFIC_KIND);
 IEvent event = (IEvent) userEvent;
 // Events created using specific kind can be cast to IEvent
 


Field Summary
static java.lang.String KIND
           The Kind used to query for Event objects.
static java.lang.String PROGID
          The ProgID for the Event Class.
 
Method Summary
 IAlertDeliveryConfigurations getAlertDeliveryConfigurationOverride()
          Returns the customized alert delivery settings that override the system alert delivery settings for this event.
 java.util.Set getAlertNotifications()
          Returns the IDs of the alert notifications triggered by this event.
 IAlertSubscriptions getAlertSubscriptions()
          Returns a list of alert subscriptions for this event.
 java.lang.String getDescription()
           Returns the description of the event.
 java.lang.Object getEventInterface()
          Deprecated. Cast to the specific event type interface instead.
 java.lang.String getEventName()
          Deprecated. Use IInfoObject.getTitle() instead.
 int getEventSourceID()
          Returns the ID of the source object for this event, or 0 if this event is not tied to a source object.
 int getEventType()
          Deprecated. Use IInfoObject.getSpecificKind() or IInfoObject.getSpecificProgID() instead.
 java.util.Set getExcludedSubscribers()
          Returns a set of IDs of the principals (users and groups) who are excluded from subscribing to this event.
 java.util.Date getNotificationEndTime()
           
 java.util.Date getNotificationStartTime()
           
 java.lang.String getNotificationTimeZone()
           
 java.lang.String getNotificationTimeZoneName()
           
 boolean hasAlertDeliveryConfigurationOverride()
          Returns whether or not this event uses customized alert delivery settings to override the default system alert delivery settings.
 boolean isAlertEnabled()
          Returns whether or not the event has been enabled for alerting.
 boolean isNotificationSendEmail()
           
 void removeAlertDeliveryConfigurationOverride()
          Removes the alert delivery configuration settings for this event.
 void setAlertEnabled(boolean enabled)
          Sets whether or not alerting is enabled for an event.
 void setDescription(java.lang.String newDescription)
           Sets the description of the event.
 void setEventName(java.lang.String newEventName)
          Deprecated. Use IInfoObject.setTitle(String) instead.
 void setEventType(int newEventType)
          Deprecated. Create events according to their specific type instead, for example a FileEvent object.
 void setNotificationEndTime(java.util.Date endTime)
           
 void setNotificationSendEmail(boolean sendEmail)
           
 void setNotificationStartTime(java.util.Date startTime)
           
 void setNotificationTimeZone(int timeZone)
           
 void setNotificationTimeZoneName(java.lang.String timeZoneName)
           
 void setSchedulableFlag(boolean isSchedulable)
           
 

Field Detail

KIND

static final java.lang.String KIND

The Kind used to query for Event objects.

See Also:
Constant Field Values

PROGID

static final java.lang.String PROGID

The ProgID for the Event Class.

ProgIDCrystalEnterprise.Event
Query CategoryCI_SYSTEMOBJECTS
Associated Interfacecom.crystaldecisions.sdk.plugin.desktop.event.IEvent

Query syntax:

SELECT
SI_DESCRIPTION, SI_NAME, SI_TYPE
FROM
CI_SYSTEMOBJECTS
WHERE
SI_PROGID='CrystalEnterprise.Event'

The CePropertyIDs named in the SELECT statement are those that are required to access data through the IEvent interface. For more information on their associations with the interface's methods, see IEvent

See Also:
Constant Field Values
Method Detail

getEventName

java.lang.String getEventName()
Deprecated. Use IInfoObject.getTitle() instead.

Returns the name of the event.

Returns:
A String containing the name of the event.
See Also:
IEventBase.setEventName(java.lang.String)
InfoObject properties to query for:
SI_NAME

setEventName

void setEventName(java.lang.String newEventName)
Deprecated. Use IInfoObject.setTitle(String) instead.

Sets the name of the event.

Parameters:
newEventName - A String containing the name of the event.
See Also:
IEventBase.getEventName()

getDescription

java.lang.String getDescription()

Returns the description of the event.

Returns:
A String containing the description of the event.
See Also:
IEventBase.setDescription(java.lang.String)
InfoObject properties to query for:
SI_DESCRIPTION

setDescription

void setDescription(java.lang.String newDescription)

Sets the description of the event.

Parameters:
newDescription - A String containing the description of the event.
See Also:
IEventBase.getDescription()

getEventType

int getEventType()
Deprecated. Use IInfoObject.getSpecificKind() or IInfoObject.getSpecificProgID() instead.

Returns the type of event.

Returns:
An int specifying the type of event.
See Also:
IEventBase.setEventType(int)
InfoObject properties to query for:
SI_TYPE

setEventType

void setEventType(int newEventType)
Deprecated. Create events according to their specific type instead, for example a FileEvent object.

Sets the type of event.

Parameters:
newEventType - An int specifying the type of event.
See Also:
IEventBase.getEventType()

getEventInterface

java.lang.Object getEventInterface()
                                   throws SDKException
Deprecated. Cast to the specific event type interface instead.

Returns the event interface. This interface allows modification of File, Schedule, and User event objects.

Returns:
An Object containing the event interface. This can be either an IFileEvent, IScheduleEvent, or IUserEvent.
Throws:
SDKException - This is thrown if the process is unsuccessful.
See Also:
IFileEvent, IScheduleEvent, IUserEvent
InfoObject properties to query for:
SI_TYPE

isAlertEnabled

boolean isAlertEnabled()
Returns whether or not the event has been enabled for alerting. Principals (users and groups) can subscribe to alerting-enabled events to receive alert notifications when the event is triggered.

Returns:
true if the event is alerting-enabled, false otherwise.
Since:
4.0
InfoObject properties to query for:
SI_ALERT_ENABLED

setAlertEnabled

void setAlertEnabled(boolean enabled)
                     throws SDKException
Sets whether or not alerting is enabled for an event. If an event is alerting-enabled, principals (users and groups) can subscribe to the event and receive an alert notification when the event is triggered.

Parameters:
enabled - true to enable alerting, false otherwise.
Throws:
SDKException
Since:
4.0

getAlertSubscriptions

IAlertSubscriptions getAlertSubscriptions()
                                          throws SDKException
Returns a list of alert subscriptions for this event. The alert subscriptions define the principals (users and groups) subscribed to this event.

Returns:
An IAlertSubscriptions object that represents the principals subscribed to this event.
Throws:
SDKException
Since:
4.0
InfoObject properties to query for:
SI_EVENT_SUBSCRIBERS

getExcludedSubscribers

java.util.Set getExcludedSubscribers()
                                     throws SDKException
Returns a set of IDs of the principals (users and groups) who are excluded from subscribing to this event.

Returns:
A Set object that contains the SI_ID properties of the excluded subscribers, stored as Integer objects.
Throws:
SDKException
Since:
4.0
InfoObject properties to query for:
SI_EVENT_EXCLUDED_SUBSCRIBERS

hasAlertDeliveryConfigurationOverride

boolean hasAlertDeliveryConfigurationOverride()
Returns whether or not this event uses customized alert delivery settings to override the default system alert delivery settings. Use this method before calling IEventBase.getAlertDeliveryConfigurationOverride(), which creates override alert delivery settings if none exist.

Returns:
true if override alert delivery settings are used, false if default system settings are used.
Since:
4.0
InfoObject properties to query for:
SI_ALERT_DELIVERY_CONFIG

getAlertDeliveryConfigurationOverride

IAlertDeliveryConfigurations getAlertDeliveryConfigurationOverride()
Returns the customized alert delivery settings that override the system alert delivery settings for this event. Some fields may be overridden, while others may default to system settings.

Note: Do not override and disable all of the available delivery destinations. Commit will fail.

Returns:
An IAlertDeliveryConfigurations object that contains alert delivery settings.
Since:
4.0
InfoObject properties to query for:
SI_ALERT_DELIVERY_CONFIG

removeAlertDeliveryConfigurationOverride

void removeAlertDeliveryConfigurationOverride()
Removes the alert delivery configuration settings for this event. When these settings are removed, the default system settings are used.

Since:
4.0

getAlertNotifications

java.util.Set getAlertNotifications()
                                    throws SDKException
Returns the IDs of the alert notifications triggered by this event. This is a read-only collection that cannot be modified.

Returns:
A Set object that contains the SI_ID properties of alert notifications stored as Integer objects.
Throws:
SDKException
Since:
4.0
InfoObject properties to query for:
SI_EVENT_ALERTNOTIFICATIONS

getEventSourceID

int getEventSourceID()
                     throws SDKException
Returns the ID of the source object for this event, or 0 if this event is not tied to a source object.

Returns:
The SI_ID property of the source object, or 0 if none exists.
Throws:
SDKException
Since:
4.0
See Also:
IEventSource
InfoObject properties to query for:
SI_EVENT_SOURCE

getNotificationStartTime

java.util.Date getNotificationStartTime()

getNotificationEndTime

java.util.Date getNotificationEndTime()

setNotificationEndTime

void setNotificationEndTime(java.util.Date endTime)

setNotificationStartTime

void setNotificationStartTime(java.util.Date startTime)

setNotificationTimeZone

void setNotificationTimeZone(int timeZone)

getNotificationTimeZone

java.lang.String getNotificationTimeZone()

setNotificationTimeZoneName

void setNotificationTimeZoneName(java.lang.String timeZoneName)

getNotificationTimeZoneName

java.lang.String getNotificationTimeZoneName()

setSchedulableFlag

void setSchedulableFlag(boolean isSchedulable)

setNotificationSendEmail

void setNotificationSendEmail(boolean sendEmail)

isNotificationSendEmail

boolean isNotificationSendEmail()