public class WikittyEvent extends EventObject
| Modifier and Type | Class and Description |
|---|---|
static class |
WikittyEvent.WikittyEventType
Message type (put, remove, clear...).
|
| Modifier and Type | Field and Description |
|---|---|
protected Set<String> |
deletedExtensions
Use by REMOVE_EXTENSION, all extensions id 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.
|
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
|
source| Constructor and Description |
|---|
WikittyEvent(Object source)
Constructor with source
WikittyService. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(WikittyEvent e)
Merge this event with event passed in arguement.
|
void |
addDeletedExtension(String id) |
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.
|
getSourceprotected long eventId
protected boolean remote
protected EnumSet<WikittyEvent.WikittyEventType> type
protected long time
protected Map<String,Date> removeDate
protected Map<String,WikittyExtension> extensions
public WikittyEvent(Object source)
WikittyService.source - wikitty servicepublic 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 void addWikitty(Wikitty wikitty)
public Map<String,WikittyExtension> getExtensions()
public void addExtension(WikittyExtension extension)
public void addDeletedExtension(String id)
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 manually some extension. In that case, stored wikitty has new/more extension that another client.
And internally wikitty object is marked clean (not dirty)
e - public String toString()
toString in class EventObjectpublic String toXML()
public static WikittyEvent fromXML(String xml)
xml - Copyright © 2009–2015 CodeLutin. All rights reserved.