directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r578174 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/
Date Fri, 21 Sep 2007 15:28:45 GMT
Author: elecharny
Date: Fri Sep 21 08:28:44 2007
New Revision: 578174

URL: http://svn.apache.org/viewvc?rev=578174&view=rev
Log:
Removed ^M from files

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogEvent.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogSearchEngine.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogStore.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/RevisionOrder.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/Scope.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/SearchableChangeLogStore.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/Tag.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/TagSearchEngine.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/TaggableChangeLogStore.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/TaggableSearchableChangeLogStore.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/package.html

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogEvent.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogEvent.java?rev=578174&r1=578173&r2=578174&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogEvent.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogEvent.java Fri Sep 21 08:28:44 2007
@@ -1,107 +1,107 @@
-/*
- *   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.directory.server.core.changelog;
-
-
-import java.io.Serializable;
-
-import org.apache.directory.server.core.authn.LdapPrincipal;
-import org.apache.directory.shared.ldap.ldif.Entry;
-
-
-/**
- * A loggable directory change event.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
- */
-public class ChangeLogEvent implements Serializable
-{
-    private static final long serialVersionUID = 1L;
-    private final String zuluTime;
-    private final long revision;
-    private final Entry forwardLdif;
-    private final Entry reverseLdif;
-    private final LdapPrincipal committer;
-    
-    
-    /**
-     * Creates a new instance of ChangeLogEvent.
-     *
-     * @param the revision for the change
-     * @param committer the authorized user which triggered the change
-     * @param forwardLdif the LDIF representing the change forward in time
-     * @param reverseLdif an LDIF which reverts the change going reverse in time to an earlier revision
-     */
-    public ChangeLogEvent( long commitId, String zuluTime, LdapPrincipal committer, 
-        Entry forwardLdif, Entry reverseLdif )
-    {
-        this.zuluTime = zuluTime;
-        this.revision = commitId;
-        this.forwardLdif = forwardLdif;
-        this.reverseLdif = reverseLdif;
-        this.committer = committer;
-    }
-
-
-    /**
-     * @return the forwardLdif
-     */
-    public Entry getForwardLdif()
-    {
-        return forwardLdif;
-    }
-
-
-    /**
-     * @return the reverseLdif
-     */
-    public Entry getReverseLdif()
-    {
-        return reverseLdif;
-    }
-
-
-    /**
-     * @return the committer
-     */
-    public LdapPrincipal getCommitter()
-    {
-        return committer;
-    }
-
-
-    /**
-     * @return the revision
-     */
-    public long getRevision()
-    {
-        return revision;
-    }
-
-
-    /**
-     * @return the zuluTime
-     */
-    public String getZuluTime()
-    {
-        return zuluTime;
-    }
-}
+/*
+ *   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.directory.server.core.changelog;
+
+
+import java.io.Serializable;
+
+import org.apache.directory.server.core.authn.LdapPrincipal;
+import org.apache.directory.shared.ldap.ldif.Entry;
+
+
+/**
+ * A loggable directory change event.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ChangeLogEvent implements Serializable
+{
+    private static final long serialVersionUID = 1L;
+    private final String zuluTime;
+    private final long revision;
+    private final Entry forwardLdif;
+    private final Entry reverseLdif;
+    private final LdapPrincipal committer;
+    
+    
+    /**
+     * Creates a new instance of ChangeLogEvent.
+     *
+     * @param the revision for the change
+     * @param committer the authorized user which triggered the change
+     * @param forwardLdif the LDIF representing the change forward in time
+     * @param reverseLdif an LDIF which reverts the change going reverse in time to an earlier revision
+     */
+    public ChangeLogEvent( long commitId, String zuluTime, LdapPrincipal committer, 
+        Entry forwardLdif, Entry reverseLdif )
+    {
+        this.zuluTime = zuluTime;
+        this.revision = commitId;
+        this.forwardLdif = forwardLdif;
+        this.reverseLdif = reverseLdif;
+        this.committer = committer;
+    }
+
+
+    /**
+     * @return the forwardLdif
+     */
+    public Entry getForwardLdif()
+    {
+        return forwardLdif;
+    }
+
+
+    /**
+     * @return the reverseLdif
+     */
+    public Entry getReverseLdif()
+    {
+        return reverseLdif;
+    }
+
+
+    /**
+     * @return the committer
+     */
+    public LdapPrincipal getCommitter()
+    {
+        return committer;
+    }
+
+
+    /**
+     * @return the revision
+     */
+    public long getRevision()
+    {
+        return revision;
+    }
+
+
+    /**
+     * @return the zuluTime
+     */
+    public String getZuluTime()
+    {
+        return zuluTime;
+    }
+}

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogSearchEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogSearchEngine.java?rev=578174&r1=578173&r2=578174&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogSearchEngine.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogSearchEngine.java Fri Sep 21 08:28:44 2007
@@ -1,227 +1,227 @@
-/*
- *   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.directory.server.core.changelog;
-
-
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-
-import org.apache.directory.server.core.authn.LdapPrincipal;
-import org.apache.directory.shared.ldap.filter.ExprNode;
-import org.apache.directory.shared.ldap.ldif.ChangeType;
-import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.schema.ObjectClass;
-
-
-/**
- * A custom search engine designed for optimized searching across ChangeLogEvents
- * within the ChangeLogStore.  The following lookup and search operations are 
- * provided:
- * 
- * <ul>
- *   <li>lookup change by revision</li>
- *   <li>lookup change by date</li>
- *   <li>find all changes</li>
- *   <li>find all changes before or after a revision</li>
- *   <li>find all changes in a revision range</li>
- *   <li>find changes by LDAP namespace scope on DN</li>
- *   <li>find changes by DN</li>
- *   <li>find changes by principal</li>
- *   <li>find changes by change type</li>
- *   <li>find changes by attribute</li>
- *   <li>find changes using a restricted LDAP filter on all of the above factors</li>
- * </ul>
- * 
- * Note change lookups by date can be conducted by first looking up a revision 
- * using a generalizedTime descriptor to find a revision.  Then these revisions 
- * can be plugged into the revision based find and lookup methods.
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
- */
-public interface ChangeLogSearchEngine
-{
-    /**
-     * Looks up the revision in effect at some time specified by a generalized 
-     * time descriptor.
-     *
-     * @param generalizedTime the generalized time descriptor to find the effective revision for
-     * @return the revision that was in effect at a certain time
-     * @throws NamingException if there are failures accessing the store
-     */
-    long lookup( String generalizedTime ) throws NamingException;
-    
-    
-    /**
-     * Looks up the ChangeLogEvent for a revision.
-     *
-     * @param revision to get a ChangeLogEvent for
-     * @return the ChangeLogEvent associated with the revision
-     * @throws NamingException if there are failures accessing the store
-     */
-    ChangeLogEvent lookup( long revision ) throws NamingException;
-    
-    
-    /**
-     * Finds all the ChangeLogEvents within the system since revision 0.
-     * 
-     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
-     * @return an enumeration of all the ChangeLogEvents 
-     * @throws NamingException if there are failures accessing the store
-     */
-    NamingEnumeration<ChangeLogEvent> find( RevisionOrder order ) throws NamingException;
-    
-
-    /**
-     * Finds the ChangeLogEvents that occurred before a revision inclusive.
-     * 
-     * @param revision the revision number to get the ChangeLogEvents before
-     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
-     * @return an enumeration of all the ChangeLogEvents before and including some revision
-     * @throws NamingException if there are failures accessing the store
-     */
-    NamingEnumeration<ChangeLogEvent> findBefore( long revision, RevisionOrder order ) throws NamingException;
-    
-    
-    /**
-     * Finds the ChangeLogEvents that occurred after a revision inclusive.
-     * 
-     * @param revision the revision number to get the ChangeLogEvents after
-     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
-     * @return an enumeration of all the ChangeLogEvents after and including the revision
-     * @throws NamingException if there are failures accessing the store
-     */
-    NamingEnumeration<ChangeLogEvent> findAfter( long revision, RevisionOrder order ) throws NamingException;
-    
-    
-    /**
-     * Finds the ChangeLogEvents that occurred between a revision range inclusive.
-     * 
-     * @param startRevision the revision number to start getting the ChangeLogEvents above
-     * @param endRevision the revision number to start getting the ChangeLogEvents below
-     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
-     * @return an enumeration of all the ChangeLogEvents within some revision range inclusive
-     * @throws NamingException if there are failures accessing the store
-     */
-    NamingEnumeration<ChangeLogEvent> find( long startRevision, long endRevision, RevisionOrder order ) 
-        throws NamingException;
-    
-    
-    /**
-     * Finds all the ChangeLogEvents on an entry.
-     *
-     * @param dn the normalized DN of the entry to get ChangeLogEvents for
-     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
-     * @return the set of changes that occurred on an entry
-     * @throws NamingException if there are failures accessing the store
-     */
-    NamingEnumeration<ChangeLogEvent> find( LdapDN dn, RevisionOrder order ) throws NamingException;
-    
-    
-    /**
-     * Finds all the ChangeLogEvents on an entry base and/or it's children/descendants.
-     *
-     * @param base the normalized DN of the entry base to get ChangeLogEvents for
-     * @param scope the scope of the search under the base similar to LDAP search scope
-     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
-     * @return the set of changes that occurred on an entry and/or it's descendants depending on the scope
-     * @throws NamingException if there are failures accessing the store
-     */
-    NamingEnumeration<ChangeLogEvent> find( LdapDN base, Scope scope, RevisionOrder order ) throws NamingException;
-    
-
-    /**
-     * Finds all the ChangeLogEvents triggered by a principal in the system.
-     *
-     * @param principal the LDAP principal who triggered the events
-     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
-     * @return the set of changes that were triggered by a specific LDAP user
-     * @throws NamingException if there are failures accessing the store
-     */
-    NamingEnumeration<ChangeLogEvent> find( LdapPrincipal principal, RevisionOrder order ) throws NamingException;
-    
-    
-    /**
-     * Finds all the ChangeLogEvents of a particular change type.
-     * 
-     * @param changeType the change type of the ChangeLogEvents to search for
-     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
-     * @return the set of ChangeLogEvents of a particular ChangeType
-     * @throws NamingException if there are failures accessing the store
-     */
-    NamingEnumeration<ChangeLogEvent> find( ChangeType changeType, RevisionOrder order ) throws NamingException;
-    
-    
-    /**
-     * Finds all the ChangeLogEvents altering a particular attributeType.
-     * 
-     * @param attributeType the attributeType definition for the changed attribute to search changes for
-     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
-     * @return the set of ChangeLogEvents on a particular attributeType
-     * @throws NamingException if there are failures accessing the store
-     */
-    NamingEnumeration<ChangeLogEvent> find( AttributeType attributeType, RevisionOrder order ) throws NamingException;
-    
-
-    /**
-     * Finds all the ChangeLogEvents altering a particular objectClass.
-     * 
-     * @param objectClass the objectClass definition for the entries to search changes for
-     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
-     * @return the set of ChangeLogEvents on a particular attributeType
-     * @throws NamingException if there are failures accessing the store
-     */
-    NamingEnumeration<ChangeLogEvent> find( ObjectClass objectClass, RevisionOrder order ) throws NamingException;
-    
-    
-    /**
-     * Finds all the ChangeLogEvents matched by the filter expression tree parameter.
-     * 
-     * The following attributes can be used in the constrained LDAP filter expression 
-     * tree.  The expression must be normalized and can contain only ATA pairs with the 
-     * following set of attributes:
-     * 
-     * <ul>
-     *   <li>ndn: normalized distinguishedName syntax (defaults to matching a string)</li>
-     *   <li>date: generalizedTime syntax</li>
-     *   <li>revision: integer syntax</li>
-     *   <li>attributeType: numeric OID</li>
-     *   <li>objectClass: numeric OID</li>
-     *   <li>changeType: new changeType syntax</li>
-     *   <li>principal: normalized distinguishedName syntax (defaults to matching a string)</li>
-     * </ul>
-     * 
-     * The following are the only kinds of AVA node types allowed:
-     * 
-     * <ul>
-     *   <li>equality (=) </li>
-     *   <li>greaterThanEq (>=) </li>
-     *   <li>lessThanEq (<=) </li>
-     *   <li>scope (specialized) </li>
-     * </ul>
-     * 
-     * @param objectClass the objectClass definition for the entries to search changes for
-     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
-     * @return the set of ChangeLogEvents on entries of a particular objectClass
-     * @throws NamingException if there are failures accessing the store
-     */
-    NamingEnumeration<ChangeLogEvent> find( ExprNode filter, RevisionOrder order ) throws NamingException;
-}
+/*
+ *   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.directory.server.core.changelog;
+
+
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+
+import org.apache.directory.server.core.authn.LdapPrincipal;
+import org.apache.directory.shared.ldap.filter.ExprNode;
+import org.apache.directory.shared.ldap.ldif.ChangeType;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.ObjectClass;
+
+
+/**
+ * A custom search engine designed for optimized searching across ChangeLogEvents
+ * within the ChangeLogStore.  The following lookup and search operations are 
+ * provided:
+ * 
+ * <ul>
+ *   <li>lookup change by revision</li>
+ *   <li>lookup change by date</li>
+ *   <li>find all changes</li>
+ *   <li>find all changes before or after a revision</li>
+ *   <li>find all changes in a revision range</li>
+ *   <li>find changes by LDAP namespace scope on DN</li>
+ *   <li>find changes by DN</li>
+ *   <li>find changes by principal</li>
+ *   <li>find changes by change type</li>
+ *   <li>find changes by attribute</li>
+ *   <li>find changes using a restricted LDAP filter on all of the above factors</li>
+ * </ul>
+ * 
+ * Note change lookups by date can be conducted by first looking up a revision 
+ * using a generalizedTime descriptor to find a revision.  Then these revisions 
+ * can be plugged into the revision based find and lookup methods.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface ChangeLogSearchEngine
+{
+    /**
+     * Looks up the revision in effect at some time specified by a generalized 
+     * time descriptor.
+     *
+     * @param generalizedTime the generalized time descriptor to find the effective revision for
+     * @return the revision that was in effect at a certain time
+     * @throws NamingException if there are failures accessing the store
+     */
+    long lookup( String generalizedTime ) throws NamingException;
+    
+    
+    /**
+     * Looks up the ChangeLogEvent for a revision.
+     *
+     * @param revision to get a ChangeLogEvent for
+     * @return the ChangeLogEvent associated with the revision
+     * @throws NamingException if there are failures accessing the store
+     */
+    ChangeLogEvent lookup( long revision ) throws NamingException;
+    
+    
+    /**
+     * Finds all the ChangeLogEvents within the system since revision 0.
+     * 
+     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
+     * @return an enumeration of all the ChangeLogEvents 
+     * @throws NamingException if there are failures accessing the store
+     */
+    NamingEnumeration<ChangeLogEvent> find( RevisionOrder order ) throws NamingException;
+    
+
+    /**
+     * Finds the ChangeLogEvents that occurred before a revision inclusive.
+     * 
+     * @param revision the revision number to get the ChangeLogEvents before
+     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
+     * @return an enumeration of all the ChangeLogEvents before and including some revision
+     * @throws NamingException if there are failures accessing the store
+     */
+    NamingEnumeration<ChangeLogEvent> findBefore( long revision, RevisionOrder order ) throws NamingException;
+    
+    
+    /**
+     * Finds the ChangeLogEvents that occurred after a revision inclusive.
+     * 
+     * @param revision the revision number to get the ChangeLogEvents after
+     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
+     * @return an enumeration of all the ChangeLogEvents after and including the revision
+     * @throws NamingException if there are failures accessing the store
+     */
+    NamingEnumeration<ChangeLogEvent> findAfter( long revision, RevisionOrder order ) throws NamingException;
+    
+    
+    /**
+     * Finds the ChangeLogEvents that occurred between a revision range inclusive.
+     * 
+     * @param startRevision the revision number to start getting the ChangeLogEvents above
+     * @param endRevision the revision number to start getting the ChangeLogEvents below
+     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
+     * @return an enumeration of all the ChangeLogEvents within some revision range inclusive
+     * @throws NamingException if there are failures accessing the store
+     */
+    NamingEnumeration<ChangeLogEvent> find( long startRevision, long endRevision, RevisionOrder order ) 
+        throws NamingException;
+    
+    
+    /**
+     * Finds all the ChangeLogEvents on an entry.
+     *
+     * @param dn the normalized DN of the entry to get ChangeLogEvents for
+     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
+     * @return the set of changes that occurred on an entry
+     * @throws NamingException if there are failures accessing the store
+     */
+    NamingEnumeration<ChangeLogEvent> find( LdapDN dn, RevisionOrder order ) throws NamingException;
+    
+    
+    /**
+     * Finds all the ChangeLogEvents on an entry base and/or it's children/descendants.
+     *
+     * @param base the normalized DN of the entry base to get ChangeLogEvents for
+     * @param scope the scope of the search under the base similar to LDAP search scope
+     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
+     * @return the set of changes that occurred on an entry and/or it's descendants depending on the scope
+     * @throws NamingException if there are failures accessing the store
+     */
+    NamingEnumeration<ChangeLogEvent> find( LdapDN base, Scope scope, RevisionOrder order ) throws NamingException;
+    
+
+    /**
+     * Finds all the ChangeLogEvents triggered by a principal in the system.
+     *
+     * @param principal the LDAP principal who triggered the events
+     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
+     * @return the set of changes that were triggered by a specific LDAP user
+     * @throws NamingException if there are failures accessing the store
+     */
+    NamingEnumeration<ChangeLogEvent> find( LdapPrincipal principal, RevisionOrder order ) throws NamingException;
+    
+    
+    /**
+     * Finds all the ChangeLogEvents of a particular change type.
+     * 
+     * @param changeType the change type of the ChangeLogEvents to search for
+     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
+     * @return the set of ChangeLogEvents of a particular ChangeType
+     * @throws NamingException if there are failures accessing the store
+     */
+    NamingEnumeration<ChangeLogEvent> find( ChangeType changeType, RevisionOrder order ) throws NamingException;
+    
+    
+    /**
+     * Finds all the ChangeLogEvents altering a particular attributeType.
+     * 
+     * @param attributeType the attributeType definition for the changed attribute to search changes for
+     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
+     * @return the set of ChangeLogEvents on a particular attributeType
+     * @throws NamingException if there are failures accessing the store
+     */
+    NamingEnumeration<ChangeLogEvent> find( AttributeType attributeType, RevisionOrder order ) throws NamingException;
+    
+
+    /**
+     * Finds all the ChangeLogEvents altering a particular objectClass.
+     * 
+     * @param objectClass the objectClass definition for the entries to search changes for
+     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
+     * @return the set of ChangeLogEvents on a particular attributeType
+     * @throws NamingException if there are failures accessing the store
+     */
+    NamingEnumeration<ChangeLogEvent> find( ObjectClass objectClass, RevisionOrder order ) throws NamingException;
+    
+    
+    /**
+     * Finds all the ChangeLogEvents matched by the filter expression tree parameter.
+     * 
+     * The following attributes can be used in the constrained LDAP filter expression 
+     * tree.  The expression must be normalized and can contain only ATA pairs with the 
+     * following set of attributes:
+     * 
+     * <ul>
+     *   <li>ndn: normalized distinguishedName syntax (defaults to matching a string)</li>
+     *   <li>date: generalizedTime syntax</li>
+     *   <li>revision: integer syntax</li>
+     *   <li>attributeType: numeric OID</li>
+     *   <li>objectClass: numeric OID</li>
+     *   <li>changeType: new changeType syntax</li>
+     *   <li>principal: normalized distinguishedName syntax (defaults to matching a string)</li>
+     * </ul>
+     * 
+     * The following are the only kinds of AVA node types allowed:
+     * 
+     * <ul>
+     *   <li>equality (=) </li>
+     *   <li>greaterThanEq (>=) </li>
+     *   <li>lessThanEq (<=) </li>
+     *   <li>scope (specialized) </li>
+     * </ul>
+     * 
+     * @param objectClass the objectClass definition for the entries to search changes for
+     * @param order the order in which to return ChangeLogEvents (ordered by revision number)
+     * @return the set of ChangeLogEvents on entries of a particular objectClass
+     * @throws NamingException if there are failures accessing the store
+     */
+    NamingEnumeration<ChangeLogEvent> find( ExprNode filter, RevisionOrder order ) throws NamingException;
+}

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogService.java?rev=578174&r1=578173&r2=578174&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogService.java Fri Sep 21 08:28:44 2007
@@ -1,32 +1,32 @@
-/*
- *   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.directory.server.core.changelog;
-
-
-/**
- * TODO ChangeLogService.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
- */
-public interface ChangeLogService
-{
-
-}
+/*
+ *   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.directory.server.core.changelog;
+
+
+/**
+ * TODO ChangeLogService.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface ChangeLogService
+{
+
+}

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogStore.java?rev=578174&r1=578173&r2=578174&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogStore.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLogStore.java Fri Sep 21 08:28:44 2007
@@ -1,55 +1,55 @@
-/*
- *   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.directory.server.core.changelog;
-
-import javax.naming.NamingException;
-
-import org.apache.directory.server.core.authn.LdapPrincipal;
-import org.apache.directory.shared.ldap.ldif.Entry;
-
-
-/**
- * A store for change events on the directory which exposes methods for 
- * managing, querying and in general performing legal operations on the log.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
- */
-public interface ChangeLogStore 
-{
-    /**
-     * Get's the current revision of the server (a.k.a. the HEAD revision).
-     *
-     * @return the current revision of the server
-     */
-    long getCurrentRevision();
-    
-    /**
-     * Records a change as a forward LDIF, a reverse change to revert the change and
-     * the authorized principal triggering the revertable change event.
-     *
-     * @param principal the authorized LDAP principal triggering the change
-     * @param forward LDIF of the change going to the next state
-     * @param reverse LDIF (anti-operation): the change required to revert this change
-     * @return the commit id or revision representing the change within the log
-     * @throws NamingException
-     */
-    long log( LdapPrincipal principal, Entry forward, Entry reverse ) throws NamingException;
-}
+/*
+ *   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.directory.server.core.changelog;
+
+import javax.naming.NamingException;
+
+import org.apache.directory.server.core.authn.LdapPrincipal;
+import org.apache.directory.shared.ldap.ldif.Entry;
+
+
+/**
+ * A store for change events on the directory which exposes methods for 
+ * managing, querying and in general performing legal operations on the log.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface ChangeLogStore 
+{
+    /**
+     * Get's the current revision of the server (a.k.a. the HEAD revision).
+     *
+     * @return the current revision of the server
+     */
+    long getCurrentRevision();
+    
+    /**
+     * Records a change as a forward LDIF, a reverse change to revert the change and
+     * the authorized principal triggering the revertable change event.
+     *
+     * @param principal the authorized LDAP principal triggering the change
+     * @param forward LDIF of the change going to the next state
+     * @param reverse LDIF (anti-operation): the change required to revert this change
+     * @return the commit id or revision representing the change within the log
+     * @throws NamingException
+     */
+    long log( LdapPrincipal principal, Entry forward, Entry reverse ) throws NamingException;
+}

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/RevisionOrder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/RevisionOrder.java?rev=578174&r1=578173&r2=578174&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/RevisionOrder.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/RevisionOrder.java Fri Sep 21 08:28:44 2007
@@ -1,52 +1,52 @@
-/*
- *   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.directory.server.core.changelog;
-
-
-/**
- * The order, based on revision numbers, in which to return log changes or 
- * tags.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
- */
-public enum RevisionOrder
-{
-    AscendingOrder( true ),
-    DescendingOrder( false );
-    
-
-    private final boolean ascending;
-    
-
-    private RevisionOrder( boolean ascending )
-    {
-        this.ascending = ascending;
-    }
-
-
-    /**
-     * @return the ascending
-     */
-    public boolean isAscending()
-    {
-        return ascending;
-    }
-}
+/*
+ *   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.directory.server.core.changelog;
+
+
+/**
+ * The order, based on revision numbers, in which to return log changes or 
+ * tags.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public enum RevisionOrder
+{
+    AscendingOrder( true ),
+    DescendingOrder( false );
+    
+
+    private final boolean ascending;
+    
+
+    private RevisionOrder( boolean ascending )
+    {
+        this.ascending = ascending;
+    }
+
+
+    /**
+     * @return the ascending
+     */
+    public boolean isAscending()
+    {
+        return ascending;
+    }
+}

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/Scope.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/Scope.java?rev=578174&r1=578173&r2=578174&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/Scope.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/Scope.java Fri Sep 21 08:28:44 2007
@@ -1,55 +1,55 @@
-/*
- *   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.directory.server.core.changelog;
-
-
-import javax.naming.directory.SearchControls;
-
-
-/**
- * TODO Scope.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
- */
-public enum Scope
-{
-    Subtree( SearchControls.SUBTREE_SCOPE ),
-    OneLevel( SearchControls.ONELEVEL_SCOPE ),
-    Object( SearchControls.OBJECT_SCOPE );
-    
-    
-    private final int scope;
-    
-    
-    private Scope( int scope )
-    {
-        this.scope = scope;
-    }
-
-
-    /**
-     * @return the scope
-     */
-    public int getScope()
-    {
-        return scope;
-    }
-}
+/*
+ *   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.directory.server.core.changelog;
+
+
+import javax.naming.directory.SearchControls;
+
+
+/**
+ * TODO Scope.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public enum Scope
+{
+    Subtree( SearchControls.SUBTREE_SCOPE ),
+    OneLevel( SearchControls.ONELEVEL_SCOPE ),
+    Object( SearchControls.OBJECT_SCOPE );
+    
+    
+    private final int scope;
+    
+    
+    private Scope( int scope )
+    {
+        this.scope = scope;
+    }
+
+
+    /**
+     * @return the scope
+     */
+    public int getScope()
+    {
+        return scope;
+    }
+}

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/SearchableChangeLogStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/SearchableChangeLogStore.java?rev=578174&r1=578173&r2=578174&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/SearchableChangeLogStore.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/SearchableChangeLogStore.java Fri Sep 21 08:28:44 2007
@@ -1,37 +1,37 @@
-/*
- *   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.directory.server.core.changelog;
-
-
-/**
- * TODO SearchableChangeLogStore.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
- */
-public interface SearchableChangeLogStore extends ChangeLogStore
-{
-    /**
-     * Get's the search engine for this SearchableChangeLogStore.
-     * 
-     * @return the search engine for this SearchableChangeLogStore
-     */
-    ChangeLogSearchEngine getChangeLogSearchEngine();
-}
+/*
+ *   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.directory.server.core.changelog;
+
+
+/**
+ * TODO SearchableChangeLogStore.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface SearchableChangeLogStore extends ChangeLogStore
+{
+    /**
+     * Get's the search engine for this SearchableChangeLogStore.
+     * 
+     * @return the search engine for this SearchableChangeLogStore
+     */
+    ChangeLogSearchEngine getChangeLogSearchEngine();
+}

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/Tag.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/Tag.java?rev=578174&r1=578173&r2=578174&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/Tag.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/Tag.java Fri Sep 21 08:28:44 2007
@@ -1,63 +1,63 @@
-/*
- *   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.directory.server.core.changelog;
-
-
-/**
- * A tag on a revision representing a snapshot of the directory server's 
- * state.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
- */
-public class Tag
-{
-    /*
-     * TODO should we have date in which tag was taken
-     * TODO should we have the date of the revision
-     */
-    private final long revision;
-    private final String description;
-    
-    
-    public Tag( long revision, String description )
-    {
-        this.revision = revision;
-        this.description = description;
-    }
-
-
-    /**
-     * @return the revision
-     */
-    public long getRevision()
-    {
-        return revision;
-    }
-
-
-    /**
-     * @return the description
-     */
-    public String getDescription()
-    {
-        return description;
-    }
-}
+/*
+ *   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.directory.server.core.changelog;
+
+
+/**
+ * A tag on a revision representing a snapshot of the directory server's 
+ * state.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class Tag
+{
+    /*
+     * TODO should we have date in which tag was taken
+     * TODO should we have the date of the revision
+     */
+    private final long revision;
+    private final String description;
+    
+    
+    public Tag( long revision, String description )
+    {
+        this.revision = revision;
+        this.description = description;
+    }
+
+
+    /**
+     * @return the revision
+     */
+    public long getRevision()
+    {
+        return revision;
+    }
+
+
+    /**
+     * @return the description
+     */
+    public String getDescription()
+    {
+        return description;
+    }
+}

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/TagSearchEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/TagSearchEngine.java?rev=578174&r1=578173&r2=578174&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/TagSearchEngine.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/TagSearchEngine.java Fri Sep 21 08:28:44 2007
@@ -1,129 +1,129 @@
-/*
- *   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.directory.server.core.changelog;
-
-
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-
-
-/**
- * An optional search interface supported by TaggableChangeLogStores.  This 
- * interface enables the:
- * 
- * <ul>
- *   <li>lookup of tags by revision</li>
- *   <li>finding all tags</li>
- *   <li>finding tags before or after a revision</li>
- *   <li>finding tags in some revision range</li>
- * </ul>
- * 
- * While investigating these interface methods keep in mind that only one 
- * tag can exist on a revision.  Unlike subversion which allows multiple 
- * tags on a revision we only allow at most one: more than one is pointless.
- * 
- * Date wise searches for tags are not present within this interface since 
- * they should be used in conjunction with the ChangeLogSearchEngine which
- * is by default supported by TaggableSearchableChangeLogStores.  The 
- * ChangeLogSearchEngine can find revisions based on time descriptors and
- * returned revisions can be checked for the presence of tags using this
- * interface.  The whole point to enabling both search engines in a single
- * interfaces is because if you can search for tags you should be able to 
- * search for revisions: however the converse may not be the case.
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
- */
-public interface TagSearchEngine
-{
-
-    // -----------------------------------------------------------------------
-    // Tag Lookup Operations
-    // -----------------------------------------------------------------------
-
-    
-    /**
-     * Gets the tag for a specific snapshot if that snapshot exists. 
-     *
-     * @param revision the revision number to use to check for a snapshot
-     * @return the snapshot at the revision if one exists, otherwise null
-     * @throws NamingException if there is a problem accessing the store
-     */
-    Tag lookup( long revision ) throws NamingException;
-    
-    /**
-     * Checks to see if a snapshot exists for a specific revision. 
-     *
-     * @param revision the revision number to use to check for a snapshot
-     * @return true if a snapshot exists at the revision, false otherwise
-     * @throws NamingException if there is a problem accessing the store
-     */
-    boolean has( long revision ) throws NamingException;
-
-
-    // -----------------------------------------------------------------------
-    // Tag Search Operations
-    // -----------------------------------------------------------------------
-
-    
-    /**
-     * Finds all the snapshot tags taken since revision 0 until the current 
-     * revision.
-     *
-     * @param order the revision order in which to return snapshot tags 
-     * @return an enumeration over the tags of all snapshots taken since revision 0
-     * @throws NamingException if there is a problem accessing the store
-     */
-    NamingEnumeration<Tag> find( RevisionOrder order ) throws NamingException;
-    
-    /**
-     * Finds all the snapshot tags taken before a specific revision.  If a tag 
-     * exists at the revision parameter it will be returned as well.
-     *
-     * @param revision the revision number to get snapshots before 
-     * @param order the revision order in which to return snapshot tags 
-     * @return an enumeration over the tags of all snapshots taken before a revision inclusive
-     * @throws NamingException if there is a problem accessing the store
-     */
-    NamingEnumeration<Tag> findBefore( long revision, RevisionOrder order ) throws NamingException;
-    
-    /**
-     * Finds all the snapshot tags taken after a specific revision.  If a tag 
-     * exists at the revision parameter it will be returned as well.
-     *
-     * @param revision the revision number to get snapshots after
-     * @param order the revision order in which to return snapshot tags 
-     * @return an enumeration over the tags of all snapshots taken after a revision inclusive
-     * @throws NamingException if there is a problem accessing the store
-     */
-    NamingEnumeration<Tag> findAfter( long revision, RevisionOrder order ) throws NamingException;
-    
-    /**
-     * Enumerates over the tags of all snapshots taken between a specific revision 
-     * range inclusive.  The first revision parameter should be less than or equal 
-     * to the second revision parameter.
-     *
-     * @param order the revision order in which to return snapshot tags 
-     * @return enumeration over all the snapshots taken in a revision range inclusive
-     * @throws NamingException if there is a problem accessing the store
-     */
-    NamingEnumeration<Tag> find( long startRevision, long endRevision, RevisionOrder order ) 
-        throws NamingException;
-}
+/*
+ *   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.directory.server.core.changelog;
+
+
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+
+
+/**
+ * An optional search interface supported by TaggableChangeLogStores.  This 
+ * interface enables the:
+ * 
+ * <ul>
+ *   <li>lookup of tags by revision</li>
+ *   <li>finding all tags</li>
+ *   <li>finding tags before or after a revision</li>
+ *   <li>finding tags in some revision range</li>
+ * </ul>
+ * 
+ * While investigating these interface methods keep in mind that only one 
+ * tag can exist on a revision.  Unlike subversion which allows multiple 
+ * tags on a revision we only allow at most one: more than one is pointless.
+ * 
+ * Date wise searches for tags are not present within this interface since 
+ * they should be used in conjunction with the ChangeLogSearchEngine which
+ * is by default supported by TaggableSearchableChangeLogStores.  The 
+ * ChangeLogSearchEngine can find revisions based on time descriptors and
+ * returned revisions can be checked for the presence of tags using this
+ * interface.  The whole point to enabling both search engines in a single
+ * interfaces is because if you can search for tags you should be able to 
+ * search for revisions: however the converse may not be the case.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface TagSearchEngine
+{
+
+    // -----------------------------------------------------------------------
+    // Tag Lookup Operations
+    // -----------------------------------------------------------------------
+
+    
+    /**
+     * Gets the tag for a specific snapshot if that snapshot exists. 
+     *
+     * @param revision the revision number to use to check for a snapshot
+     * @return the snapshot at the revision if one exists, otherwise null
+     * @throws NamingException if there is a problem accessing the store
+     */
+    Tag lookup( long revision ) throws NamingException;
+    
+    /**
+     * Checks to see if a snapshot exists for a specific revision. 
+     *
+     * @param revision the revision number to use to check for a snapshot
+     * @return true if a snapshot exists at the revision, false otherwise
+     * @throws NamingException if there is a problem accessing the store
+     */
+    boolean has( long revision ) throws NamingException;
+
+
+    // -----------------------------------------------------------------------
+    // Tag Search Operations
+    // -----------------------------------------------------------------------
+
+    
+    /**
+     * Finds all the snapshot tags taken since revision 0 until the current 
+     * revision.
+     *
+     * @param order the revision order in which to return snapshot tags 
+     * @return an enumeration over the tags of all snapshots taken since revision 0
+     * @throws NamingException if there is a problem accessing the store
+     */
+    NamingEnumeration<Tag> find( RevisionOrder order ) throws NamingException;
+    
+    /**
+     * Finds all the snapshot tags taken before a specific revision.  If a tag 
+     * exists at the revision parameter it will be returned as well.
+     *
+     * @param revision the revision number to get snapshots before 
+     * @param order the revision order in which to return snapshot tags 
+     * @return an enumeration over the tags of all snapshots taken before a revision inclusive
+     * @throws NamingException if there is a problem accessing the store
+     */
+    NamingEnumeration<Tag> findBefore( long revision, RevisionOrder order ) throws NamingException;
+    
+    /**
+     * Finds all the snapshot tags taken after a specific revision.  If a tag 
+     * exists at the revision parameter it will be returned as well.
+     *
+     * @param revision the revision number to get snapshots after
+     * @param order the revision order in which to return snapshot tags 
+     * @return an enumeration over the tags of all snapshots taken after a revision inclusive
+     * @throws NamingException if there is a problem accessing the store
+     */
+    NamingEnumeration<Tag> findAfter( long revision, RevisionOrder order ) throws NamingException;
+    
+    /**
+     * Enumerates over the tags of all snapshots taken between a specific revision 
+     * range inclusive.  The first revision parameter should be less than or equal 
+     * to the second revision parameter.
+     *
+     * @param order the revision order in which to return snapshot tags 
+     * @return enumeration over all the snapshots taken in a revision range inclusive
+     * @throws NamingException if there is a problem accessing the store
+     */
+    NamingEnumeration<Tag> find( long startRevision, long endRevision, RevisionOrder order ) 
+        throws NamingException;
+}

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/TaggableChangeLogStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/TaggableChangeLogStore.java?rev=578174&r1=578173&r2=578174&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/TaggableChangeLogStore.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/TaggableChangeLogStore.java Fri Sep 21 08:28:44 2007
@@ -1,50 +1,50 @@
-/*
- *   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.directory.server.core.changelog;
-
-import javax.naming.NamingException;
-
-
-/**
- * A ChangeLogStore which allows tagging for tracking server state snapshots.
- * At most one tag per revision can be created.  There is no point to creating
- * more than one tag on a revision in our case for snapshotting server state.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
- */
-public interface TaggableChangeLogStore extends ChangeLogStore
-{
-    /**
-     * Creates a tag for a snapshot of the server in a specific state at a revision.
-     *
-     * @param the revision to tag the snapshot
-     * @throws NamingException
-     */
-    Tag tag( long revision ) throws NamingException;
-
-    /**
-     * Creates a snapshot of the server at the current revision.
-     *
-     * @return the revision at which the tag is created
-     * @throws NamingException
-     */
-    Tag tag() throws NamingException;
-}
+/*
+ *   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.directory.server.core.changelog;
+
+import javax.naming.NamingException;
+
+
+/**
+ * A ChangeLogStore which allows tagging for tracking server state snapshots.
+ * At most one tag per revision can be created.  There is no point to creating
+ * more than one tag on a revision in our case for snapshotting server state.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface TaggableChangeLogStore extends ChangeLogStore
+{
+    /**
+     * Creates a tag for a snapshot of the server in a specific state at a revision.
+     *
+     * @param the revision to tag the snapshot
+     * @throws NamingException
+     */
+    Tag tag( long revision ) throws NamingException;
+
+    /**
+     * Creates a snapshot of the server at the current revision.
+     *
+     * @return the revision at which the tag is created
+     * @throws NamingException
+     */
+    Tag tag() throws NamingException;
+}

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/TaggableSearchableChangeLogStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/TaggableSearchableChangeLogStore.java?rev=578174&r1=578173&r2=578174&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/TaggableSearchableChangeLogStore.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/TaggableSearchableChangeLogStore.java Fri Sep 21 08:28:44 2007
@@ -1,37 +1,37 @@
-/*
- *   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.directory.server.core.changelog;
-
-
-/**
- * TODO TaggableSearchableChangeLogStore.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @version $Rev$, $Date$
- */
-public interface TaggableSearchableChangeLogStore extends TaggableChangeLogStore, SearchableChangeLogStore
-{
-    /**
-     * Get's the tag search engine for this TaggableSearchableChangeLogStore.
-     *
-     * @return the snapshot query engine for this store.
-     */
-    TagSearchEngine getTagSearchEngine();
-}
+/*
+ *   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.directory.server.core.changelog;
+
+
+/**
+ * TODO TaggableSearchableChangeLogStore.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface TaggableSearchableChangeLogStore extends TaggableChangeLogStore, SearchableChangeLogStore
+{
+    /**
+     * Get's the tag search engine for this TaggableSearchableChangeLogStore.
+     *
+     * @return the snapshot query engine for this store.
+     */
+    TagSearchEngine getTagSearchEngine();
+}

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/package.html
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/package.html?rev=578174&r1=578173&r2=578174&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/package.html (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/package.html Fri Sep 21 08:28:44 2007
@@ -1,28 +1,28 @@
-
-
-<h1>Ideas</h1>
-
-Use AdminModel to control what goes into the changelog ?  Or use admin model to identify 
-scopes/concerns which are put into different channels in the changelog?  Cool idea perhaps,
-perhaps not.  To some degree the DN does the scope thingy for us.  There really is no point
-to having an additional scope parameter.
-
-Perhaps we can also inject a new revisions (multi-valued) operational attribute into 
-entries to track the revisions of changes in the changeLog to that entry.  This can
-be used to ask the server for a log of changes that have been performed on a specific 
-entry.  Whoa that's really hot for auditing!
-
-We could try to do the same thing (meaning having a tags operational attribute) with revisions.
-However this is pointless since the tag revision would already be in the revisions attribute.  Also
-a tag would select entries dynamically: all entries with revisions below the tag revision would be
-selected in the tag.  This leads to a neat idea: you can easily regenerate not only the revision 
-history of an entry, you can do it for an entire subtree, and furthermore you might even be able
-to conduct search operations based on a tag and the state of the server in the past.  This would be
-pretty wild.
-
-Another neat thing that could be done is to request an attribute by revision using the protocol 
-based tagging mechanism in LDAP.  For example we have language based tags like cn;lang-en so why
-not have version based tags like cn;revision-23.  When requested in this mannar the server can 
-reconstruct the state of the attribute at a specific revision and return it to the user.  This is
-an incredible capability when storing the configurations of systems in LDAP.  Being able to rollback
-to a previous configuration or just inquire about a previous state is a powerful feature to have.
+
+
+<h1>Ideas</h1>
+
+Use AdminModel to control what goes into the changelog ?  Or use admin model to identify 
+scopes/concerns which are put into different channels in the changelog?  Cool idea perhaps,
+perhaps not.  To some degree the DN does the scope thingy for us.  There really is no point
+to having an additional scope parameter.
+
+Perhaps we can also inject a new revisions (multi-valued) operational attribute into 
+entries to track the revisions of changes in the changeLog to that entry.  This can
+be used to ask the server for a log of changes that have been performed on a specific 
+entry.  Whoa that's really hot for auditing!
+
+We could try to do the same thing (meaning having a tags operational attribute) with revisions.
+However this is pointless since the tag revision would already be in the revisions attribute.  Also
+a tag would select entries dynamically: all entries with revisions below the tag revision would be
+selected in the tag.  This leads to a neat idea: you can easily regenerate not only the revision 
+history of an entry, you can do it for an entire subtree, and furthermore you might even be able
+to conduct search operations based on a tag and the state of the server in the past.  This would be
+pretty wild.
+
+Another neat thing that could be done is to request an attribute by revision using the protocol 
+based tagging mechanism in LDAP.  For example we have language based tags like cn;lang-en so why
+not have version based tags like cn;revision-23.  When requested in this mannar the server can 
+reconstruct the state of the attribute at a specific revision and return it to the user.  This is
+an incredible capability when storing the configurations of systems in LDAP.  Being able to rollback
+to a previous configuration or just inquire about a previous state is a powerful feature to have.



Mime
View raw message