Copyright© 2008-2012 SiteVision AB, all rights reserved.



javax.jcr.security
Interface PrincipalManager


public interface PrincipalManager

Using the PrincipalManager interface, applications can look-up and perform simple searches on principals in managing access control.

SiteVision note: Unsupported operation

Since:
JCR 2.0

Method Summary
 DirContext getDirectory()
          Returns the underlying JNDI directory, if available.
 Principal lookupPrincipal(String principal)
          Looks up a principal by the string representation used in the jcr:principal property of an nt:ace node.
 PrincipalIterator searchPrincipal(String simpleFilter)
          Gets the principals matching a simple filter expression applied against the string representation of a principal (the value used in the jcr:principal property of an nt:ace node).
 

Method Detail

getDirectory

DirContext getDirectory()
                        throws RepositoryException
Returns the underlying JNDI directory, if available. Otherwise returns null.

Returns:
the underlying JNDI directory, if available. Otherwise returns null.
Throws:
RepositoryException - if an error occurs.

lookupPrincipal

Principal lookupPrincipal(String principal)
                          throws RepositoryException
Looks up a principal by the string representation used in the jcr:principal property of an nt:ace node.

The following should be true:

 lookupPrincipal(session.getUserID()).
 getName().equals(session.getUserID())
 
Returns null if the principal is not found.

Parameters:
principal - the principal to look-up
Returns:
the specified Principal or null if the principal is not found.
Throws:
RepositoryException - if an error occurs.

searchPrincipal

PrincipalIterator searchPrincipal(String simpleFilter)
                                  throws RepositoryException
Gets the principals matching a simple filter expression applied against the string representation of a principal (the value used in the jcr:principal property of an nt:ace node).

A star "*" in the filter expression matches zero or more characters. "\*" matches a literal "*".

An implementation may limit the number of principals returned.

If there are no matching principals, an empty iterator is returned.

Parameters:
simpleFilter - a simple filter expression
Returns:
a PrincipalIterator over the matching principals; If there are no matching principals, an empty iterator is returned.
Throws:
RepositoryException - if an error occurs.


SiteVision - Portal and Content Management Made Easy
SiteVision is an advanced Java enterprise portal product and a portlet container (JSR 168) that implements Java Content Repository (JSR 283).

Copyright© 2008-2012 SiteVision AB, all rights reserved.