Author: mmerz
Date: Mon Dec  6 11:24:30 2004
New Revision: 110009

URL: http://svn.apache.org/viewcvs?view=rev&rev=110009
Log:
More additions from Wolfgang.

Contributor: Wolfgang.



Added:
   
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/security/Group.java
   
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/security/model/MemoryGroupImpl.java

Added: 
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/security/Group.java
Url: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/security/Group.java?view=auto&rev=110009
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/security/Group.java
     Mon Dec  6 11:24:30 2004
@@ -0,0 +1,46 @@
+package org.apache.beehive.wsm.axis.security;
+
+/*
+ * DropInDeploymentHandler.java
+ *
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ *
+ * 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.
+ *
+ */
+
+import java.util.Collection;
+
+public interface Group {
+
+    public void setName ( String name );
+
+    public String getName ();
+
+
+    public void addUser ( User user );
+
+    public User getUser ( String user );
+
+    public Collection<User> getUsers ();
+
+
+    public void addRole( Role role );
+
+    public Role getRole ( String role );
+
+    public Collection<Role> getRoles ();
+
+}
+

Added: 
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/security/model/MemoryGroupImpl.java
Url: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/security/model/MemoryGroupImpl.java?view=auto&rev=110009
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/security/model/MemoryGroupImpl.java
     Mon Dec  6 11:24:30 2004
@@ -0,0 +1,90 @@
+package org.apache.beehive.wsm.axis.security.model;
+
+/*
+ * DropInDeploymentHandler.java
+ *
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ *
+ * 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.
+ *
+ */
+
+import java.util.Collection;
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.apache.commons.codec.digest.DigestUtils;
+
+import org.apache.beehive.wsm.axis.security.User;
+import org.apache.beehive.wsm.axis.security.Group;
+import org.apache.beehive.wsm.axis.security.UserList;
+import org.apache.beehive.wsm.axis.security.Role;
+
+
+public class MemoryGroupImpl implements Group {
+
+    private String name;
+
+    private Map<String,User> users;
+    private Map<String,Role> roles;
+
+    public MemoryGroupImpl ()
+    {
+        roles = new Hashtable<String,Role>();
+    }
+
+    public void setName ( String name )
+    {
+        this.name = name;
+    }
+
+    public String getName ()
+    {
+        return name;
+    }
+
+
+    public void addUser( User user )
+    {
+        users.put(user.getName(), user);
+    }
+
+    public User getUser ( String user )
+    {
+        return users.get(user);
+    }
+
+    public Collection<User> getUsers ()
+    {
+        return users.values();
+    }
+
+
+    public void addRole( Role role )
+    {
+        roles.put(role.getName(), role);
+    }
+
+    public Role getRole ( String role )
+    {
+        return roles.get(role);
+    }
+
+    public Collection<Role> getRoles ()
+    {
+        return roles.values();
+    }
+
+}
+

Reply via email to