oracle.panama.alert
Interface UserAlertSubscription


public interface UserAlertSubscription

Interface exposing the user alert subscription attributes

Usage Example:


 	AlertInputParamValue[] apv = subs.getInputParameters();

 	for(int i=0; apv!=null && i


Method Summary
TypeMethod
 AlertService getAlertService()
           
 AlertConditionValue[] getConditions()
          Returns the conditions associated with the Subscription
 java.lang.String getDisplayName()
          Get Display name
 java.util.Calendar getExpirationDate()
          Get Subscription expiration date
 AlertTimeFrequency getFrequency()
          Returns the frequency with which Susbscription is scheduled to alert
 int getHour()
          Returns the hour for which the Susbscription is scheduled to alert
 long getId()
           
 AlertInputParamValue[] getInputParameters()
           
 int getMinute()
          Returns the minute for which the Susbscription is scheduled to alert
 User getUser()
           
 boolean isArmed()
          Checks if the subscription is active or subspended.
 void save()
          Commits any changes to the database.
 void setCondition(AlertInputParamValue[] params, AlertConditionValue[] conds)
          Set the condition
 void setCondition(AlertInputParamValue[] params, AlertConditionValue[] conds, java.util.Calendar expireAt)
          Set the condition with the expiration date set
 void setCondition(AlertInputParamValue[] params, AlertConditionValue[] conds, int hour, int minute, AlertTimeFrequency frequency)
          Set the condition for time alert case
 void setCondition(AlertInputParamValue[] params, AlertConditionValue[] conds, int hour, int minute, AlertTimeFrequency frequency, java.util.Calendar expireAt)
          Set the condition for time alert case with the expiration date set
 void setDisplayName(java.lang.String aDisplayName)
          Set display name
 void setExpirationDate(java.util.Calendar expireAt)
          Get Subscription expiration date
 void setFrequency(AlertTimeFrequency frequency)
          Set the alert frequency.
 void setHour(int hour)
          Set the hour of the next alert.
 void setMinute(int minute)
          Set the minute of the next alert.
 void updateTime(int hr, int min, AlertTimeFrequency frequency)
          Resets the hour, min and frequency of the time alert.
 void updateTime(int hr, int min, AlertTimeFrequency frequency, java.util.Calendar expireAt)
          Resets the hour, min and frequency of the time alert with expiration date set.
 

Method Detail

getId

public long getId()
Returns:
long the subscription id

getAlertService

public AlertService getAlertService()
Returns:
AlertService the alert service object

getUser

public User getUser()
Returns:
User The user owning this subscription

getInputParameters

public AlertInputParamValue[] getInputParameters()
Returns:
AlertInputParamValue[] array of the input param values for this subscription

getConditions

public AlertConditionValue[] getConditions()
Returns the conditions associated with the Subscription
Returns:
AlertConditionValue[] array of the condition values for this subscription

getHour

public int getHour()
Returns the hour for which the Susbscription is scheduled to alert
Returns:
int hour of next alert

setHour

public void setHour(int hour)
             throws PanamaException
Set the hour of the next alert. Regenerates the alert for the specified hour
Parameters:
hour - int containing the hour of the next alert

getMinute

public int getMinute()
Returns the minute for which the Susbscription is scheduled to alert
Returns:
int minute of next alert

setMinute

public void setMinute(int minute)
               throws PanamaException
Set the minute of the next alert. Regenerates the alert for the specified time minute
Parameters:
minute - int containing the minute of the next alert

getFrequency

public AlertTimeFrequency getFrequency()
Returns the frequency with which Susbscription is scheduled to alert
Returns:
AlertTimeFrequency The alert time frequency

setFrequency

public void setFrequency(AlertTimeFrequency frequency)
                  throws PanamaException
Set the alert frequency. Regenerates the alert for the specified time frequnecy
Parameters:
fequency - The Alert frequency

setCondition

public void setCondition(AlertInputParamValue[] params,
                         AlertConditionValue[] conds)
                  throws PanamaException
Set the condition
Parameters:
params - Array of parameter values
conds - Array of condition values

setCondition

public void setCondition(AlertInputParamValue[] params,
                         AlertConditionValue[] conds,
                         java.util.Calendar expireAt)
                  throws PanamaException
Set the condition with the expiration date set
Parameters:
params - Array of parameter values
conds - Array of condition values
expireAt - a Calendar object for subscription expiration date, if null means never expired

setCondition

public void setCondition(AlertInputParamValue[] params,
                         AlertConditionValue[] conds,
                         int hour,
                         int minute,
                         AlertTimeFrequency frequency)
                  throws PanamaException
Set the condition for time alert case
Parameters:
params - Array of parameter values
conds - Array of condition values
hour - the hour of next alert
min - the minute of next alert
frequency - the AlertFrequency of next alert
Throws:
PanamaException - when setCondition fails

setCondition

public void setCondition(AlertInputParamValue[] params,
                         AlertConditionValue[] conds,
                         int hour,
                         int minute,
                         AlertTimeFrequency frequency,
                         java.util.Calendar expireAt)
                  throws PanamaException
Set the condition for time alert case with the expiration date set
Parameters:
params - Array of parameter values
conds - Array of condition values
hour - the hour of next alert
min - the minute of next alert
frequency - the AlertFrequency of next alert
expireAt - a Calendar object for subscription expiration date, if null means never expired
Throws:
PanamaException - when set condition fails

updateTime

public void updateTime(int hr,
                       int min,
                       AlertTimeFrequency frequency)
                throws PanamaException
Resets the hour, min and frequency of the time alert. Regenerates the alert for the specified time coordinates
Throws:
PanamaException - when time updation failed

updateTime

public void updateTime(int hr,
                       int min,
                       AlertTimeFrequency frequency,
                       java.util.Calendar expireAt)
                throws PanamaException
Resets the hour, min and frequency of the time alert with expiration date set. Regenerates the alert for the specified time coordinates
Throws:
PanamaException - when time updation failed

isArmed

public boolean isArmed()
Checks if the subscription is active or subspended.
Returns:
boolean Returns true if it is active

getExpirationDate

public java.util.Calendar getExpirationDate()
Get Subscription expiration date
Returns:
null--never expired OR a calendar object

setExpirationDate

public void setExpirationDate(java.util.Calendar expireAt)
Get Subscription expiration date
Returns:
null--never expired OR a calendar object

getDisplayName

public java.lang.String getDisplayName()
Get Display name
Returns:
Display name

setDisplayName

public void setDisplayName(java.lang.String aDisplayName)
Set display name
Parameters:
aDisplayName - The display name of the subscription

save

public void save()
          throws PanamaException
Commits any changes to the database. Any update/create transaction must be ended with a save() The caching framework is not used.