public final class PageModification
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
PageModification.ModificationType
The modification type.
|
Modifier and Type | Method and Description |
---|---|
static PageModification |
created(java.lang.String path,
java.lang.String above,
java.lang.String userId)
Create a new
PageModification that represents
a page creation. |
static PageModification |
deleted(java.lang.String path,
java.lang.String userId)
Create a new
PageModification that represents
a page deletion. |
boolean |
equals(java.lang.Object o)
Overridden to alter the preconditions when two modifications are
considered equal.
|
static PageModification |
fromEventProperties(java.util.Map<java.lang.String,java.lang.Object> props)
Create a page modification from properties.
|
java.lang.String |
getAbove() |
java.lang.String |
getDestination() |
java.util.Map<java.lang.String,java.lang.Object> |
getEventProperties()
Get a dictionary with all event properties.
|
java.util.Date |
getModificationDate() |
java.util.Set<java.lang.String> |
getModificationPaths()
Get the list of changes for a modification of the page.
|
java.lang.String |
getPath()
The path of the page.
|
PageModification.ModificationType |
getType() |
java.lang.String |
getUserId() |
java.lang.String |
getVersionId() |
int |
hashCode()
Returns a hash code value for the object.
|
static PageModification |
modified(java.lang.String path,
java.lang.String vid,
java.lang.String userId,
java.util.Set<java.lang.String> changes)
Create a new
PageModification that represents
a page modification. |
static PageModification |
moved(java.lang.String path,
java.lang.String destination,
java.lang.String above,
java.lang.String userId)
Create a new
PageModification that represents
a page moval. |
static PageModification |
pageInvalid(java.lang.String path,
long time)
Create a new
PageModification that represents
that the page became invalid due to an off-time reached. |
static PageModification |
pageRestored(java.lang.String path,
java.lang.String vid,
java.lang.String userId)
Create a new
PageModification that represents
a version created. |
static PageModification |
pageValid(java.lang.String path,
long time)
Create a new
PageModification that represents
that the page became valid due to an on-time reached. |
static PageModification |
rolledout(java.lang.String path,
java.lang.String userId)
Create a new
PageModification that represents
a version deleted. |
Event |
toEvent()
Convert a single modification to an event.
|
java.lang.String |
toString()
Return a string representation of this object
|
static PageModification |
versionCreated(java.lang.String path,
java.lang.String vid,
java.lang.String userId)
Create a new
PageModification that represents
a version created. |
public static PageModification created(java.lang.String path, java.lang.String above, java.lang.String userId)
PageModification
that represents
a page creation.path
- path to new pageabove
- label of successor siblinguserId
- the id of the user that caused this modification.public static PageModification modified(java.lang.String path, java.lang.String vid, java.lang.String userId, java.util.Set<java.lang.String> changes)
PageModification
that represents
a page modification.path
- path of pagevid
- the version nameuserId
- the id of the user that caused this modification.changes
- A set of changes (paths) - optionalpublic static PageModification moved(java.lang.String path, java.lang.String destination, java.lang.String above, java.lang.String userId)
PageModification
that represents
a page moval.path
- path of pagedestination
- new page destination, may be null
above
- label of successor sibling, may be null
userId
- the id of the user that caused this modification.public static PageModification deleted(java.lang.String path, java.lang.String userId)
PageModification
that represents
a page deletion.path
- path of pageuserId
- the id of the user that caused this modification.public static PageModification versionCreated(java.lang.String path, java.lang.String vid, java.lang.String userId)
PageModification
that represents
a version created.path
- path of pagevid
- the versio nameuserId
- the id of the user that caused this modification.public static PageModification pageRestored(java.lang.String path, java.lang.String vid, java.lang.String userId)
PageModification
that represents
a version created.path
- path of pagevid
- the vesion nameuserId
- the id of the user that caused this modification.public static PageModification pageValid(java.lang.String path, long time)
PageModification
that represents
that the page became valid due to an on-time reached.path
- path of pagetime
- the on-timepublic static PageModification pageInvalid(java.lang.String path, long time)
PageModification
that represents
that the page became invalid due to an off-time reached.path
- path of pagetime
- the off-timepublic static PageModification rolledout(java.lang.String path, java.lang.String userId)
PageModification
that represents
a version deleted.path
- path of pageuserId
- the id of the user that caused this modification.public java.lang.String getPath()
public java.lang.String getDestination()
public java.lang.String getAbove()
public PageModification.ModificationType getType()
public java.lang.String getVersionId()
public java.lang.String getUserId()
public java.util.Date getModificationDate()
public java.util.Set<java.lang.String> getModificationPaths()
public final boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- object to compare this object againsttrue
if this object is considered equal to the
other object, otherwise false
public int hashCode()
equals(java.lang.Object)
method implemented above.hashCode
in class java.lang.Object
Object.equals(java.lang.Object)
,
Hashtable
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Map<java.lang.String,java.lang.Object> getEventProperties()
public static PageModification fromEventProperties(java.util.Map<java.lang.String,java.lang.Object> props)
props
- the event propertiespublic Event toEvent()
Copyright © 2010 - 2020 Adobe. All Rights Reserved