karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject [karaf] branch master updated: [KARAF-5987]add a missed file
Date Thu, 25 Oct 2018 08:28:44 GMT
This is an automated email from the ASF dual-hosted git repository.

ffang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/master by this push:
     new c4704bb  [KARAF-5987]add a missed file
c4704bb is described below

commit c4704bb26bb77b46e1bd30f60c9740ef6ded0d6b
Author: Freeman Fang <freeman.fang@gmail.com>
AuthorDate: Thu Oct 25 16:28:26 2018 +0800

    [KARAF-5987]add a missed file
---
 .../apache/karaf/jaas/boot/principal/Group.java    | 64 ++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/jaas/boot/src/main/java/org/apache/karaf/jaas/boot/principal/Group.java b/jaas/boot/src/main/java/org/apache/karaf/jaas/boot/principal/Group.java
new file mode 100644
index 0000000..3152115
--- /dev/null
+++ b/jaas/boot/src/main/java/org/apache/karaf/jaas/boot/principal/Group.java
@@ -0,0 +1,64 @@
+/*
+ *  Licensed 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.
+ *  under the License.
+ */
+package org.apache.karaf.jaas.boot.principal;
+
+import java.security.Principal;
+import java.util.Enumeration;
+
+public interface Group extends Principal {
+
+    /**
+     * Adds the specified member to the group.
+     *
+     * @param user the principal to add to this group.
+     *
+     * @return true if the member was successfully added,
+     * false if the principal was already a member.
+     */
+    boolean addMember(Principal user);
+
+    /**
+     * Removes the specified member from the group.
+     *
+     * @param user the principal to remove from this group.
+     *
+     * @return true if the principal was removed, or
+     * false if the principal was not a member.
+     */
+    boolean removeMember(Principal user);
+
+    /**
+     * 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.
+     */
+    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.
+     */
+    Enumeration<? extends Principal> members();
+
+}


Mime
View raw message