directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r279967 - in /directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf: ./ userclass/
Date Sat, 10 Sep 2005 07:27:34 GMT
Author: trustin
Date: Sat Sep 10 00:27:27 2005
New Revision: 279967

URL: http://svn.apache.org/viewcvs?rev=279967&view=rev
Log:
Added UserClass and AuthenticationLevel entity required to implement ACDF.

Added:
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/AuthenticationLevel.java
  (with props)
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/AllUsersUserClass.java
  (with props)
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/NameUserClass.java
  (with props)
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/ThisEntryUserClass.java
  (with props)
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/UserClass.java
  (with props)
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/UserGroupUserClass.java
  (with props)

Added: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/AuthenticationLevel.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/AuthenticationLevel.java?rev=279967&view=auto
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/AuthenticationLevel.java
(added)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/AuthenticationLevel.java
Sat Sep 10 00:27:27 2005
@@ -0,0 +1,79 @@
+/*
+ *   @(#) $Id$
+ *
+ *   Copyright 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.
+ *
+ */
+package org.apache.ldap.server.authz.acdf;
+
+import java.io.Serializable;
+
+public class AuthenticationLevel implements Comparable, Serializable
+{
+    private static final long serialVersionUID = -6757937682267073130L;
+
+    public static final AuthenticationLevel NONE =
+        new AuthenticationLevel( 0, "none" );
+    public static final AuthenticationLevel SIMPLE =
+        new AuthenticationLevel( 1, "simple" );
+    public static final AuthenticationLevel STRONG =
+        new AuthenticationLevel( 2, "strong" );
+
+    private final int level;
+    private final String desc;
+    
+    private AuthenticationLevel( int level, String desc )
+    {
+        this.level = level;
+        this.desc = desc;
+    }
+    
+    public int getLevel()
+    {
+        return level;
+    }
+    
+    public String getDescription()
+    {
+        return desc;
+    }
+    
+    public String toString()
+    {
+        return desc;
+    }
+    
+    public boolean equals( Object o )
+    {
+        if( this == o )
+        {
+            return true;
+        }
+        
+        if( o instanceof AuthenticationLevel )
+        {
+            AuthenticationLevel that = ( AuthenticationLevel ) o;
+            return this.level == that.level;
+        }
+        
+        return false;
+    }
+    
+    public int compareTo( Object o )
+    {
+        AuthenticationLevel that = ( AuthenticationLevel ) o;
+        return this.level - that.level;
+    }
+}

Propchange: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/AuthenticationLevel.java
------------------------------------------------------------------------------
    svn:keywords = HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/AllUsersUserClass.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/AllUsersUserClass.java?rev=279967&view=auto
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/AllUsersUserClass.java
(added)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/AllUsersUserClass.java
Sat Sep 10 00:27:27 2005
@@ -0,0 +1,45 @@
+/*
+ *   @(#) $Id$
+ *
+ *   Copyright 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.
+ *
+ */
+package org.apache.ldap.server.authz.acdf.userclass;
+
+public class AllUsersUserClass extends UserClass
+{
+    private static final long serialVersionUID = 8967984720792510292L;
+    
+    private static final AllUsersUserClass INSTANCE = new AllUsersUserClass();
+    
+    public static AllUsersUserClass getInstance()
+    {
+        return INSTANCE;
+    }
+
+    private AllUsersUserClass()
+    {
+    }
+    
+    public boolean equals( Object o )
+    {
+        return ( o instanceof AllUsersUserClass );
+    }
+    
+    public String toString()
+    {
+        return "allUsers";
+    }
+}

Propchange: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/AllUsersUserClass.java
------------------------------------------------------------------------------
    svn:keywords = HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/NameUserClass.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/NameUserClass.java?rev=279967&view=auto
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/NameUserClass.java
(added)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/NameUserClass.java
Sat Sep 10 00:27:27 2005
@@ -0,0 +1,59 @@
+/*
+ *   @(#) $Id$
+ *
+ *   Copyright 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.
+ *
+ */
+package org.apache.ldap.server.authz.acdf.userclass;
+
+import org.apache.ldap.common.name.LdapName;
+
+public class NameUserClass extends UserClass
+{
+    private static final long serialVersionUID = -4168412030168359882L;
+
+    private final LdapName userName;
+    
+    public NameUserClass( LdapName username )
+    {
+        this.userName = ( LdapName ) username.clone();
+    }
+    
+    public LdapName getUserName()
+    {
+        return ( LdapName ) userName.clone();
+    }
+
+    public boolean equals( Object o )
+    {
+        if( this == o )
+        {
+            return true;
+        }
+        
+        if( o instanceof NameUserClass )
+        {
+            NameUserClass that = ( NameUserClass ) o;
+            return this.userName.equals( that.userName );
+        }
+        
+        return false;
+    }
+    
+    public String toString()
+    {
+        return "name: " + userName;
+    }
+}

Propchange: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/NameUserClass.java
------------------------------------------------------------------------------
    svn:keywords = HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/ThisEntryUserClass.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/ThisEntryUserClass.java?rev=279967&view=auto
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/ThisEntryUserClass.java
(added)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/ThisEntryUserClass.java
Sat Sep 10 00:27:27 2005
@@ -0,0 +1,45 @@
+/*
+ *   @(#) $Id$
+ *
+ *   Copyright 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.
+ *
+ */
+package org.apache.ldap.server.authz.acdf.userclass;
+
+public class ThisEntryUserClass extends UserClass
+{
+    private static final long serialVersionUID = -8189325270233754470L;
+
+    private static final ThisEntryUserClass INSTANCE = new ThisEntryUserClass();
+    
+    public static ThisEntryUserClass getInstance()
+    {
+        return INSTANCE;
+    }
+
+    private ThisEntryUserClass()
+    {
+    }
+
+    public boolean equals( Object o )
+    {
+        return ( o instanceof ThisEntryUserClass );
+    }
+    
+    public String toString()
+    {
+        return "thisEntry";
+    }
+}

Propchange: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/ThisEntryUserClass.java
------------------------------------------------------------------------------
    svn:keywords = HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/UserClass.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/UserClass.java?rev=279967&view=auto
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/UserClass.java
(added)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/UserClass.java
Sat Sep 10 00:27:27 2005
@@ -0,0 +1,28 @@
+/*
+ *   @(#) $Id$
+ *
+ *   Copyright 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.
+ *
+ */
+package org.apache.ldap.server.authz.acdf.userclass;
+
+import java.io.Serializable;
+
+public abstract class UserClass implements Serializable
+{
+    protected UserClass()
+    {
+    }
+}

Propchange: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/UserClass.java
------------------------------------------------------------------------------
    svn:keywords = HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/UserGroupUserClass.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/UserGroupUserClass.java?rev=279967&view=auto
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/UserGroupUserClass.java
(added)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/UserGroupUserClass.java
Sat Sep 10 00:27:27 2005
@@ -0,0 +1,59 @@
+/*
+ *   @(#) $Id$
+ *
+ *   Copyright 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.
+ *
+ */
+package org.apache.ldap.server.authz.acdf.userclass;
+
+import org.apache.ldap.common.name.LdapName;
+
+public class UserGroupUserClass extends UserClass
+{
+    private static final long serialVersionUID = 8887107815072965807L;
+
+    private final LdapName groupName;
+    
+    public UserGroupUserClass( LdapName username )
+    {
+        this.groupName = ( LdapName ) username.clone();
+    }
+    
+    public LdapName getGroupName()
+    {
+        return ( LdapName ) groupName.clone();
+    }
+
+    public boolean equals( Object o )
+    {
+        if( this == o )
+        {
+            return true;
+        }
+        
+        if( o instanceof UserGroupUserClass )
+        {
+            UserGroupUserClass that = ( UserGroupUserClass ) o;
+            return this.groupName.equals( that.groupName );
+        }
+        
+        return false;
+    }
+    
+    public String toString()
+    {
+        return "userGroup: " + groupName;
+    }
+}

Propchange: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/UserGroupUserClass.java
------------------------------------------------------------------------------
    svn:keywords = HeadURL Id LastChangedBy LastChangedDate LastChangedRevision



Mime
View raw message