BEA Systems, Inc.

ALES Entitlement Query API Reference

com.bea.ales.EntitlementQuery
Interface GroupQuery


public interface GroupQuery

This inteface is used to query ALES group related information. Group names are specified in a qualified format, which includes the identity directory they belong to. The format is //sgrp/dirName/groupName/. 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 GroupQuery.

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 group.
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 group, from a group membership.
 
Method Summary
 java.util.List filter(java.lang.String findPattern)
          Finds all groups matching the specified filter pattern.
 java.util.List getAllChildrenGroups(java.lang.String groupName)
          Get all groups that are members of the specified group.
 java.util.List getAllParentGroups(java.lang.String groupName)
          Get all groups that the specified group is a member of.
 java.util.List getDirectChildrenGroups(java.lang.String groupName)
          Get all groups that are direct members of the specified group.
 java.util.List getDirectParentGroups(java.lang.String groupName)
          Get all groups that the specified group is a direct member of.
 java.util.List getDirectUsers(java.lang.String groupName, java.lang.String pattern)
          Returns all direct users in the specified group matching the specified pattern
 AttributeElement getGroupAttribute(java.lang.String groupName, java.lang.String attrName, int attrQueryType)
          Gets the value of the attribute associated with the group.
 java.util.List getGroupAttributes(java.lang.String groupName, int attrQueryType)
          Gets all attributes associated with the specified group.
 java.util.List getGroupsWithAttribute(java.lang.String dirName, AttributeElement attrElem)
          Finds all groups in specified directory with the specified attribute value.
 java.util.List getUserClosure(java.lang.String groupName, java.lang.String pattern)
          Returns all direct and indirect (inherited) users in the specified group matching the specified pattern
 

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 group.

ATTRIBUTE_QUERY_TYPE_INHERITED

public static final int ATTRIBUTE_QUERY_TYPE_INHERITED
Attribute query type specifiying the attribute value inherited by the group, 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 groups matching the specified filter pattern. The pattern needs to take the qualified form into account. Returns matched group names

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

getGroupsWithAttribute

public java.util.List getGroupsWithAttribute(java.lang.String dirName,
                                             AttributeElement attrElem)
                                      throws QueryException
Finds all groups in specified directory with the specified attribute value. Returns matched group names

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

getGroupAttribute

public AttributeElement getGroupAttribute(java.lang.String groupName,
                                          java.lang.String attrName,
                                          int attrQueryType)
                                   throws QueryException
Gets the value of the attribute associated with the group.

Parameters:
groupName - the group 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 group attribute, or null if this attribute is not defined for the specified group.
Throws:
QueryException -  
See Also:
ATTRIBUTE_QUERY_TYPE_DIRECT, ATTRIBUTE_QUERY_TYPE_INHERITED, ATTRIBUTE_QUERY_TYPE_ENFORCED

getGroupAttributes

public java.util.List getGroupAttributes(java.lang.String groupName,
                                         int attrQueryType)
                                  throws QueryException
Gets all attributes associated with the specified group.

Parameters:
groupName - group name
attrQueryType - ATTRIBUTE_QUERY_TYPE_DIRECT, ATTRIBUTE_QUERY_TYPE_INHERITED, ATTRIBUTE_QUERY_TYPE_ENFORCED
Returns:
A List of AttributeElement objects
Throws:
QueryException -  
See Also:
ATTRIBUTE_QUERY_TYPE_DIRECT, ATTRIBUTE_QUERY_TYPE_INHERITED, ATTRIBUTE_QUERY_TYPE_ENFORCED

getDirectUsers

public java.util.List getDirectUsers(java.lang.String groupName,
                                     java.lang.String pattern)
                              throws QueryException
Returns all direct users in the specified group matching the specified pattern

Parameters:
groupName - name of the group in the form //sgrp/identityname/groupname/
pattern - pattern to match the users on, for example * or //users/*
Returns:
A List of user qualified names which are String type.
Throws:
QueryException -  

getUserClosure

public java.util.List getUserClosure(java.lang.String groupName,
                                     java.lang.String pattern)
                              throws QueryException
Returns all direct and indirect (inherited) users in the specified group matching the specified pattern

Parameters:
groupName - name of the group in the form //sgrp/identityname/groupname/
pattern - pattern to match the users on, for example * or //users/*
Returns:
A List of group qualified names which are String type.
Throws:
QueryException -  

getAllParentGroups

public java.util.List getAllParentGroups(java.lang.String groupName)
                                  throws QueryException
Get all groups that the specified group is a member of. This includes all direct and indirect (inherited) group memeberships.

Parameters:
groupName - name of the group in the form //sgrp/identityname/groupname/
Returns:
A List of group qualified names which are String type.
Throws:
QueryException -  

getAllChildrenGroups

public java.util.List getAllChildrenGroups(java.lang.String groupName)
                                    throws QueryException
Get all groups that are members of the specified group. This includes all direct and indirect (inherited) group memeberships. Returns matched group names

Parameters:
groupName - name of the group in the form //sgrp/identityname/groupname/
Returns:
A List of group qualified names which are String type.
Throws:
QueryException -  

getDirectParentGroups

public java.util.List getDirectParentGroups(java.lang.String groupName)
                                     throws QueryException
Get all groups that the specified group is a direct member of. This includes only direct group memeberships. Returns matched group names

Parameters:
groupName - name of the group in the form //sgrp/identityname/groupname/
Returns:
A List of group qualified names which are String type.
Throws:
QueryException -  

getDirectChildrenGroups

public java.util.List getDirectChildrenGroups(java.lang.String groupName)
                                       throws QueryException
Get all groups that are direct members of the specified group. This includes only direct group memeberships. Returns matched group names

Parameters:
groupName - name of the group in the form //sgrp/identityname/groupname/
Returns:
A List of group qualified names which are String type.
Throws:
QueryException -  

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