- See Also:
UserAlertSubscription
Type | Field |
static int |
TYPEID
Type id for the Alert Service |
static java.lang.String |
TYPENAME
Type name for the Alert service |
TYPENAME
public static final java.lang.String TYPENAME
- Type name for the Alert service
TYPEID
public static final int TYPEID
- Type id for the Alert Service
getId
public long getId()
- Get the id for the alert service
- Specified by:
getId
in interface ModelObject
- Returns:
- long Id of the alert service
getName
public java.lang.String getName()
- Get the alert service name
- Specified by:
getName
in interface ModelObject
- Returns:
- String Name of the Alert service
getMasterAlertService
public MasterAlertService getMasterAlertService()
- Get the master alert service object
- Returns:
- MasterAlertService returns the master alert service
getInputParameters
public AlertInputParamMeta[] getInputParameters()
throws PanamaException
- Get the input parameters
- Returns:
- AlertInputParamMeta[] returns an array of input parameters
getConditionDefinitions
public AlertConditionMeta[] getConditionDefinitions()
throws PanamaException
- Get the conditions defined for the Alert service
- Returns:
- AlertConditionMeta[] return an array of condition definitions
setName
public void setName(java.lang.String name)
- Set the name of the alert service
- Specified by:
setName
in interface ModelObject
- Throws:
PanamaException
- when setting failed
getUserAlertSubscriptions
public UserAlertSubscription[] getUserAlertSubscriptions(User user)
- Get the User alert subscriptions for this user
- Parameters:
user
- The user object- Returns:
- UserAlertSubscription[] array of subscription objects
addUserAlertSubscription
public UserAlertSubscription addUserAlertSubscription(User user)
throws PanamaException
- Add a new user alert subscription for this alert service
- Parameters:
user
- The user for this this subscription is createdAlertInputParamValue[]
- The alert input param arrayAlertConditionValue[]
- The alert input condition array- Returns:
- UserAlertSubscription
The user alert subscription object
removeUserAlertSubscription
public void removeUserAlertSubscription(UserAlertSubscription sub)
throws PanamaException
- Remove the user alert subscription
- Parameters:
UserAlertSubscription
- The subscription object to remove- Throws:
PanamaException
- Exception thrown when remove failed
suspendUserAlertSubscription
public void suspendUserAlertSubscription(UserAlertSubscription sub)
throws PanamaException
- Suspend user alert subscription
- Parameters:
UserAlertSubscription
- The subscription object to suspend- Throws:
PanamaException
- Exception thrown when suspend operation failed
resumeUserAlertSubscription
public void resumeUserAlertSubscription(UserAlertSubscription sub)
throws PanamaException
- Resume the user alert subscription
- Parameters:
UserAlertSubscription
- The subscription object to remove- Throws:
PanamaException
- Exception thrown when resume operation failed
setUserAlertDevice
public void setUserAlertDevice(DeviceAddress deviceAddress)
throws PanamaException
- Set user alert device for this alert service
Add or Update user alert device setting, user should have only
one alert device per service
- Parameters:
deviceAddress
- The alert address of the user
getUserAlertDevice
public DeviceAddress getUserAlertDevice(User user)
throws PanamaException
removeUserAlertDevice
public void removeUserAlertDevice(User user)
throws PanamaException
save
public void save()
lookupUserAlertSubscription
public UserAlertSubscription lookupUserAlertSubscription(User user,
long subscriptionId)
throws PanamaException
- Lookup a subscrption object
- Parameters:
user
- the user owning the subscriptionsubscriptionId
- the id of the subscription- Throws:
PanamaException
- if the UserAlertSubscription
cannot be found
getParentTopics
public Topic[] getParentTopics()
throws PanamaException
- Gets the list of topics to which this alert service belongs to
- Throws:
PanamaException
- on error
getGroups
public Group[] getGroups()
- Returns the groups which can access this Alert Service