org.drools.repository
Class UserInfo

java.lang.Object
  extended by org.drools.repository.UserInfo

public class UserInfo
extends Object

Manage access to misc. user info that we might want to store.


Nested Class Summary
static interface UserInfo.Command
           
static class UserInfo.InboxEntry
          And entry in an inbox.
static class UserInfo.Val
           
 
Constructor Summary
UserInfo(RulesRepository repo)
          Use the current sessions userName to get to the info node.
UserInfo(RulesRepository repo, String userName)
          Use the given userName to select the node.
 
Method Summary
 void clear(String fileName, String boxName)
           
static void eachUser(RulesRepository repository, UserInfo.Command c)
          Do something for each user.
 UserInfo.Val getProperty(String fileName, String propertyName)
           
 List<UserInfo.InboxEntry> readEntries(String fileName, String propertyName)
           
 void save()
          Persists the change (if not in a transaction of course, if in a transaction, it will wait until the boundary is hit, as per JCR standard.
 void setProperty(String fileName, String propertyName, UserInfo.Val value)
           
 void writeEntries(String fileName, String boxName, List<UserInfo.InboxEntry> entries)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserInfo

public UserInfo(RulesRepository repo)
         throws RulesRepositoryException
Use the current sessions userName to get to the info node.

Throws:
RulesRepositoryException

UserInfo

public UserInfo(RulesRepository repo,
                String userName)
         throws RulesRepositoryException
Use the given userName to select the node.

Throws:
RulesRepositoryException
Method Detail

readEntries

public List<UserInfo.InboxEntry> readEntries(String fileName,
                                             String propertyName)
                                      throws RulesRepositoryException
Throws:
RulesRepositoryException

writeEntries

public void writeEntries(String fileName,
                         String boxName,
                         List<UserInfo.InboxEntry> entries)
                  throws RulesRepositoryException
Throws:
RulesRepositoryException

clear

public void clear(String fileName,
                  String boxName)

setProperty

public void setProperty(String fileName,
                        String propertyName,
                        UserInfo.Val value)
                 throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getProperty

public UserInfo.Val getProperty(String fileName,
                                String propertyName)
                         throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

eachUser

public static void eachUser(RulesRepository repository,
                            UserInfo.Command c)
                     throws RulesRepositoryException
Do something for each user.

Parameters:
c -
Throws:
RulesRepositoryException

save

public void save()
          throws RulesRepositoryException
Persists the change (if not in a transaction of course, if in a transaction, it will wait until the boundary is hit, as per JCR standard.

Throws:
javax.jcr.RepositoryException
RulesRepositoryException


Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.