org.apache.jetspeed.security
Interface JetspeedPrincipalManager

All Superinterfaces:
java.io.Serializable

public interface JetspeedPrincipalManager
extends java.io.Serializable

Version:
$Id$

Method Summary
 void addAssociation(JetspeedPrincipal from, JetspeedPrincipal to, java.lang.String associationName)
           
 void addListener(PrincipalManagerEventListener listener)
           
 void addPrincipal(JetspeedPrincipal principal, java.util.Set<JetspeedPrincipalAssociationReference> associations)
           
 java.util.List<? extends JetspeedPrincipal> getAssociatedFrom(java.lang.String principalFromName, JetspeedPrincipalType from, java.lang.String associationName)
           Retrieves a detached and modifiable JetspeedPrincipal list of all the principals managed by this manager which are associated from the specified principal by the specified association.
 java.util.List<java.lang.String> getAssociatedNamesFrom(java.lang.String principalFromName, JetspeedPrincipalType from, java.lang.String associationName)
           Retrieves a detached and modifiable list of the names of all the principals managed by this manager which are associated from the specified principal by the specified association.
 java.util.List<java.lang.String> getAssociatedNamesTo(java.lang.String principalToName, JetspeedPrincipalType to, java.lang.String associationName)
           Retrieves a detached and modifiable list of the names of all the principals managed by this manager which are associated to the specified principal by the specified association.
 java.util.List<? extends JetspeedPrincipal> getAssociatedTo(java.lang.String principalToName, JetspeedPrincipalType to, java.lang.String associationName)
           Retrieves a detached and modifiable JetspeedPrincipal list of all the principals managed by this manager which are associated to the specified principal by the specified association.
 java.util.List<JetspeedPrincipalAssociationType> getAssociationTypes()
           
 JetspeedPrincipal getPrincipal(java.lang.String name)
           
 java.util.List<java.lang.String> getPrincipalNames(java.lang.String nameFilter)
           Retrieves a detached and modifiable List of principal names, finding principals matching the corresponding principal name filter.
 JetspeedPrincipalResultList getPrincipals(JetspeedPrincipalQueryContext queryContext)
          Retrieve all principals that match the queryContext.
 java.util.List<? extends JetspeedPrincipal> getPrincipals(java.lang.String nameFilter)
           Retrieves a detached and modifiable JetspeedPrincipal list matching the corresponding principal name filter.
 java.util.List<? extends JetspeedPrincipal> getPrincipalsByAttribute(java.lang.String attributeName, java.lang.String attributeValue)
           
 JetspeedPrincipalType getPrincipalType()
           
 JetspeedPrincipal newPrincipal(java.lang.String name, boolean mapped)
           
 JetspeedPrincipal newTransientPrincipal(java.lang.String name)
           
 boolean principalExists(java.lang.String name)
           
 void removeAssociation(JetspeedPrincipal from, JetspeedPrincipal to, java.lang.String associationName)
           
 void removeListener(PrincipalManagerEventListener listener)
           
 void removePrincipal(JetspeedPrincipal principal)
           
 void removePrincipal(java.lang.String name)
           
 void transferAssociationFrom(JetspeedPrincipal from, JetspeedPrincipal to, JetspeedPrincipal target, java.lang.String associationName)
           
 void transferAssociationTo(JetspeedPrincipal from, JetspeedPrincipal to, JetspeedPrincipal target, java.lang.String associationName)
           
 void updatePrincipal(JetspeedPrincipal principal)
           
 

Method Detail

getPrincipalType

JetspeedPrincipalType getPrincipalType()

getAssociationTypes

java.util.List<JetspeedPrincipalAssociationType> getAssociationTypes()

principalExists

boolean principalExists(java.lang.String name)

getPrincipal

JetspeedPrincipal getPrincipal(java.lang.String name)

getPrincipalNames

java.util.List<java.lang.String> getPrincipalNames(java.lang.String nameFilter)

Retrieves a detached and modifiable List of principal names, finding principals matching the corresponding principal name filter.

Parameters:
nameFilter - The filter used to retrieve matching principals.
Returns:
A list of principal names

getPrincipals

java.util.List<? extends JetspeedPrincipal> getPrincipals(java.lang.String nameFilter)

Retrieves a detached and modifiable JetspeedPrincipal list matching the corresponding principal name filter.

Parameters:
nameFilter - The filter used to retrieve matching principal.
Returns:
a list of JetspeedPrincipal

getPrincipals

JetspeedPrincipalResultList getPrincipals(JetspeedPrincipalQueryContext queryContext)
Retrieve all principals that match the queryContext. It returns a JetspeedPrincipalResultList, containing the actual result list an the total number of results from the query. The returned principals are detached.

Parameters:
queryContext - The (@see JetspeedPrincipalQueryContext) for this query.
Returns:

getPrincipalsByAttribute

java.util.List<? extends JetspeedPrincipal> getPrincipalsByAttribute(java.lang.String attributeName,
                                                                     java.lang.String attributeValue)

newPrincipal

JetspeedPrincipal newPrincipal(java.lang.String name,
                               boolean mapped)

newTransientPrincipal

JetspeedPrincipal newTransientPrincipal(java.lang.String name)

removePrincipal

void removePrincipal(java.lang.String name)
                     throws SecurityException
Throws:
SecurityException

getAssociatedFrom

java.util.List<? extends JetspeedPrincipal> getAssociatedFrom(java.lang.String principalFromName,
                                                              JetspeedPrincipalType from,
                                                              java.lang.String associationName)

Retrieves a detached and modifiable JetspeedPrincipal list of all the principals managed by this manager which are associated from the specified principal by the specified association.

If the association is JetspeedAssociationType#isSingular() at most one principal will be returned.

Parameters:
principalFromName - The principal name to find the other principals associated to.
from - The principal type of the provided principal name
associationName - The name of the association from the provided principal type to this Manager principal type.
Returns:
The list of JetspeedPrincipal in the to side of the provided association for the provided principal name and its type

getAssociatedTo

java.util.List<? extends JetspeedPrincipal> getAssociatedTo(java.lang.String principalToName,
                                                            JetspeedPrincipalType to,
                                                            java.lang.String associationName)

Retrieves a detached and modifiable JetspeedPrincipal list of all the principals managed by this manager which are associated to the specified principal by the specified association.

If the association is JetspeedAssociationType#isDominant() at most one principal will be returned.

Parameters:
principalToName - The principal name to find the other principals associated from.
to - The principal type of the provided principal name
associationName - The name of the association from this Manager principal type to the provided principal type
Returns:
The list of JetspeedPrincipal in the from side of the provided association for the provided principal name and its type

getAssociatedNamesFrom

java.util.List<java.lang.String> getAssociatedNamesFrom(java.lang.String principalFromName,
                                                        JetspeedPrincipalType from,
                                                        java.lang.String associationName)

Retrieves a detached and modifiable list of the names of all the principals managed by this manager which are associated from the specified principal by the specified association.

If the association is JetspeedAssociationType#isSingular() at most one principal name will be returned.

Parameters:
principalFromName - The principal name to find the other principals associated to.
from - The principal type of the provided principal name
associationName - The name of the association from the provided principal type to this Manager principal type
Returns:
The list of the names of the principals in the from side of the provided association for the provided principal name and its type

getAssociatedNamesTo

java.util.List<java.lang.String> getAssociatedNamesTo(java.lang.String principalToName,
                                                      JetspeedPrincipalType to,
                                                      java.lang.String associationName)

Retrieves a detached and modifiable list of the names of all the principals managed by this manager which are associated to the specified principal by the specified association.

If the association is JetspeedAssociationType#isDominant() at most one principal name will be returned.

Parameters:
principalToName - The principal name to find the other principals associated from.
to - The principal type of the provided principal name
associationName - The name of the association from this Manager principal type the to principal type
Returns:
The list of the names of the principals in the from side of the provided association for the provided principal name and its type

addPrincipal

void addPrincipal(JetspeedPrincipal principal,
                  java.util.Set<JetspeedPrincipalAssociationReference> associations)
                  throws SecurityException
Throws:
SecurityException

updatePrincipal

void updatePrincipal(JetspeedPrincipal principal)
                     throws SecurityException
Throws:
SecurityException

removePrincipal

void removePrincipal(JetspeedPrincipal principal)
                     throws SecurityException
Throws:
SecurityException

addAssociation

void addAssociation(JetspeedPrincipal from,
                    JetspeedPrincipal to,
                    java.lang.String associationName)
                    throws SecurityException
Throws:
SecurityException

transferAssociationTo

void transferAssociationTo(JetspeedPrincipal from,
                           JetspeedPrincipal to,
                           JetspeedPrincipal target,
                           java.lang.String associationName)
                           throws SecurityException
Throws:
SecurityException

transferAssociationFrom

void transferAssociationFrom(JetspeedPrincipal from,
                             JetspeedPrincipal to,
                             JetspeedPrincipal target,
                             java.lang.String associationName)
                             throws SecurityException
Throws:
SecurityException

removeAssociation

void removeAssociation(JetspeedPrincipal from,
                       JetspeedPrincipal to,
                       java.lang.String associationName)
                       throws SecurityException
Throws:
SecurityException

addListener

void addListener(PrincipalManagerEventListener listener)

removeListener

void removeListener(PrincipalManagerEventListener listener)


Copyright © 1999-2011 The Apache Software Foundation. All Rights Reserved.