|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.workplace.wcm.api.extensions.syndication.ChangeMapper<T>
T
- type you want to map changes to, if you do not want to map to anything you can use any type (such as Object
and return nullpublic abstract class ChangeMapper<T>
ChangeMapper is provided in the API to be used in conjunction with SyndicationSummary.getChanges()
from the SyndicatorCompleting
and SubscriberCompleting
extension points.
It provides a convenient way to handle the different change types.
Here is a simple example that attempts to process all changes and handle just the changes related to moved items:
for(Change change : syndicationSummary.getChanges())
{
change.map(new ChangeMapper
Constructor Summary | |
---|---|
ChangeMapper()
|
Method Summary | |
---|---|
abstract T |
map(Added added)
Handle an Added item change |
abstract T |
map(LibraryAdded added)
Handle Library added change |
abstract T |
map(LibraryRenamed renamed)
Handle Library renamed change |
abstract T |
map(LibraryUpdated updated)
Handle Library updated change |
abstract T |
map(Moved moved)
Handle a Moved item change |
abstract T |
map(ProjectAdded added)
Handle a Project added change |
abstract T |
map(ProjectRemoved removed)
Handle a Project removed change |
abstract T |
map(ProjectUpdated updated)
Handle a Project updated change |
abstract T |
map(Removed removed)
Handle a Removed item change |
abstract T |
map(Updated updated)
Handle an Updated item change |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChangeMapper()
Method Detail |
---|
public abstract T map(Added added)
the
- added change info
public abstract T map(Updated updated)
the
- updated change info
public abstract T map(Moved moved)
the
- moved change info
public abstract T map(Removed removed)
the
- removed change info
public abstract T map(ProjectAdded added)
the
- project added change info
public abstract T map(ProjectUpdated updated)
the
- project updated info
public abstract T map(ProjectRemoved removed)
the
- removed change info
public abstract T map(LibraryAdded added)
the
- library added change info
public abstract T map(LibraryUpdated updated)
the
- library updated change info
public abstract T map(LibraryRenamed renamed)
the
- library renamed change info
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |