Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AEM Inbox Notification #31

Open
davidjgonzalez opened this issue Apr 22, 2015 · 1 comment
Open

AEM Inbox Notification #31

davidjgonzalez opened this issue Apr 22, 2015 · 1 comment

Comments

@davidjgonzalez
Copy link
Contributor

Sample code using TaskManager and Tasks

@SachinMali has example codes

@SachinMali
Copy link

Here is pseudo code

  1. In your OSGi Service class, inject instance of 'InboxNotificationSender'(com.adobe.acs.commons.notifications.InboxNotificationSender)

  2. Invoke 'buildInboxNotification()' method on above injected class to get 'InboxNotification' instance
    InboxNotification inboxNotification = inboxNotificationSender.buildInboxNotification()

  3. Populate the 'InboxNotification' instance with your details
    inboxNotification.setTitle("Hello World");
    inboxNotification.setContentPath("/my/sample/path");
    inboxNotification.setAssignee("AEM-USER-PRINCIPAL-NAME");
    inboxNotification.setMessage("Greetings of the day!");
    inboxNotification.setNotificationActions("Approve");

  4. Invoke 'sendInboxNotification()' method on Step-1 injected object, like

     inboxNotificationSender.sendInboxNotification(resourceResolver,inboxNotification);
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants