directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r279976 - in /directory: apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/ apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/ shared/ldap/trunk/common/ shared/ldap/trunk/common/src/java/org/apa...
Date Sat, 10 Sep 2005 09:28:31 GMT
Author: trustin
Date: Sat Sep 10 02:28:19 2005
New Revision: 279976

URL: http://svn.apache.org/viewcvs?rev=279976&view=rev
Log:
* Moving LDAP common classes from apacheds-core to ldap-common
* Fixed eclipse goal for ldap-common to generate right source path


Added:
    directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/
    directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/AuthenticationLevel.java
  (with props)
    directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/
    directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/AllUsersUserClass.java
  (with props)
    directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/NameUserClass.java
  (with props)
    directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/ThisEntryUserClass.java
  (with props)
    directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/UserClass.java
  (with props)
    directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/UserGroupUserClass.java
  (with props)
Removed:
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/AuthenticationLevel.java
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/acdf/userclass/
Modified:
    directory/shared/ldap/trunk/common/maven.xml
    directory/shared/ldap/trunk/common/project.properties

Modified: directory/shared/ldap/trunk/common/maven.xml
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/maven.xml?rev=279976&r1=279975&r2=279976&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/maven.xml (original)
+++ directory/shared/ldap/trunk/common/maven.xml Sat Sep 10 02:28:19 2005
@@ -6,6 +6,14 @@
 
   <!-- TODO: replace with eve plugin/antlr plugin? -->
   <preGoal name="java:compile">
+    <attainGoal name="antlr:generate-all"/>
+  </preGoal>        
+  
+  <postGoal name="eclipse">
+    <attainGoal name="antlr:generate-all"/>
+  </postGoal>
+  
+  <goal name="antlr:generate-all">
     <!-- Produces 
     target/antlr/org/apache/common/name/antlrValueTokenTypes.txt 
     -->
@@ -39,9 +47,8 @@
 
     <j:set var="maven.antlr.grammars" value="subtree-specification.g"/>
     <attainGoal name="antlr:generate" />
+  </goal>
 
-  </preGoal>        
-    
   <preGoal name="jar:jar">
     <copy
       file="${basedir}/src/antlr/DnCommonTokenTypes.txt"

Modified: directory/shared/ldap/trunk/common/project.properties
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/project.properties?rev=279976&r1=279975&r2=279976&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/project.properties (original)
+++ directory/shared/ldap/trunk/common/project.properties Sat Sep 10 02:28:19 2005
@@ -3,3 +3,5 @@
 # antlr configuration
 maven.antlr.grammars=
 maven.antlr.src.dir=${basedir}/src/antlr
+
+maven.eclipse.classpath.include=${basedir}/target/antlr

Added: directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/AuthenticationLevel.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/AuthenticationLevel.java?rev=279976&view=auto
==============================================================================
--- directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/AuthenticationLevel.java
(added)
+++ directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/AuthenticationLevel.java
Sat Sep 10 02:28:19 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.common.acl;
+
+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/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/AuthenticationLevel.java
------------------------------------------------------------------------------
    svn:keywords = HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/AllUsersUserClass.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/AllUsersUserClass.java?rev=279976&view=auto
==============================================================================
--- directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/AllUsersUserClass.java
(added)
+++ directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/AllUsersUserClass.java
Sat Sep 10 02:28:19 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.common.acl.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/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/AllUsersUserClass.java
------------------------------------------------------------------------------
    svn:keywords = HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/NameUserClass.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/NameUserClass.java?rev=279976&view=auto
==============================================================================
--- directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/NameUserClass.java
(added)
+++ directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/NameUserClass.java
Sat Sep 10 02:28:19 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.common.acl.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/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/NameUserClass.java
------------------------------------------------------------------------------
    svn:keywords = HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/ThisEntryUserClass.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/ThisEntryUserClass.java?rev=279976&view=auto
==============================================================================
--- directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/ThisEntryUserClass.java
(added)
+++ directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/ThisEntryUserClass.java
Sat Sep 10 02:28:19 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.common.acl.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/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/ThisEntryUserClass.java
------------------------------------------------------------------------------
    svn:keywords = HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/UserClass.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/UserClass.java?rev=279976&view=auto
==============================================================================
--- directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/UserClass.java
(added)
+++ directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/UserClass.java
Sat Sep 10 02:28:19 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.common.acl.userclass;
+
+import java.io.Serializable;
+
+public abstract class UserClass implements Serializable
+{
+    protected UserClass()
+    {
+    }
+}

Propchange: directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/UserClass.java
------------------------------------------------------------------------------
    svn:keywords = HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/UserGroupUserClass.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/UserGroupUserClass.java?rev=279976&view=auto
==============================================================================
--- directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/UserGroupUserClass.java
(added)
+++ directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/UserGroupUserClass.java
Sat Sep 10 02:28:19 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.common.acl.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/shared/ldap/trunk/common/src/java/org/apache/ldap/common/acl/userclass/UserGroupUserClass.java
------------------------------------------------------------------------------
    svn:keywords = HeadURL Id LastChangedBy LastChangedDate LastChangedRevision



Mime
View raw message