|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.stratelia.silverpeas.notificationManager.AbstractNotification
com.stratelia.silverpeas.notificationManager.NotificationManager
public class NotificationManager
Class declaration
Field Summary | |
---|---|
static String |
FROM_EMAIL
|
static String |
FROM_NAME
|
static String |
FROM_NO
|
static String |
FROM_UID
|
Fields inherited from interface com.stratelia.silverpeas.notificationManager.NotificationParameterNames |
---|
ATTACHMENTID, COMMUNICATION, DATE, FROM, HIDESMTPHEADERFOOTER, LANGUAGE, LINKLABEL, SERVERURL, SESSIONID, SOURCE, SUBJECT, URL |
Constructor Summary | |
---|---|
NotificationManager(String language)
|
Method Summary | |
---|---|
void |
addAddress(int aNotificationAddressId,
int aUserId)
|
protected void |
closeSchema(NotifSchema schema)
|
protected List<DelayedNotificationData> |
createAllDelayedNotificationData(NotificationParameters params,
String aUserId,
NotifSchema schema)
|
protected NotificationData |
createNotificationData(NotificationParameters params,
String aUserId,
NotifSchema schema)
Method declaration |
void |
deleteAllAddress(int userId)
Method declaration |
void |
deleteNotifAddress(int aNotificationAddressId)
Method declaration |
void |
deletePreference(int aPreferenceId)
Method declaration |
protected List<NotifAddressRow> |
getAllNotifAddressRow(NotificationParameters params,
int aUserId,
NotifSchema schema)
|
String |
getComponentFullName(String compInst)
Method declaration |
String |
getComponentFullName(String compInst,
String separator,
boolean isPathToComponent)
Method declaration |
int |
getDefaultAddress(int aUserId)
Method declaration |
ArrayList<Properties> |
getDefaultAddresses(int aUserId)
|
protected List<Integer> |
getDefaultNotificationAddresses()
|
protected NotifAddressRow |
getNotifAddressRow(NotificationParameters params,
int aUserId,
NotifSchema schema)
Method declaration |
ArrayList<Properties> |
getNotifChannels()
get All the channel types from the database. |
Properties |
getNotificationAddress(int aNotificationAddressId,
int aUserId)
Method declaration |
ArrayList<Properties> |
getNotificationAddresses(int aUserId)
get the notifications addresses of a user |
Properties |
getNotifPreference(int aPrefId,
int aUserId)
Method declaration |
ArrayList<Properties> |
getNotifPreferences(int aUserId)
get the notifications preferences of a user |
ArrayList<Properties> |
getNotifPriorities()
get All the priorities types |
ArrayList<Properties> |
getNotifUsages()
get All the usage types |
protected String |
getSureString(String s)
|
protected UserAccessLevel |
getUserAccessLevel(int userId)
|
protected String |
getUserEmail(int userId)
|
protected String |
getUserFullName(int userId)
|
Collection<UserRecipient> |
getUsersFromGroup(String groupId)
Gets the user recipients from a group specified by a given identifier. |
protected boolean |
isDefaultAddress(int aDefaultAddressId,
int aUserId,
NotifSchema schema,
boolean isMultiChannelNotification)
|
boolean |
isMultiChannelNotification()
|
protected Properties |
notifAddressRowToProperties(NotifAddressRow nar,
boolean canEdit,
boolean canDelete,
boolean canTest,
boolean isDefault,
NotifSchema schema)
Method declaration |
protected Properties |
notifPreferencesRowToProperties(int aUserId,
NotifPreferenceRow npr,
boolean canEdit,
boolean canDelete,
boolean canTest,
boolean isDefault,
NotifSchema schema)
Method declaration |
void |
notifyExternals(NotificationParameters params,
Collection<ExternalRecipient> externals)
|
void |
notifyUsers(NotificationParameters params,
String[] userIds)
Method declaration |
void |
saveNotifAddress(int aNotificationAddressId,
int aUserId,
String aNotifName,
int aChannelId,
String aAddress,
String aUsage)
Method declaration |
void |
savePreferences(int aUserId,
int aInstanceId,
int aMessageType,
int aDestinationId)
Method declaration |
void |
setDefaultAddress(int aNotificationAddressId,
int aUserId)
Method declaration |
void |
testNotifAddress(int aNotificationAddressId,
int aUserId)
Send a test message to the given notification address Id |
Methods inherited from class com.stratelia.silverpeas.notificationManager.AbstractNotification |
---|
computeURL, computeURL, getApplicationURL, getUserAutoRedirectSilverpeasServerURL, getUserAutoRedirectURL, getUserAutoRedirectURL |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String FROM_NO
public static final String FROM_UID
public static final String FROM_EMAIL
public static final String FROM_NAME
Constructor Detail |
---|
public NotificationManager(String language)
Method Detail |
---|
public ArrayList<Properties> getNotificationAddresses(int aUserId) throws NotificationManagerException
aUserId
- : id of the user as in the "id" field of "ST_USER" table.
NotificationManagerException
public Properties getNotificationAddress(int aNotificationAddressId, int aUserId) throws NotificationManagerException
aNotificationAddressId
-
NotificationManagerException
public ArrayList<Properties> getDefaultAddresses(int aUserId) throws NotificationManagerException
NotificationManagerException
public int getDefaultAddress(int aUserId) throws NotificationManagerException
aUserId
-
NotificationManagerException
public ArrayList<Properties> getNotifPriorities()
public ArrayList<Properties> getNotifUsages()
public ArrayList<Properties> getNotifChannels() throws NotificationManagerException
NotificationManagerException
public ArrayList<Properties> getNotifPreferences(int aUserId) throws NotificationManagerException
aUserId
- : id of the user as in the "id" field of "ST_USER" table.
NotificationManagerException
public Properties getNotifPreference(int aPrefId, int aUserId) throws NotificationManagerException
aUserId
-
NotificationManagerException
public void setDefaultAddress(int aNotificationAddressId, int aUserId) throws NotificationManagerException
aNotificationAddressId
- aUserId
-
NotificationManagerException
public void addAddress(int aNotificationAddressId, int aUserId) throws NotificationManagerException
NotificationManagerException
public void savePreferences(int aUserId, int aInstanceId, int aMessageType, int aDestinationId) throws NotificationManagerException
aUserId
- aInstanceId
- aMessageType
- aDestinationId
-
NotificationManagerException
public void saveNotifAddress(int aNotificationAddressId, int aUserId, String aNotifName, int aChannelId, String aAddress, String aUsage) throws NotificationManagerException
aNotificationAddressId
- aUserId
- aNotifName
- aChannelId
- aAddress
- aUsage
-
NotificationManagerException
public void deletePreference(int aPreferenceId) throws NotificationManagerException
aPreferenceId
-
NotificationManagerException
public void deleteNotifAddress(int aNotificationAddressId) throws NotificationManagerException
aNotificationAddressId
-
NotificationManagerException
public void deleteAllAddress(int userId) throws NotificationManagerException
userId
-
NotificationManagerException
public void testNotifAddress(int aNotificationAddressId, int aUserId) throws NotificationManagerException
aNotificationAddressId
- of the table ST_NotifAddress row to send notification to.
NotificationManagerException
public void notifyUsers(NotificationParameters params, String[] userIds) throws NotificationManagerException
params
-
NotificationManagerException
public void notifyExternals(NotificationParameters params, Collection<ExternalRecipient> externals) throws NotificationManagerException
NotificationManagerException
public Collection<UserRecipient> getUsersFromGroup(String groupId) throws NotificationManagerException
NotificationManagerException
public String getComponentFullName(String compInst) throws NotificationManagerException
compInst
-
NotificationManagerException
public String getComponentFullName(String compInst, String separator, boolean isPathToComponent) throws NotificationManagerException
compInst
- separator
- isPathToComponent
-
NotificationManagerException
protected String getUserEmail(int userId)
protected UserAccessLevel getUserAccessLevel(int userId)
protected String getUserFullName(int userId)
protected Properties notifPreferencesRowToProperties(int aUserId, NotifPreferenceRow npr, boolean canEdit, boolean canDelete, boolean canTest, boolean isDefault, NotifSchema schema) throws UtilException, NotificationManagerException
aUserId
- npr
- canEdit
- canDelete
- canTest
- isDefault
- schema
-
UtilException
NotificationManagerException
protected Properties notifAddressRowToProperties(NotifAddressRow nar, boolean canEdit, boolean canDelete, boolean canTest, boolean isDefault, NotifSchema schema) throws UtilException
nar
- canEdit
- canDelete
- canTest
- isDefault
- schema
-
UtilException
protected NotifAddressRow getNotifAddressRow(NotificationParameters params, int aUserId, NotifSchema schema) throws UtilException
params
- aUserId
- schema
-
UtilException
protected List<NotifAddressRow> getAllNotifAddressRow(NotificationParameters params, int aUserId, NotifSchema schema) throws UtilException
UtilException
protected NotificationData createNotificationData(NotificationParameters params, String aUserId, NotifSchema schema) throws UtilException
params
- aUserId
- schema
-
UtilException
protected List<DelayedNotificationData> createAllDelayedNotificationData(NotificationParameters params, String aUserId, NotifSchema schema) throws UtilException
UtilException
protected boolean isDefaultAddress(int aDefaultAddressId, int aUserId, NotifSchema schema, boolean isMultiChannelNotification) throws UtilException
UtilException
protected String getSureString(String s)
protected void closeSchema(NotifSchema schema)
public boolean isMultiChannelNotification()
NotificationManagerSettings.isMultiChannelNotificationEnabled()
protected List<Integer> getDefaultNotificationAddresses()
NotificationManagerSettings.getDefaultChannels()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |