com.day.cq.replication
Class ReplicationAction

java.lang.Object
  extended by com.day.cq.replication.ReplicationAction
All Implemented Interfaces:
Serializable

public class ReplicationAction
extends Object
implements Serializable

Defines the control information of a replication

See Also:
Serialized Form

Field Summary
static String EVENT_TOPIC
          Event topic for replication status events.
static String PROPERTY_MODIFICATION_DATE
          The OSGi event property containing the modification date
static String PROPERTY_PATH
          The OSGi event property containing the path
static String PROPERTY_REVISION
          The OSGi event property containing the replicated revision (optional)
static String PROPERTY_TYPE
          The OSGi event property containing replication action
static String PROPERTY_USER_ID
          The OSGi event property containing the user id
 
Constructor Summary
ReplicationAction(ReplicationActionType type, String path, long time, String userId, String revision)
           
 
Method Summary
 org.apache.sling.event.EventPropertiesMap createProperties()
          Create the properties.
static ReplicationAction fromEvent(org.osgi.service.event.Event evt)
          Convert an OSGi event to a replication event.
 String getPath()
          Returns the path
 String getRevision()
          Returns the revision
 long getTime()
          Returns the replication time
 ReplicationActionType getType()
          Returns the action type
 String getUserId()
          Returns the user id.
 org.osgi.service.event.Event toEvent()
          Create an OSGi event out of the replication event.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EVENT_TOPIC

public static final String EVENT_TOPIC
Event topic for replication status events.

See Also:
Constant Field Values

PROPERTY_MODIFICATION_DATE

public static final String PROPERTY_MODIFICATION_DATE
The OSGi event property containing the modification date

See Also:
Constant Field Values

PROPERTY_USER_ID

public static final String PROPERTY_USER_ID
The OSGi event property containing the user id

See Also:
Constant Field Values

PROPERTY_PATH

public static final String PROPERTY_PATH
The OSGi event property containing the path

See Also:
Constant Field Values

PROPERTY_TYPE

public static final String PROPERTY_TYPE
The OSGi event property containing replication action

See Also:
Constant Field Values

PROPERTY_REVISION

public static final String PROPERTY_REVISION
The OSGi event property containing the replicated revision (optional)

See Also:
Constant Field Values
Constructor Detail

ReplicationAction

public ReplicationAction(ReplicationActionType type,
                         String path,
                         long time,
                         String userId,
                         String revision)
Method Detail

getType

public ReplicationActionType getType()
Returns the action type

Returns:
replication action type

getPath

public String getPath()
Returns the path

Returns:
path

getRevision

public String getRevision()
Returns the revision

Returns:
the revision

getTime

public long getTime()
Returns the replication time

Returns:
the replication time

getUserId

public String getUserId()
Returns the user id.

Returns:
the user id.

toString

public String toString()
Overrides:
toString in class Object

fromEvent

public static ReplicationAction fromEvent(org.osgi.service.event.Event evt)
Convert an OSGi event to a replication event.

Parameters:
evt - The OSGi event
Returns:
The replication event if the OSGi event contained a replication event. Otherwise null is returned.

createProperties

public org.apache.sling.event.EventPropertiesMap createProperties()
Create the properties.

Returns:
OSGi event properties

toEvent

public org.osgi.service.event.Event toEvent()
Create an OSGi event out of the replication event.

Returns:
A new OSGi event.


Copyright © 2009 Day Management AG. All Rights Reserved.