|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
org.nuiton.wikitty.services.WikittyEvent
public class WikittyEvent
Wikitty service event. Contains :
| Nested Class Summary | |
|---|---|
static class |
WikittyEvent.WikittyEventType
Message type (put, remove, clear...). |
| Field Summary | |
|---|---|
protected Set<String> |
deletedExtensions
Use by REMOVE_EXTENSION, all extensions name deleted |
protected long |
eventId
unique event id, each event must have eventId, and event is sequence without hole. |
protected Map<String,WikittyExtension> |
extensions
Use by PUT_EXTENSION, all extensions added |
protected boolean |
remote
Remote event (received from server). |
protected Map<String,Date> |
removeDate
Use by REMOVE_WIKITTY. key: wikittyId, value: removed date |
protected long |
time
heure de creation de l'event |
protected EnumSet<WikittyEvent.WikittyEventType> |
type
event type, one event can have multiple type (ex: PUT_WIKITTY + PUT_EXTENSION |
protected Map<String,Wikitty> |
wikitties
Use by PUT_WIKITTY, all wikitties added |
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
WikittyEvent(Object source)
Constructor with source WikittyService. |
|
| Method Summary | |
|---|---|
void |
add(WikittyEvent e)
Merge this event with event passed in arguement. |
void |
addDeletedExtension(String extName)
|
void |
addExtension(WikittyExtension extension)
|
void |
addRemoveDate(String wikittyId,
Date date)
|
void |
addType(WikittyEvent.WikittyEventType type)
|
void |
addWikitty(Wikitty wikitty)
|
static WikittyEvent |
fromXML(String xml)
Inverse de la methode toXML |
Set<String> |
getDeletedExtensions()
|
long |
getEventId()
|
Map<String,WikittyExtension> |
getExtensions()
|
Map<String,Date> |
getRemoveDate()
|
long |
getTime()
Return time of event creation |
EnumSet<WikittyEvent.WikittyEventType> |
getType()
|
Map<String,Wikitty> |
getWikitties()
|
boolean |
isRemote()
Is event remote. |
void |
setEventId(long eventId)
This method must be call with right id, just before send message notification |
void |
setRemote(boolean remote)
Change remote event property. |
void |
setSource(Object source)
To allow set transient source after deserialisation. |
String |
toString()
|
String |
toXML()
Permet de serializer en XML l'event. |
Wikitty |
update(Wikitty e)
Update data directly in object passed in argument. |
| Methods inherited from class java.util.EventObject |
|---|
getSource |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected long eventId
protected boolean remote
protected EnumSet<WikittyEvent.WikittyEventType> type
protected long time
protected Map<String,Wikitty> wikitties
protected Map<String,Date> removeDate
protected Map<String,WikittyExtension> extensions
protected Set<String> deletedExtensions
| Constructor Detail |
|---|
public WikittyEvent(Object source)
WikittyService.
source - wikitty serviceeventId - unique event id| Method Detail |
|---|
public long getTime()
public void setSource(Object source)
source - sourcepublic EnumSet<WikittyEvent.WikittyEventType> getType()
public void addType(WikittyEvent.WikittyEventType type)
type - public boolean isRemote()
public void setRemote(boolean remote)
remote - remotepublic long getEventId()
public void setEventId(long eventId)
eventId - public Map<String,Wikitty> getWikitties()
public void addWikitty(Wikitty wikitty)
public Map<String,Date> getRemoveDate()
public void addRemoveDate(String wikittyId,
Date date)
public Map<String,WikittyExtension> getExtensions()
public void addExtension(WikittyExtension extension)
public Set<String> getDeletedExtensions()
public void addDeletedExtension(String extName)
public void add(WikittyEvent e)
e - public Wikitty update(Wikitty e)
rem: during store action, no migration has done. Migration is only done during restore process. This implies that extension don't change after store. But another client, may can load wikitty with migration and store it, or add manualy some extension. In that case, stored wikitty has new/more extension that another client.
And internaly wikitty object is marked clean (not dirty)
e -
public String toString()
toString in class EventObjectpublic String toXML()
public static WikittyEvent fromXML(String xml)
xml -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||