org.drools.guvnor.server.repository
Class UserInbox

java.lang.Object
  extended by org.drools.guvnor.server.repository.UserInbox

public class UserInbox
extends Object

This manages the users "inbox".


Constructor Summary
UserInbox(RulesRepository repo)
          Create an inbox for the current sessions user id.
UserInbox(RulesRepository repo, String userName)
          Create an inbox for the given user name (id)
 
Method Summary
 void addToIncoming(String assetId, String note, String userFrom)
           
 void addToRecentEdited(String assetId, String note)
          This should be called when the user edits or comments on an asset.
 void addToRecentOpened(String assetId, String note)
           
 void clearAll()
          Wipe them out, all of them.
 void clearIncoming()
           
 List<UserInfo.InboxEntry> loadEntries(String inboxName)
           
 List<UserInfo.InboxEntry> loadIncoming()
           
 List<UserInfo.InboxEntry> loadRecentEdited()
           
 List<UserInfo.InboxEntry> loadRecentOpened()
           
static void recordOpeningEvent(AssetItem item)
          Helper method to log the opening.
static void recordUserEditEvent(AssetItem item)
          Helper method to note the event
static TableDataResult toTable(List<UserInfo.InboxEntry> entries, boolean showFrom)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserInbox

public UserInbox(RulesRepository repo,
                 String userName)
Create an inbox for the given user name (id)


UserInbox

public UserInbox(RulesRepository repo)
Create an inbox for the current sessions user id.

Method Detail

addToRecentEdited

public void addToRecentEdited(String assetId,
                              String note)
This should be called when the user edits or comments on an asset. Simply adds to the list...


addToRecentOpened

public void addToRecentOpened(String assetId,
                              String note)

addToIncoming

public void addToIncoming(String assetId,
                          String note,
                          String userFrom)

loadEntries

public List<UserInfo.InboxEntry> loadEntries(String inboxName)

loadRecentEdited

public List<UserInfo.InboxEntry> loadRecentEdited()

loadRecentOpened

public List<UserInfo.InboxEntry> loadRecentOpened()

loadIncoming

public List<UserInfo.InboxEntry> loadIncoming()

clearAll

public void clearAll()
Wipe them out, all of them.


clearIncoming

public void clearIncoming()

toTable

public static TableDataResult toTable(List<UserInfo.InboxEntry> entries,
                                      boolean showFrom)

recordOpeningEvent

public static void recordOpeningEvent(AssetItem item)
Helper method to log the opening. Will remove any inbox items that have the same id.


recordUserEditEvent

public static void recordUserEditEvent(AssetItem item)
Helper method to note the event



Copyright © 2001-2011 JBoss Inc.. All Rights Reserved.