Oracle Application Server Wireless Java API Reference
B10400-01

oracle.panama.presence.model
Interface Presence


public interface Presence

The Presence interface represents a presence profile (contact rule) for a user. A presence profile describes how a user wishes to be contacted by different communication types.


Field Summary
static int ACTION_DO_NOT_SEND_MSG
          Notification action.
static int ACTION_SEND_MSG_LATER
          Notification action.
static int ACTION_SEND_MSG_NOW
          Notification action.
static int DELAY_MSG_DURING_BLACKOUT
          Delivery action during blackout.
static int DISCARD_MSG_DURING_BLACKOUT
          Delivery action during blackout.
static int EMAIL_CHANNEL
          Channel type.
static int FAX_CHANNEL
          Channel type.
static int IM_CHANNEL
          Channel type.
static int MESSAGING_CHANNEL
          Channel type.
static int MMS_CHANNEL
          Channel type.
static int SMS_CHANNEL
          Channel type.
static int TYPEID
          The type id of this class.
static java.lang.String TYPENAME
          The constant class type identifier.
static int UNASSIGNED_ID
          When particular communication type is not available/used, its corresponding device address ID is set to this constant.
static int VOICE_CHANNEL
          Channel type.

 

Method Summary
 int canSend()
          Before sending any alert/notification, sender needs to call this method to determine whether it is fine to send an alert/notification.
 int getDeliveryAction()
          Return the delivery action for notifications generated outside the delivery period.
 DeliveryPeriod getDeliveryPeriod()
          Return the delivery period for notifications.
 DeviceAddress getEmailDeviceAddress()
          Return the device address for email communication.
 long getEmailDeviceAddressID()
          Return the ID of the device address for email communication.
 DeviceAddress getFaxDeviceAddress()
          Return the device address for fax communication.
 long getFaxDeviceAddressID()
          Return the ID of the device address for fax communication.
 long getID()
          Return the presence's ID.
 DeviceAddress getMessagingDeviceAddress()
          Return the device address for messaging (including SMS, IM).
 long getMessagingDeviceAddressID()
          Return the ID of the device address for messaging (including SMS, IM).
 java.lang.String getName()
          Return the presence's name.
 DeviceAddress getPrimaryNotificationDeviceAddress()
          Return the primary device address for notification.
 int getPrimaryNotificationType()
          Return the primary notification type.
 DeviceAddress getSMSDeviceAddress()
          Return the device address for SMS.
 long getSMSDeviceAddressID()
          Return the ID of the device address for SMS.
 long getUserID()
          Return the ID of the user who owns this presence profile.
 DeviceAddress getVoiceDeviceAddress()
          Return the device address for voice communication.
 long getVoiceDeviceAddressID()
          Return the ID of the device address for voice communication.
 void setDeliveryAction(int action)
          Set the delivery action for notifications generated outside the delivery period.
 void setDeliveryPeriod(DeliveryPeriod dp)
          Set the delivery period for notifications.
 void setEmailDeviceAddress(DeviceAddress emailDevAddr)
          Set the device address for email communication.
 void setEmailDeviceAddress(long emailDevAddrID)
          Set the device address for email communication.
 void setFaxDeviceAddress(DeviceAddress faxDevAddr)
          Set the device address for fax communication.
 void setFaxDeviceAddress(long faxDevAddrID)
          Set the device address for fax communication.
 void setMessagingDeviceAddress(DeviceAddress msgDevAddr)
          Set the device address for messaging.
 void setMessagingDeviceAddress(long msgDevAddrID)
          Set the device address for SMS.
 void setName(java.lang.String name)
          Set the presence's name.
 void setPrimaryNotificationType(int type)
          Set the primary notification type.
 void setSMSDeviceAddress(DeviceAddress msgDevAddr)
          Set the device address for SMS.
 void setSMSDeviceAddress(long msgDevAddrID)
          Set the device address for SMS.
 void setUserID(long userID)
          Set the user's ID of this presence.
 void setVoiceDeviceAddress(DeviceAddress voiceDevAddr)
          Set the device address for voice communication.
 void setVoiceDeviceAddress(long voiceDevAddrID)
          Set the device address for voice communication.

 

Field Detail

TYPENAME

public static final java.lang.String TYPENAME
The constant class type identifier.
See Also:
Constant Field Values

TYPEID

public static final int TYPEID
The type id of this class.
See Also:
Constant Field Values

UNASSIGNED_ID

public static final int UNASSIGNED_ID
When particular communication type is not available/used, its corresponding device address ID is set to this constant.
See Also:
Constant Field Values

VOICE_CHANNEL

public static final int VOICE_CHANNEL
Channel type.
See Also:
Constant Field Values

FAX_CHANNEL

public static final int FAX_CHANNEL
Channel type.
See Also:
Constant Field Values

EMAIL_CHANNEL

public static final int EMAIL_CHANNEL
Channel type.
See Also:
Constant Field Values

SMS_CHANNEL

public static final int SMS_CHANNEL
Channel type. This constant has the same value as MESSAGING_CHANNEL value.
See Also:
Constant Field Values

IM_CHANNEL

public static final int IM_CHANNEL
Channel type. This constant has the same value as MESSAGING_CHANNEL value.
See Also:
Constant Field Values

MMS_CHANNEL

public static final int MMS_CHANNEL
Channel type. This constant has the same value as MESSAGING_CHANNEL value.
See Also:
Constant Field Values

MESSAGING_CHANNEL

public static final int MESSAGING_CHANNEL
Channel type.
See Also:
Constant Field Values

DISCARD_MSG_DURING_BLACKOUT

public static final int DISCARD_MSG_DURING_BLACKOUT
Delivery action during blackout.
See Also:
Constant Field Values

DELAY_MSG_DURING_BLACKOUT

public static final int DELAY_MSG_DURING_BLACKOUT
Delivery action during blackout.
See Also:
Constant Field Values

ACTION_SEND_MSG_NOW

public static final int ACTION_SEND_MSG_NOW
Notification action.
See Also:
Constant Field Values

ACTION_SEND_MSG_LATER

public static final int ACTION_SEND_MSG_LATER
Notification action.
See Also:
Constant Field Values

ACTION_DO_NOT_SEND_MSG

public static final int ACTION_DO_NOT_SEND_MSG
Notification action.
See Also:
Constant Field Values
Method Detail

getID

public long getID()
Return the presence's ID.
Returns:
the presence's ID.

getName

public java.lang.String getName()
Return the presence's name.
Returns:
the presence's name.

getUserID

public long getUserID()
Return the ID of the user who owns this presence profile.
Returns:
the user's ID.

getVoiceDeviceAddress

public DeviceAddress getVoiceDeviceAddress()
Return the device address for voice communication.
Returns:
the voice device address.

getVoiceDeviceAddressID

public long getVoiceDeviceAddressID()
Return the ID of the device address for voice communication.
Returns:
the ID of the voice device address.

getFaxDeviceAddress

public DeviceAddress getFaxDeviceAddress()
Return the device address for fax communication.
Returns:
the fax device address.

getFaxDeviceAddressID

public long getFaxDeviceAddressID()
Return the ID of the device address for fax communication.
Returns:
the ID of the fax device address.

getEmailDeviceAddress

public DeviceAddress getEmailDeviceAddress()
Return the device address for email communication.
Returns:
the email device address.

getEmailDeviceAddressID

public long getEmailDeviceAddressID()
Return the ID of the device address for email communication.
Returns:
the ID of the email device address.

getSMSDeviceAddress

public DeviceAddress getSMSDeviceAddress()
Return the device address for SMS.
Returns:
the SMS device address.
See Also:
getMessagingDeviceAddress()

getMessagingDeviceAddress

public DeviceAddress getMessagingDeviceAddress()
Return the device address for messaging (including SMS, IM).
Returns:
the messaging device address.

getSMSDeviceAddressID

public long getSMSDeviceAddressID()
Return the ID of the device address for SMS.
Returns:
the ID of the SMS device address.
See Also:
getMessagingDeviceAddressID()

getMessagingDeviceAddressID

public long getMessagingDeviceAddressID()
Return the ID of the device address for messaging (including SMS, IM).
Returns:
the ID of the messaging device address.

getPrimaryNotificationDeviceAddress

public DeviceAddress getPrimaryNotificationDeviceAddress()
Return the primary device address for notification.
Returns:
the primary notification device address
See Also:
setPrimaryNotificationType.

getPrimaryNotificationType

public int getPrimaryNotificationType()
Return the primary notification type. Note: by default it is set to MESSAGING_CHANNEL.
Returns:
the type as either VOICE_CHANNEL, FAX_CHANNEL, EMAIL_CHANNEL, or MESSAGING_CHANNEL.
See Also:
setPrimaryNotificationType.

setName

public void setName(java.lang.String name)
Set the presence's name.
Parameters:
name - the presence's name.

setUserID

public void setUserID(long userID)
Set the user's ID of this presence.

setVoiceDeviceAddress

public void setVoiceDeviceAddress(DeviceAddress voiceDevAddr)
Set the device address for voice communication.
Parameters:
voiceDevAddr - the voice device address.

setVoiceDeviceAddress

public void setVoiceDeviceAddress(long voiceDevAddrID)
Set the device address for voice communication.
Parameters:
voiceDevAddrID - the ID of the voice device address.

setFaxDeviceAddress

public void setFaxDeviceAddress(DeviceAddress faxDevAddr)
Set the device address for fax communication.
Parameters:
faxDevAddr - the fax device address.

setFaxDeviceAddress

public void setFaxDeviceAddress(long faxDevAddrID)
Set the device address for fax communication.
Parameters:
faxDevAddrID - the ID of the fax device address.

setEmailDeviceAddress

public void setEmailDeviceAddress(DeviceAddress emailDevAddr)
Set the device address for email communication.
Parameters:
emailDevAddr - the email device address.

setEmailDeviceAddress

public void setEmailDeviceAddress(long emailDevAddrID)
Set the device address for email communication.
Parameters:
emailDevAddrID - the ID of the email device address.

setSMSDeviceAddress

public void setSMSDeviceAddress(DeviceAddress msgDevAddr)
Set the device address for SMS.
Parameters:
msgDevAddr - the SMS device address.
See Also:
setMessagingDeviceAddress(DeviceAddress)

setSMSDeviceAddress

public void setSMSDeviceAddress(long msgDevAddrID)
Set the device address for SMS.
Parameters:
msgDevAddrID - the ID of the SMS device address.
See Also:
setMessagingDeviceAddress(long)

setMessagingDeviceAddress

public void setMessagingDeviceAddress(DeviceAddress msgDevAddr)
Set the device address for messaging.
Parameters:
msgDevAddr - the messaging device address.

setMessagingDeviceAddress

public void setMessagingDeviceAddress(long msgDevAddrID)
Set the device address for SMS.
Parameters:
msgDevAddrID - the ID of the messaging device address.

setPrimaryNotificationType

public void setPrimaryNotificationType(int type)
Set the primary notification type. By default, type is set to MESSAGING_CHANNEL.
Parameters:
type - the type as either VOICE_CHANNEL, FAX_CHANNEL, EMAIL_CHANNEL, or MESSAGING_CHANNEL.

getDeliveryPeriod

public DeliveryPeriod getDeliveryPeriod()
Return the delivery period for notifications.
Returns:
the delivery period.

setDeliveryPeriod

public void setDeliveryPeriod(DeliveryPeriod dp)
Set the delivery period for notifications.

getDeliveryAction

public int getDeliveryAction()
Return the delivery action for notifications generated outside the delivery period.
Returns:
DISCARD_MSG_DURING_BLACKOUT or DELAY_MSG_DURING_BLACKOUT.

setDeliveryAction

public void setDeliveryAction(int action)
Set the delivery action for notifications generated outside the delivery period.
Parameters:
action - either DISCARD_MSG_DURING_BLACKOUT or DELAY_MSG_DURING_BLACKOUT.

canSend

public int canSend()
Before sending any alert/notification, sender needs to call this method to determine whether it is fine to send an alert/notification. This method determines based on the current time in comparison to the specified delivery period (if any), and the maximum number of alerts per day setting. In addition, this method also keeps track how many alerts have been generated for the day by internally maintaining an alert counter and last alert timestamp, of which values are also persisted into the database. Possible return value is as following:
Returns:
one of ACTION_SEND_MSG_NOW, ACTION_SEND_MSG_LATER, ACTION_DO_NOT_SEND_MSG.

Oracle Application Server Wireless Java API Reference
B10400-01

Copyright © 2003 Oracle Corporation. All Rights Reserved.