|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.day.cq.wcm.api.PageModification
public final class PageModification
This class encapsulates the information coming along with a page modification. The order of modifications is as follows:
PageModification.ModificationType.CREATED, then PageModification.ModificationType.MODIFIEDPageModification.ModificationType.MODIFIEDPageModification.ModificationType.VERSION_CREATEDPageModification.ModificationType.MOVEDPageModification.ModificationType.DELETED
| Nested Class Summary | |
|---|---|
static class |
PageModification.ModificationType
The modification type. |
| Method Summary | |
|---|---|
static PageModification |
created(String path,
String template,
String above,
String userObject)
Create a new PageModification that represents
a page creation. |
static PageModification |
deleted(String path,
String userObject)
Create a new PageModification that represents
a page deletion. |
boolean |
equals(Object o)
Overridden to alter the preconditions when two modifications are considered equal. |
static PageModification |
fromEventProperties(org.apache.sling.event.EventPropertiesMap props)
Create a page modification from properties. |
String |
getAbove()
|
String |
getDestination()
|
org.apache.sling.event.EventPropertiesMap |
getEventProperties()
Get a dictionary with all event properties. |
Date |
getModificationDate()
|
Set<String> |
getModificationPaths()
Get the list of changes for a modification of the page. |
String |
getPath()
The path of the page. |
String |
getTemplate()
|
PageModification.ModificationType |
getType()
|
String |
getUserId()
|
String |
getVersionId()
|
int |
hashCode()
Returns a hash code value for the object. |
static PageModification |
modified(String path,
String vid,
String userObject,
Set<String> changes)
Create a new PageModification that represents
a page modification. |
static PageModification |
moved(String path,
String destination,
String above,
String userObject)
Create a new PageModification that represents
a page moval. |
static PageModification |
pageRestored(String path,
String vid,
String userObject)
Create a new PageModification that represents
a version created. |
org.osgi.service.event.Event |
toEvent()
Convert a single modification to an event. |
String |
toString()
Return a string representation of this object |
static PageModification |
versionCreated(String path,
String vid,
String userObject)
Create a new PageModification that represents
a version created. |
static PageModification |
versionDeleted(String path,
String vid,
String userObject)
Create a new PageModification that represents
a version deleted. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static PageModification created(String path,
String template,
String above,
String userObject)
PageModification that represents
a page creation.
path - handle to new pagetemplate - template of new pageabove - label of successor siblinguserObject - An optional user object which might be used to identify
this instance or its source. This parameter is only
provided on behalf of an client of this class.
public static PageModification modified(String path,
String vid,
String userObject,
Set<String> changes)
PageModification that represents
a page modification.
path - path of pageuserObject - An optional user object which might be used to identify
this instance or its source. This parameter is only
provided on behalf of an client of this class.changes - A set of changes (paths) - optional
public static PageModification moved(String path,
String destination,
String above,
String userObject)
PageModification that represents
a page moval.
path - handle of pagedestination - new page destination, may be nullabove - label of successor sibling, may be nulluserObject - An optional user object which might be used to identify
this instance or its source. This parameter is only
provided on behalf of an client of this class.
public static PageModification deleted(String path,
String userObject)
PageModification that represents
a page deletion.
path - handle of pageuserObject - An optional user object which might be used to identify
this instance or its source. This parameter is only
provided on behalf of an client of this class.
public static PageModification versionCreated(String path,
String vid,
String userObject)
PageModification that represents
a version created.
path - handle of pageuserObject - An optional user object which might be used to identify
this instance or its source. This parameter is only
provided on behalf of an client of this class.
public static PageModification versionDeleted(String path,
String vid,
String userObject)
PageModification that represents
a version deleted.
path - handle of pageuserObject - An optional user object which might be used to identify
this instance or its source. This parameter is only
provided on behalf of an client of this class.
public static PageModification pageRestored(String path,
String vid,
String userObject)
PageModification that represents
a version created.
path - handle of pageuserObject - An optional user object which might be used to identify
this instance or its source. This parameter is only
provided on behalf of an client of this class.
public String getPath()
public String getDestination()
public String getTemplate()
public String getAbove()
public PageModification.ModificationType getType()
public String getVersionId()
public String getUserId()
public Date getModificationDate()
public Set<String> getModificationPaths()
public final boolean equals(Object o)
equals in class Objecto - object to compare this object against
true if this object is considered equal to the
other object, otherwise falsepublic int hashCode()
equals(java.lang.Object) method implemented above.
hashCode in class ObjectObject.equals(java.lang.Object),
Hashtablepublic String toString()
toString in class Objectpublic org.apache.sling.event.EventPropertiesMap getEventProperties()
public static PageModification fromEventProperties(org.apache.sling.event.EventPropertiesMap props)
public org.osgi.service.event.Event toEvent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||