@Deprecated
public interface NotificationService
extends com.appiancorp.services.ContextSensitiveService
Notifications may be sent to users and groups, and can be configured to be sent to email or to the portal application, or both. The frequency with which notifications are sent to email, or the length of time that notifications persist in the portal application, are also configurable.
Methods of service classes can all throw the unchecked exception
ServiceException
if any
system-level error (for example, server failure) occurs, and will in general
throw a checked exception (InvalidXXXException
) when an entity
to be retrieved is inaccessible, instead of returning null
.
All checked exceptions extend
AppianException
.
All API's that use Application ID and Notification Type ID should only use
valid ID's that can be obtained by making a call to getApplications()
It may be necessary to retrieve a subset of results as opposed to an entire
collection, and also to sort the subset by some property of the returned
object. "Paging" methods which return a
ResultPage
are provided in certain
instances for this purpose. The ResultPage
will contain the
sorted subset of results
(via Result.getResults()
), and the
total number of items in the available result set
(via ResultPage.getAvailableItems()
).
It may also be necessary to retrieve some results, even if all results
cannot be retrieved (for instance, some of the entities corresponding
to a list of entity IDs may no longer exist). Methods which return a
ResultList
are provided for this
purpose. The Result.getResults()
method in this case will return all results which can be retrieved. In
addition, there will be a list of result codes
(ResultList.getResultCodes()
) that
represent the successful retrieval of an entity, or, if the entity could
not be retrieved, the reason for the failure. See the CODE_XXX
constants in ResultList
for details.
Notification
,
NotificationRule
,
Attribute
,
Medium
,
PortalNotificationService
Modifier and Type | Field and Description |
---|---|
static boolean |
getApplicationName$UPDATES
Deprecated.
|
static boolean |
getApplications$UPDATES
Deprecated.
|
static boolean |
getApplicationsPaging$UPDATES
Deprecated.
|
static boolean |
getDefaultFormat$UPDATES
Deprecated.
|
static boolean |
getMedia$UPDATES
Deprecated.
|
static boolean |
getMediaForType$UPDATES
Deprecated.
|
static boolean |
getMediaForTypePaging$UPDATES
Deprecated.
|
static boolean |
getMediaPaging$UPDATES
Deprecated.
|
static boolean |
getNotificationCustomAttributes$UPDATES
Deprecated.
|
static boolean |
getNotificationCustomAttributesPaging$UPDATES
Deprecated.
|
static boolean |
getTypePrefsForUser$UPDATES
Deprecated.
|
static boolean |
getTypePrefsForUserPaging$UPDATES
Deprecated.
|
static boolean |
getWorkspace$UPDATES
Deprecated.
|
static boolean |
notify$UPDATES
Deprecated.
|
static boolean |
saveNotificationRuleForUser$UPDATES
Deprecated.
|
static boolean |
setDefaultFormat$UPDATES
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getApplicationName()
Deprecated.
Gets the name of the application on which this service is running.
|
Application[] |
getApplications()
Deprecated.
|
ResultPage |
getApplicationsPaging(int startPosition_,
int batchSize_,
java.lang.Integer sortProperty_,
java.lang.Integer sortOrder_)
Deprecated.
Returns all registered
Application objects |
java.lang.String |
getDefaultFormat(java.lang.String name_)
Deprecated.
Since i18n, the notifications server no longer formats
dates (the raw timestamps are sent to the JSPs), so no formats
should be set on the server.
|
Medium[] |
getMedia()
Deprecated.
use
getMediaPaging(int, int, Integer, Integer) instead |
Medium[] |
getMediaForType(int typeId_)
Deprecated.
|
ResultPage |
getMediaForTypePaging(int typeId_,
int startPosition_,
int batchSize_,
java.lang.Integer sortProperty_,
java.lang.Integer sortOrder_)
Deprecated.
Gets the media to which
Notification s of the specified type
can be sent. |
ResultPage |
getMediaPaging(int startPosition_,
int batchSize_,
java.lang.Integer sortProperty_,
java.lang.Integer sortOrder_)
Deprecated.
Gets the media to which
Notification s can be sent. |
Attribute[] |
getNotificationCustomAttributes(int typeId_)
Deprecated.
|
ResultPage |
getNotificationCustomAttributesPaging(int typeId_,
int startPosition_,
int batchSize_,
java.lang.Integer sortProperty_,
java.lang.Integer sortOrder_)
Deprecated.
Get
Notification custom attribute values |
NotificationRule[] |
getTypePrefsForUser(java.lang.String user_,
int appId_,
int typeId_)
Deprecated.
|
ResultPage |
getTypePrefsForUserPaging(java.lang.String user_,
int appId_,
int typeId_,
int startPosition_,
int batchSize_,
java.lang.Integer sortProperty_,
java.lang.Integer sortOrder_)
Deprecated.
Gets the user preferences for the
Notification type |
java.lang.String[] |
getWorkspace()
Deprecated.
Gets the current memory profile for the workspace.
|
void |
notify(java.lang.String[] users_,
java.lang.Long[] groups_,
java.lang.String appName_,
java.lang.String ntfType_,
java.util.Map attributes_)
|
void |
saveNotificationRuleForUser(java.lang.String user_,
int type_,
int[] media_,
java.lang.String[] conditions_,
java.lang.String[] settings_)
Deprecated.
Saves the
Notification rules for the given user |
void |
saveNotificationRuleForUser(java.lang.String user_,
int type_,
int[] media_,
java.lang.String[] conditions_,
java.lang.String[] settings_,
java.util.List<java.lang.Integer> hiddenMedia)
Deprecated.
|
void |
setDefaultFormat(java.lang.String name_,
java.lang.String format_)
Deprecated.
Since i18n, the notifications server no longer formats
dates (the raw timestamps are sent to the JSPs), therefore this
method no longer affects the formatting.
|
static final boolean getApplications$UPDATES
static final boolean getNotificationCustomAttributes$UPDATES
static final boolean getMedia$UPDATES
static final boolean getMediaForType$UPDATES
static final boolean getTypePrefsForUser$UPDATES
static final boolean saveNotificationRuleForUser$UPDATES
static final boolean notify$UPDATES
static final boolean getApplicationsPaging$UPDATES
static final boolean getNotificationCustomAttributesPaging$UPDATES
static final boolean getMediaPaging$UPDATES
static final boolean getMediaForTypePaging$UPDATES
static final boolean getTypePrefsForUserPaging$UPDATES
static final boolean getApplicationName$UPDATES
static final boolean getWorkspace$UPDATES
static final boolean getDefaultFormat$UPDATES
static final boolean setDefaultFormat$UPDATES
@Deprecated Application[] getApplications()
getApplicationsPaging(int, int, Integer, Integer)
insteadApplication
objects.Application
with names, IDs and
notification types for the application. The notification types and
application names are listed in PortalNotificationService
.ServiceException
- if any system-level error occurs@Deprecated Attribute[] getNotificationCustomAttributes(int typeId_)
getNotificationCustomAttributesPaging(int,int,int,Integer,Integer)
insteadAttribute
objects for specified
Notification
type.typeId_
- ID of the Notification
type.Attribute
objects, each of which contains
the parameters for the specified Notification
type. See
PortalNotificationService.notify(java.lang.String[], java.lang.Long[], java.lang.String, java.lang.String, java.util.Map)
for the list of custom attributes
per notification type. Each attribute
will have its label
field populated with the appropriate
value.ServiceException
- if any system-level error occurs@Deprecated Medium[] getMedia()
getMediaPaging(int, int, Integer, Integer)
insteadNotification
s can be sent.Medium
, which contains the medium name,
id and options. Currently the generic options are not used.
Timing is currently the only specific option, i.e. the interval of time to
wait until the Notification
is sent which can be immediately,
hourly, daily, weekly.ServiceException
- if any system-level error occurs@Deprecated Medium[] getMediaForType(int typeId_)
getMediaForTypePaging(int, int, int, Integer, Integer)
insteadNotification
s of the specified type
can be sent.typeId_
- ID of the Notification
typeMedium
, which contains the medium name,
ID and options. Currently the generic options are not used.
Timing is currently the only specific option, i.e. the interval of time to
wait until the notification is sent, which can be immediately, hourly,
daily, weekly.ServiceException
- if any system-level error occurs@Deprecated NotificationRule[] getTypePrefsForUser(java.lang.String user_, int appId_, int typeId_)
getTypePrefsForUserPaging(String, int, int, int, int, Integer, Integer)
insteadNotification
typeuser_
- the username of the User
whose preferences are
to be retrievedappId_
- the ID of the Application
of the
Notification
typetypeId_
- the ID of the Notification
type, which will be
unique across applicationsNotificationRule
with the Application
ID
and name, the Notification
type ID and name,
the Medium
ID and name, and the conditions.
The "conditions" is a double array of strings, where every row is a
String[3] with comparison operator id, attribute ID and value
against which the Attribute
value will be comparedServiceException
- if any system-level error occursvoid saveNotificationRuleForUser(java.lang.String user_, int type_, int[] media_, java.lang.String[] conditions_, java.lang.String[] settings_)
Notification
rules for the given useruser_
- the username of the usertype_
- the ID of the Notification
type.media_
- the IDs of the media types. Use getMedia()
for valid
types. If conditions or settings differ in length from media, then media
determines the length of conditions and settings used.conditions_
- Each element in the string array will be comma-
separated triplets of comparison operator IDs, attribute ID, and
the values to compare against. If no conditions are being set, an empty
array should be passed. To see available attribute IDs and
operator IDs use
getNotificationCustomAttributesPaging(int, int, int, Integer,
Integer)
and browse the returned
Attribute
object.settings_
- the time intervals at which all Notification
will be sent. If no time intervals are being set, an empty
array should be passed.
The array size depends on the number of rules (see NotificationRule
) for
given notification type. Each element of an array is a string of comma
separated triplet: ",type,parameter"
.
The first value is always empty. The type is one of constant values of
OPTION_XXX in com.appiancorp.ap2.ns.Option
. If the Notification
media type is Portal the parameter specifies the number of days for the
message to persist. If the Notification media type is Email the parameter
specifies the timing of the email - 1: Immediate, 2: Hourly Bulk Email,
3: Daily Bulk Email, 4: Weekly Bulk Email.ServiceException
- if any system-level error occursvoid saveNotificationRuleForUser(java.lang.String user_, int type_, int[] media_, java.lang.String[] conditions_, java.lang.String[] settings_, java.util.List<java.lang.Integer> hiddenMedia)
@Deprecated void notify(java.lang.String[] users_, java.lang.Long[] groups_, java.lang.String appName_, java.lang.String ntfType_, java.util.Map attributes_) throws InvalidNotificationTypeException
PortalNotificationService.notify(java.lang.String[], java.lang.Long[], java.lang.String, java.lang.String, java.util.Map)
insteadusers_
- the usernames of those to be notified. If no users are to be
notified, this value should be an empty String
array, not
null
.groups_
- the groupIds of those to be notified. If no groups are to be
notified, this value should be an empty String
array, not
null
.appName_
- the Application
name of the
Notification
. See the
XXX_NOTIFICATION_APPLICATION
constants in
PortalNotificationService
for valid valuesntfType_
- the name of the Notification
type. See the
XXX_NOTIFICATION_TYPE
constants in
PortalNotificationService
for valid valuesattributes_
- the attributes of the notification. The map keys
correspond to Attribute
labels. For example, for the
PortalNotificationService.COLLABORATION_SEND_LINK_NOTIFICATION_TYPE
,
a key in the attribute map would be "sender"
The values of the keys are the values to be displayed in the
Notification
(eg. the sender's username).InvalidNotificationException
- if the Notification
does not existInvalidNotificationTypeException
- if an invalid Notification
type is specifiedServiceException
- if any system-level error occursgetNotificationCustomAttributes(int)
ResultPage getApplicationsPaging(int startPosition_, int batchSize_, java.lang.Integer sortProperty_, java.lang.Integer sortOrder_)
Application
objectsstartPosition_
- the index into the collection of total results at which to
start. Negative numbers are treated as zeros.batchSize_
- the number of results to return.
Use Constants.COUNT_ALL
to return
the entire collection, but this is STRONGLY discouraged.sortProperty_
- the property by which the results will be sorted. This is one of
the SORT_BY_XXX
constants in
Application
.sortOrder_
- The order in which to sort the returned
Application
objects. This is either
Constants.SORT_ORDER_ASCENDING
or
Constants.SORT_ORDER_DESCENDING
ResultPage
containing an array of
Application
objectsServiceException
- if any system-level error occursResultPage getNotificationCustomAttributesPaging(int typeId_, int startPosition_, int batchSize_, java.lang.Integer sortProperty_, java.lang.Integer sortOrder_)
Notification
custom attribute valuestypeId_
- ID of the Notification
type.startPosition_
- the index into the collection of total results at which to
start. Negative numbers are treated as zeros.batchSize_
- the number of results to return.
Use Constants.COUNT_ALL
to return
the entire collection, but this is STRONGLY discouraged.sortProperty_
- the property by which the results will be sorted. This is one of
the SORT_BY_XXX
constants in
Attribute
.sortOrder_
- The order in which to sort the returned
Attribute
objects. This is either
Constants.SORT_ORDER_ASCENDING
or
Constants.SORT_ORDER_DESCENDING
ResultPage
which contains the array of
Attribute
objectsServiceException
- if any system-level error occursResultPage getMediaPaging(int startPosition_, int batchSize_, java.lang.Integer sortProperty_, java.lang.Integer sortOrder_)
Notification
s can be sent.startPosition_
- the index into the collection of total results at which to
start. Negative numbers are treated as zeros.batchSize_
- the number of results to return.
Use Constants.COUNT_ALL
to return
the entire collection, but this is STRONGLY discouraged.sortProperty_
- the property by which the results will be sorted. This is one of
the SORT_BY_XXX
constants in Medium
.sortOrder_
- The order in which to sort the returned
Medium
objects. This is either
Constants.SORT_ORDER_ASCENDING
or
Constants.SORT_ORDER_DESCENDING
ResultPage
which contains the array of
Medium
objects
Currently the generic options are not used, and Timing is the only specific
option, i.e. the interval of time to wait until the
Notification
is sent which can be immediately, hourly,
daily, weekly.ServiceException
- if any system-level error occursResultPage getMediaForTypePaging(int typeId_, int startPosition_, int batchSize_, java.lang.Integer sortProperty_, java.lang.Integer sortOrder_)
Notification
s of the specified type
can be sent.typeId_
- ID of the Notification
typestartPosition_
- the index into the collection of total results at which to
start. Negative numbers are treated as zeros.batchSize_
- the number of results to return.
Use Constants.COUNT_ALL
to return
the entire collection, but this is STRONGLY discouraged.sortProperty_
- the property by which the results will be sorted. This is one of
the SORT_BY_XXX
constants in
Medium
.sortOrder_
- The order in which to sort the returned
Medium
objects. This is either
Constants.SORT_ORDER_ASCENDING
or
Constants.SORT_ORDER_DESCENDING
ResultPage
which contains the array of
Medium
, which contains the medium name, id and options.
Currently the generic options are not used, and Timing is the only
specific option, i.e. the interval of time to wait until the
Notification
is sent which can be immediately, hourly,
daily, weekly.ServiceException
- if any system-level error occursResultPage getTypePrefsForUserPaging(java.lang.String user_, int appId_, int typeId_, int startPosition_, int batchSize_, java.lang.Integer sortProperty_, java.lang.Integer sortOrder_)
Notification
typeuser_
- the username of the user whose preferences are
to be retrievedappId_
- ID of the Application
for the Notification
typetypeId_
- ID of the Notification
type, which will be unique across
all Application
objectsstartPosition_
- the index into the collection of total results at which to
start. Negative numbers are treated as zeros.batchSize_
- the number of results to return.
Use Constants.COUNT_ALL
to return
the entire collection, but this is STRONGLY discouraged.sortProperty_
- the property by which the results will be sorted. This is one of
the SORT_BY_XXX
constants in
NotificationRule
.sortOrder_
- The order in which to sort the returned
UserPreferences
objects. This is either
Constants.SORT_ORDER_ASCENDING
or
Constants.SORT_ORDER_DESCENDING
ResultPage
containing an array of
NotificationRule
with the Application
ID and name,
the Notification
type ID and name, the medium ID and name,
and the conditions. The conditions is a double array of strings, where
every row is a String[3] with comparison operator id, attribute id and
value against which the Attribute
value will be comparedServiceException
- if any system-level error occursjava.lang.String getApplicationName()
Application
ServiceException
- if any system-level error occursjava.lang.String[] getWorkspace()
ServiceException
- if any system-level error occurs@Deprecated java.lang.String getDefaultFormat(java.lang.String name_) throws java.security.InvalidParameterException, java.lang.NullPointerException
name_
- A string identifying the type of display format, one
of: "date", "time", or "timezone".java.security.InvalidParameterException
- if the name_
is not
recognizedjava.lang.NullPointerException
- if the name_
is null@Deprecated void setDefaultFormat(java.lang.String name_, java.lang.String format_) throws java.security.InvalidParameterException, java.lang.NullPointerException
name_
- A string identifying the type of display format, one
of: "date", "time", or "timezone".format_
- The display format to use for the given format name.java.security.InvalidParameterException
- if the name_
is not
recognizedjava.lang.NullPointerException
- if the name_
or
format_
is nullCopyright © 2003-2024 Appian Corporation. All Rights Reserved.