org.apache.directory.server.core.changelog
Class ChangeLogEvent

java.lang.Object
  extended by org.apache.directory.server.core.changelog.ChangeLogEvent
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class ChangeLogEvent
extends java.lang.Object
implements java.io.Externalizable

A loggable directory change event.

Version:
$Rev$, $Date$
Author:
Apache Directory Project
See Also:
Serialized Form

Constructor Summary
ChangeLogEvent()
          Creates a new instance of ChangeLogEvent, used during the deserialization process
ChangeLogEvent(long revision, java.lang.String zuluTime, LdapPrincipal committer, org.apache.directory.shared.ldap.ldif.LdifEntry forwardLdif, org.apache.directory.shared.ldap.ldif.LdifEntry reverseLdif)
          Creates a new instance of ChangeLogEvent.
ChangeLogEvent(long revision, java.lang.String zuluTime, LdapPrincipal committer, org.apache.directory.shared.ldap.ldif.LdifEntry forwardLdif, java.util.List<org.apache.directory.shared.ldap.ldif.LdifEntry> reverseLdifs)
          Creates a new instance of ChangeLogEvent.
 
Method Summary
 org.apache.directory.shared.ldap.entry.EntryAttribute get(java.lang.String attributeName)
           
 LdapPrincipal getCommitterPrincipal()
           
 org.apache.directory.shared.ldap.ldif.LdifEntry getForwardLdif()
           
 java.util.List<org.apache.directory.shared.ldap.ldif.LdifEntry> getReverseLdifs()
           
 long getRevision()
          Gets the revision of this event.
 java.lang.String getZuluTime()
          Gets the generalizedTime when this event occured.
 void readExternal(java.io.ObjectInput in)
           
 java.lang.String toString()
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChangeLogEvent

public ChangeLogEvent()
Creates a new instance of ChangeLogEvent, used during the deserialization process


ChangeLogEvent

public ChangeLogEvent(long revision,
                      java.lang.String zuluTime,
                      LdapPrincipal committer,
                      org.apache.directory.shared.ldap.ldif.LdifEntry forwardLdif,
                      org.apache.directory.shared.ldap.ldif.LdifEntry reverseLdif)
Creates a new instance of ChangeLogEvent.

Parameters:
revision - the revision number for the change
zuluTime - the timestamp for when the change occurred in generalizedTime format

ChangeLogEvent

public ChangeLogEvent(long revision,
                      java.lang.String zuluTime,
                      LdapPrincipal committer,
                      org.apache.directory.shared.ldap.ldif.LdifEntry forwardLdif,
                      java.util.List<org.apache.directory.shared.ldap.ldif.LdifEntry> reverseLdifs)
Creates a new instance of ChangeLogEvent.

Parameters:
revision - the revision number for the change
zuluTime - the timestamp for when the change occurred in generalizedTime format
committer - the user who did the modification
forwardLdif - the original operation
reverseLdifs - the reverted operations
Method Detail

getForwardLdif

public org.apache.directory.shared.ldap.ldif.LdifEntry getForwardLdif()
Returns:
the forwardLdif

getReverseLdifs

public java.util.List<org.apache.directory.shared.ldap.ldif.LdifEntry> getReverseLdifs()
Returns:
the reverseLdif

getCommitterPrincipal

public LdapPrincipal getCommitterPrincipal()
Returns:
the committer

getRevision

public long getRevision()
Gets the revision of this event.

Returns:
the revision

getZuluTime

public java.lang.String getZuluTime()
Gets the generalizedTime when this event occured.

Returns:
the zuluTime when this event occured

get

public org.apache.directory.shared.ldap.entry.EntryAttribute get(java.lang.String attributeName)

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Parameters:
in - The stream from which the ChangeOlgEvent is read
Throws:
java.io.IOException - If the stream can't be read
java.lang.ClassNotFoundException - If the ChangeLogEvent can't be created
See Also:
Externalizable.readExternal(ObjectInput)

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
out - The stream in which the ChangeLogEvent will be serialized.
Throws:
java.io.IOException - If the serialization fail
See Also:
Externalizable#readExternal(ObjectInput)


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.