/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: AMGroupImpl.java,v 1.7 2009/11/20 23:52:51 ww203982 Exp $
*
* Portions Copyrighted 2011-2015 ForgeRock AS.
*/
/**
* The <code>AMGroupImpl</code> class implements interface AMGroup
* @deprecated As of Sun Java System Access Manager 7.1.
*/
}
/**
* Gets number of users in the group.
*
* @return Number of users in the group.
*/
return getUserDNs().size();
}
/**
* Gets the user DN;s in the group.
*
* @return The user DN's in the group.
*/
super.profileType);
try {
}
} catch (AMException ame) {
// member is not an identifiable managed type
if (debug.messageEnabled()) {
+ " the type of object: " + curr);
}
}
}
return users;
}
/**
* Searches for users in this group using wildcards and attribute values.
* Wildcards can be specified such as a*, *, *a.
*
* @param wildcard
* wildcard pattern to be used in the search
*
* @return Set DNs of Users matching the search
*
* @throws AMException
* if there is an internal error in the AM Store
* @throws SSOException
* if the sign on is no longer valid
*/
"122");
}
} else {
throw new AMException(AMSDKBundle
}
} else {
} else {
throw new AMException(AMSDKBundle
}
}
return resultSet;
}
private void extractUserDNs(String pattern, Set<String> users, Set<String> resultSet) throws AMException {
super.locale), "122");
}
}
}
}
/**
* Searches for users in this group using wildcards. Wildcards can be
* specified such as a*, *, *a.
*
* @param wildcard
* wildcard pattern to be used in the search
* @param avPairs
* attribute-value pairs to match when searching users
* @param searchControl
* specifies the size limit and time limit
*
* @return AMSearchResults which contains a Set DNs of Users matching the
* search
*
* @throws AMException
* if there is an internal error in the AM Store
* @throws SSOException
* if the sign on is no longer valid
*/
int scope;
if (profileType == DYNAMIC_GROUP
|| profileType == ASSIGNABLE_DYNAMIC_GROUP) {
} else {
base = getOrganizationDN();
}
filter = userFilter;
} else {
filter = userFilter;
} else {
.iterator();
}
}
}
}
}
/**
* Searches for users in this group using wildcards. Wildcards can be
* specified such as a*, *, *a.
*
* @param wildcard
* wildcard pattern to be used in the search
* @param avPairs
* attribute-value pairs to match when searching users
* @param searchControl
* specifies the size limit and time limit
*
* @return AMSearchResults which contains a Set DNs of Users matching the
* search
*
* @throws AMException
* if there is an internal error in the AM Store
* @throws SSOException
* if the sign on is no longer valid
*/
int scope;
if (profileType == DYNAMIC_GROUP
|| profileType == ASSIGNABLE_DYNAMIC_GROUP) {
} else {
base = getOrganizationDN();
}
+ avfilter + ")";
if (debug.messageEnabled()) {
}
}
/**
* Creates static groups in this group.
*
* @param groupNames
* The set of static groups' names to be created in this group.
* @return Set set of static group objects created
* @throws AMException
* if there is an internal error in the AM Store
* @throws SSOException
* if the sign on is no longer valid
*/
groupDN);
}
return groups;
}
/**
* Creates static groups and initializes their attributes.
*
* @param users
* Map where the key is the name of the static group, and the
* value is a Map to represent Attribute-Value Pairs
*
* @return Set Set of static group objects created.
* @throws AMException
* if there is an internal error in the AM Store
* @throws SSOException
* if the sign on is no longer valid
*/
groupDN);
}
return groups;
}
/**
* Creates dynamic groups in this group.
*
* @param groupNames
* The set of dynamic groups' names to be created in this group.
* @return Set set of dynamic group objects created
* @throws AMException
* if there is an internal error in the AM Store
* @throws SSOException
* if the sign on is no longer valid
*/
groupDN);
}
return groups;
}
/**
* Creates dynamic groups and initializes their attributes.
*
* @param groups
* Map where the key is the name of the dynamic group, and the
* value is a Map to represent Attribute-Value Pairs
*
* @return Set of dynamic group objects created
* @throws AMException
* if there is an internal error in the AM Store
* @throws SSOException
* if the sign on is no longer valid
*/
groupDN);
}
return groups;
}
/**
* Creates assignable dynamic groups in this group.
*
* @param groupNames
* The set of assignable dynamic groups' names to be created in
* this group.
* @return Set of assignable dynamic group objects created
* @throws AMException
* if there is an internal error in the AM Store
* @throws SSOException
* if the sign on is no longer valid
*/
throws AMException, SSOException {
}
return groups;
}
/**
* Creates assignable dynamic groups and initializes their attributes.
*
* @param groups
* Map where the key is the name of the assignable dynamic group,
* and the value is a Map to represent Attribute-Value Pairs
*
* @return Set of assignable dynamic group objects created
* @throws AMException
* if there is an internal error in the AM Store
* @throws SSOException
* if the sign on is no longer valid
*/
}
return groups;
}
/**
* Gets the groups in this group. It returns groups either at one level or a
* whole subtree.
*
* @param level
* the level(SCOPE_ONE or SCOPE_SUB) for returning groups
* @return The group DNs in this group.
*
* @throws AMException
* if there is an internal error in the AM Store or if if the
* level is invalid
* @throws SSOException
* if the sign on is no longer valid
*/
}
/**
* Gets number of groups in the group. It returns number of groups either at
* one level or a whole subtree.
*
* @param level
* the level(SCOPE_ONE or SCOPE_SUB) for returning groups
* @return Number of groups in the group.
*
* @throws AMException
* if there is an internal error in the AM Store
* @throws SSOException
* if the sign on is no longer valid
*/
}
/**
* Deletes static groups in this group.
*
* @param groupDNs
* The set of static group DN's to be deleted from this group.
* @throws AMException
* if there is an internal error in the AM Store
* @throws SSOException
* if the sign on is no longer valid
*/
}
}
/**
* Deletes dynamic groups in this group.
*
* @param groups
* The set of dynamic group DN's to be deleted from this group.
* @throws AMException
* if there is an internal error in the AM Store
* @throws SSOException
* if the sign on is no longer valid
*/
}
}
/**
* Deletes assignable dynamic groups in this group.
*
* @param groups
* The set of assignable dynamic group DN's to be deleted from
* this group.
* @throws AMException
* if there is an internal error in the AM Store
* @throws SSOException
* if the sign on is no longer valid
*/
}
}
/**
* Searches for groups in this group using wildcards. Wildcards can be
* specified such as a*, *, *a.
*
* @param wildcard
* wildcard pattern to be used in the search
* @param level
* the search level that needs to be used (AMConstants.SCOPE_ONE
* or AMConstansts.SCOPE_SUB)
*
* @return Set DNs of sub groups matching the search
*
* @throws AMException
* if there is an internal error in the AM Store
* @throws SSOException
* if the sign on is no longer valid
*/
}
/**
* Searches for groups in this group using wildcards and attribute values.
* Wildcards can be specified such as a*, *, *a.
*
* @param wildcard
* wildcard pattern to be used in the search
* @param avPairs
* attribute-value pairs to match when searching groups
* @param level
* the search level that needs to be used (AMConstants.SCOPE_ONE
* or AMConstansts.SCOPE_SUB)
*
* @return Set DNs of groups matching the search
*
* @throws AMException
* if there is an internal error in the AM Store
* @throws SSOException
* if the sign on is no longer valid
*/
throws AMException, SSOException {
}
/**
* Searches for groups in this group using wildcards and attribute values.
* Wildcards can be specified such as a*, *, *a.
*
* @param wildcard
* wildcard pattern to be used in the search
* @param avPairs
* attribute-value pairs to match when searching groups
* @param searchControl
* specifies the search scope to be used
*
* @return AMSearchResults which contains Set a of DNs of groups matching
* the search
*
* @throws AMException
* if there is an internal error in the AM Store
* @throws SSOException
* if the sign on is no longer valid
*/
}
try {
} catch (AMException am) {
// Generic "unable to set attributes" exception
+ "add groups: -> ", am);
throw new AMException(AMSDKBundle
} else {
throw am;
}
}
}
try {
}
} catch (AMException ame) {
// member is not an identifiable managed type
+ "identity the type of object: " + curr);
}
}
return groups;
}
{
false, false, super.profileType);
if (debug.messageEnabled()) {
}
try {
} catch (AMException am) {
// Genere "unable to set attributes" exception
"remove groups: -> ", am);
throw new AMException(AMSDKBundle
} else {
throw am;
}
}
}
// return users of group as defined (based on either filter
// or uniquemember attribute
// return nested groups as set in the "uniquemember" attribute.
return groups;
}
}