BEA Systems, Inc.

ALES Entitlement Query API Reference

com.bea.ales.EntitlementQuery
Interface UserQuery


public interface UserQuery

This inteface is used to query ALES user related information. User names are specified in a qualified format which includes the identity directory they belong to. The format is //user/dirName/userName/. Directory name, as parameter of methods should also be specified in a qualified format with prefix //dir/. Example: //dir/myDir . Use EntitlementQueryFactory to obtain an instance of a UserQuery.

Author:
Copyright © 2007 BEA Systems, Inc. All Rights Reserved.
See Also:
EntitlementQueryFactory

Field Summary
static int ATTRIBUTE_QUERY_TYPE_DIRECT
          Attribute query type specifiying the attribute value assigned directly to the user.
static int ATTRIBUTE_QUERY_TYPE_ENFORCED
          Attribute query type specifiying the attribute value based on the attribute inheritance logic.
static int ATTRIBUTE_QUERY_TYPE_INHERITED
          Attribute query type specifiying the attribute value inherited by the user, from a group membership.
 
Method Summary
 java.util.List filter(java.lang.String findPattern)
          Finds all users matching the specified filter pattern.
 java.util.List getAllGroups(java.lang.String userName)
          Finds all groups the user is a member of.
 java.util.List getDirectGroups(java.lang.String userName)
          Finds all direct group memberships for the specified user.
 java.util.List getIndirectGroups(java.lang.String userName)
          Finds all indirect(inherited) group memberships for the specified user.
 AttributeElement getUserAttribute(java.lang.String userName, java.lang.String attrName, int attrQueryType)
          Gets the value of an attribute associated with the specified user.
 java.util.List getUserAttributes(java.lang.String userName, int attrQueryType)
          Gets all attributes associated with the specified user.
 java.util.List getUsersWithAttribute(java.lang.String dirName, AttributeElement attrElem)
          Finds all users with the specified directory name and attribute value.
 

Field Detail

ATTRIBUTE_QUERY_TYPE_DIRECT

public static final int ATTRIBUTE_QUERY_TYPE_DIRECT
Attribute query type specifiying the attribute value assigned directly to the user.

ATTRIBUTE_QUERY_TYPE_INHERITED

public static final int ATTRIBUTE_QUERY_TYPE_INHERITED
Attribute query type specifiying the attribute value inherited by the user, from a group membership.

ATTRIBUTE_QUERY_TYPE_ENFORCED

public static final int ATTRIBUTE_QUERY_TYPE_ENFORCED
Attribute query type specifiying the attribute value based on the attribute inheritance logic.
Method Detail

filter

public java.util.List filter(java.lang.String findPattern)
                      throws QueryException
Finds all users matching the specified filter pattern. The pattern needs to take the qualified form into account. Returns matched user names

Parameters:
findPattern - pattern for the filter
Returns:
A List of matched user qualified names which are String type.

getUsersWithAttribute

public java.util.List getUsersWithAttribute(java.lang.String dirName,
                                            AttributeElement attrElem)
                                     throws QueryException
Finds all users with the specified directory name and attribute value. Returns matched user qualified names

Parameters:
dirName - directory name
attrElem - the attribute name and value
Returns:
A List of matched user qualified names which are String type.
Throws:
QueryException -  

getAllGroups

public java.util.List getAllGroups(java.lang.String userName)
                            throws QueryException
Finds all groups the user is a member of. This includes both direct and indirect (inherited) group memberships. Returns matched user names

Parameters:
userName - an user to be reported on
Returns:
A List of matched group qualified name which are String type.
Throws:
QueryException -  

getDirectGroups

public java.util.List getDirectGroups(java.lang.String userName)
                               throws QueryException
Finds all direct group memberships for the specified user. Returns matched group names

Parameters:
userName - an user to be reported on
Returns:
A List of group qualified names which are String type.
Throws:
QueryException -  

getIndirectGroups

public java.util.List getIndirectGroups(java.lang.String userName)
                                 throws QueryException
Finds all indirect(inherited) group memberships for the specified user. Returns matched group names

Parameters:
userName - an user to be reported on
Returns:
A List of group qualified names which are String type.
Throws:
QueryException -  

getUserAttribute

public AttributeElement getUserAttribute(java.lang.String userName,
                                         java.lang.String attrName,
                                         int attrQueryType)
                                  throws QueryException
Gets the value of an attribute associated with the specified user.

Parameters:
userName - the user name
attrName - the attribute name
attrQueryType - ATTRIBUTE_QUERY_TYPE_DIRECT, ATTRIBUTE_QUERY_TYPE_INHERITED, ATTRIBUTE_QUERY_TYPE_ENFORCED
Returns:
the AttributeElement containing the value of the user's attribute, or null if this attribute is not defined for the specified user.
Throws:
QueryException -  
See Also:
ATTRIBUTE_QUERY_TYPE_DIRECT, ATTRIBUTE_QUERY_TYPE_INHERITED, ATTRIBUTE_QUERY_TYPE_ENFORCED

getUserAttributes

public java.util.List getUserAttributes(java.lang.String userName,
                                        int attrQueryType)
                                 throws QueryException
Gets all attributes associated with the specified user. Returns A List of AttributeElement objects

Parameters:
userName - the user name
attrQueryType - ATTRIBUTE_QUERY_TYPE_DIRECT, ATTRIBUTE_QUERY_TYPE_INHERITED, ATTRIBUTE_QUERY_TYPE_ENFORCED
Returns:
An AttributeElement List
Throws:
QueryException -  
See Also:
ATTRIBUTE_QUERY_TYPE_DIRECT, ATTRIBUTE_QUERY_TYPE_INHERITED, ATTRIBUTE_QUERY_TYPE_ENFORCED

Documentation is available at
http://edocs.bea.com/ales/docs26