public final class UsageStatisticsPersistenceComponent extends java.lang.Object implements PersistentStateComponent<Element>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
USAGE_STATISTICS_XML |
Constructor and Description |
---|
UsageStatisticsPersistenceComponent() |
Modifier and Type | Method and Description |
---|---|
static UsageStatisticsPersistenceComponent |
getInstance() |
long |
getLastTimeSent() |
SendPeriod |
getPeriod() |
Element |
getState() |
boolean |
isAllowed() |
boolean |
isShowNotification() |
void |
loadState(Element element)
This method is called when new component state is loaded.
|
void |
setAllowed(boolean allowed) |
void |
setPeriod(SendPeriod period) |
void |
setSentTime(long time) |
void |
setShowNotification(boolean showNotification) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeComponent, noStateLoaded
public static final java.lang.String USAGE_STATISTICS_XML
public long getLastTimeSent()
public void setSentTime(long time)
public static UsageStatisticsPersistenceComponent getInstance()
public void loadState(Element element)
PersistentStateComponent
State object should be used directly, defensive copying is not required.
loadState
in interface PersistentStateComponent<Element>
element
- loaded component stateXmlSerializerUtil.copyBean(Object, Object)
public Element getState()
getState
in interface PersistentStateComponent<Element>
null
value indicates
that the returned state won't be stored, as a result previously stored state will be used.XmlSerializer
public SendPeriod getPeriod()
public void setPeriod(SendPeriod period)
public void setAllowed(boolean allowed)
public boolean isAllowed()
public void setShowNotification(boolean showNotification)
public boolean isShowNotification()