Index: src/main/java/org/apache/jackrabbit/api/security/principal/GroupPrincipal.java =================================================================== --- src/main/java/org/apache/jackrabbit/api/security/principal/GroupPrincipal.java (nonexistent) +++ src/main/java/org/apache/jackrabbit/api/security/principal/GroupPrincipal.java (working copy) @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.jackrabbit.api.security.principal; + +import java.security.Principal; +import java.util.Enumeration; + +import org.osgi.annotation.versioning.ProviderType; + +/** + * This interface is used to represent a group of principals. + * + */ +@ProviderType +public interface GroupPrincipal extends Principal { + + /** + * Returns true if the passed principal is a member of the group. + * This method does a recursive search, so if a principal belongs to a + * group which is a member of this group, true is returned. + * + * @param member the principal whose membership is to be checked. + * @return true if the principal is a member of this group, + * false otherwise. + */ + public boolean isMember(Principal member); + + /** + * Returns an enumeration of the members in the group. The returned objects + * can be instances of either Principal or Group (which is a subclass of + * Principal). + * + * @return an enumeration of the group members. + */ + public Enumeration members(); + +} Index: src/main/java/org/apache/jackrabbit/api/security/principal/PrincipalManager.java =================================================================== --- src/main/java/org/apache/jackrabbit/api/security/principal/PrincipalManager.java (revision 1820891) +++ src/main/java/org/apache/jackrabbit/api/security/principal/PrincipalManager.java (working copy) @@ -17,7 +17,6 @@ package org.apache.jackrabbit.api.security.principal; import java.security.Principal; -import java.security.acl.Group; /** * This interface defines the principal manager which is the clients view on @@ -42,7 +41,7 @@ /** * Filter flag indicating that only Principals that do NOT - * represent a {@link java.security.acl.Group group} should be searched + * represent a {@link org.apache.jackrabbit.api.security.principal.GroupPrincipal group} should be searched * and returned. */ int SEARCH_TYPE_NOT_GROUP = 1; @@ -49,7 +48,7 @@ /** * Filter flag indicating that only Principals that represent - * a {@link java.security.acl.Group group} of Principals should be searched + * a {@link org.apache.jackrabbit.api.security.principal.GroupPrincipal group} of Principals should be searched * and returned. */ int SEARCH_TYPE_GROUP = 2; Index: src/main/java/org/apache/jackrabbit/api/security/principal/package-info.java =================================================================== --- src/main/java/org/apache/jackrabbit/api/security/principal/package-info.java (revision 1820891) +++ src/main/java/org/apache/jackrabbit/api/security/principal/package-info.java (working copy) @@ -18,5 +18,5 @@ /** * Jackrabbit extensions for JAAS principals. */ -@org.osgi.annotation.versioning.Version("2.3") +@org.osgi.annotation.versioning.Version("2.4.0") package org.apache.jackrabbit.api.security.principal;