cancel
Showing results for 
Search instead for 
Did you mean: 

NotificationUtil

Former Member
0 Kudos

Hi all,

anyone ever used the NotificationUtil class. (com.frictionless.api.util.NotificationUtil). It seems as if it gives you the possibilty of sending out emails.

The class contains one function, i.e. sendNotification. This function requires some parameters. One of these parameters is notificationType (java.lang.Integer).

Anyone got a clue what this notificationType is?

Thanks,

Bram

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Bram,

According to the API guide, that is not a publically exposed class. Use it at your own peril, and do not expect your code to work in a future version of SAP Sourcing (including v7). Be very careful if you do not know what the class is used for...in this case it might not have anything to do with what you are trying to do, as the class might be closely coupled with other classes/functionality (e.g. the Discussions forum notifications).

The only thing I can see in the resource guide is the discussionsTNG.ThreadNotificationType enum, with the values

ID Name Display Name ID Display Name

0 NO_NOTIFICATION doc$discussions.notification_type.no_notification No Notification

1 NOTIFY_ALL_COLLABORATORS doc$discussions.notification_type.notify_all_collaborators Notify All Collaborators

2 NOTIFY_SELECTED_COLLABORATORS doc$discussions.notification_type.notify_selected_collaborators Notify Selected Collaborators

Instead of using this class, until SAP exposes a different method for sending emails/alerts I would recommend using the java.mail utilities. They work outside of the Sourcing system, but they are public APIs.

-Howie Wexler

www.craftysystems.com

Former Member
0 Kudos

Hi Howie,

I already played around with this class, just for fun btw, and it seems that the system tries to insert a row into the 'FCI_SYS_MESSAGE' column of the database. So it does seem as if it wants to send out an email.

The 'notificationType' parameter apparently is a reference to a 'mail type' (messaging.MailTypeEnum). However, when I enter a mailType Integer here, I got an 'ORA-01461 - can bind a long value only for insert into a long column' exception. When I for example enter an invalid number (0), it says: mail type does not exist.

It does seem to be some sort of interface for sending out email. Also, if the class is not publically exposed, why is it available then in the IAPI?

Thanks,

Bram

Former Member
0 Kudos

Hi Bram,

It may be an internal API class. I do not find it in the Resource Guide, which contains all public classes.

Sounds like you need to cast your integers into long, but I may be wrong.

Enjoy playing under the hood! Keep your fingers away from the fan, and do not open the hot radiator cap.

-Howie