org.apache.jetspeed.security
Class JetspeedPrincipalQueryContext

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<java.lang.String,java.lang.Object>
          extended by org.apache.jetspeed.security.JetspeedPrincipalQueryContext
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Object>

public class JetspeedPrincipalQueryContext
extends java.util.HashMap<java.lang.String,java.lang.Object>

Principal query context. Simple hash map with convenient methods to put and get casted types from the map.

Author:
Joachim Mueller
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Field Summary
static java.lang.String ASSOCIATED_GROUPS
           
static java.lang.String ASSOCIATED_ROLES
           
static java.lang.String ASSOCIATED_USERS
           
static java.lang.String JETSPEED_PRINCIPAL_TYPE
           
static java.lang.String LENGTH
           
static java.lang.String NAME_FILTER
           
static java.lang.String OFFSET
           
static java.lang.String ORDER
           
static java.lang.String SECURITY_ATTRIBUTES
           
static java.lang.String SECURITY_DOMAIN
           
 
Constructor Summary
JetspeedPrincipalQueryContext(java.lang.String nameFilter, long offset, long length)
           
JetspeedPrincipalQueryContext(java.lang.String nameFilter, long offset, long length, java.lang.String order, java.util.List<java.lang.String> roles, java.util.List<java.lang.String> groups, java.util.List<java.lang.String> users, java.util.Map<java.lang.String,java.lang.String> attributes)
           
 
Method Summary
 java.util.List<java.lang.String> getAssociatedGroups()
          Returns all groups the principal must be member of.
 java.util.List<java.lang.String> getAssociatedRoles()
          Returns all roles the principal must be member of.
 java.util.List<java.lang.String> getAssociatedUsers()
          Returns all users the principal must contain.
 java.lang.String getJetspeedPrincipalType()
           
 java.lang.Long getLength()
           
 java.lang.String getNameFilter()
          Return the filter for the principals name.
 java.lang.Long getOffset()
           
 java.lang.String getOrder()
          Returns the sort order for the principals name.
 java.util.Map<java.lang.String,java.lang.String> getSecurityAttributes()
          Returns all security attributes for the principal.
 java.lang.Long getSecurityDomain()
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

NAME_FILTER

public static final java.lang.String NAME_FILTER
See Also:
Constant Field Values

SECURITY_ATTRIBUTES

public static final java.lang.String SECURITY_ATTRIBUTES
See Also:
Constant Field Values

ASSOCIATED_ROLES

public static final java.lang.String ASSOCIATED_ROLES
See Also:
Constant Field Values

ASSOCIATED_GROUPS

public static final java.lang.String ASSOCIATED_GROUPS
See Also:
Constant Field Values

ASSOCIATED_USERS

public static final java.lang.String ASSOCIATED_USERS
See Also:
Constant Field Values

ORDER

public static final java.lang.String ORDER
See Also:
Constant Field Values

OFFSET

public static final java.lang.String OFFSET
See Also:
Constant Field Values

LENGTH

public static final java.lang.String LENGTH
See Also:
Constant Field Values

JETSPEED_PRINCIPAL_TYPE

public static final java.lang.String JETSPEED_PRINCIPAL_TYPE
See Also:
Constant Field Values

SECURITY_DOMAIN

public static final java.lang.String SECURITY_DOMAIN
See Also:
Constant Field Values
Constructor Detail

JetspeedPrincipalQueryContext

public JetspeedPrincipalQueryContext(java.lang.String nameFilter,
                                     long offset,
                                     long length)

JetspeedPrincipalQueryContext

public JetspeedPrincipalQueryContext(java.lang.String nameFilter,
                                     long offset,
                                     long length,
                                     java.lang.String order,
                                     java.util.List<java.lang.String> roles,
                                     java.util.List<java.lang.String> groups,
                                     java.util.List<java.lang.String> users,
                                     java.util.Map<java.lang.String,java.lang.String> attributes)
Method Detail

getNameFilter

public java.lang.String getNameFilter()
Return the filter for the principals name. The name can contain a wildcard at the right end.

Returns:
the nameFilter

getSecurityAttributes

public java.util.Map<java.lang.String,java.lang.String> getSecurityAttributes()
Returns all security attributes for the principal. All security attributes MUST exist for the principal.

Returns:
the securityAttributes

getAssociatedRoles

public java.util.List<java.lang.String> getAssociatedRoles()
Returns all roles the principal must be member of.

Returns:
the associatedRoles

getAssociatedGroups

public java.util.List<java.lang.String> getAssociatedGroups()
Returns all groups the principal must be member of.

Returns:
the associatedGroups

getAssociatedUsers

public java.util.List<java.lang.String> getAssociatedUsers()
Returns all users the principal must contain.

Returns:
the associatedUsers

getOrder

public java.lang.String getOrder()
Returns the sort order for the principals name. If it is 'desc' the principals are sorted backwards according to their names, all other values result in normal order.

Returns:
the orderDesc

getOffset

public java.lang.Long getOffset()
Returns:
the offset

getLength

public java.lang.Long getLength()
Returns:
the length

getJetspeedPrincipalType

public java.lang.String getJetspeedPrincipalType()
Returns:
the JetspeedPrincipalType name

getSecurityDomain

public java.lang.Long getSecurityDomain()
Returns:
the security domain id


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