public class ContestEvent extends Object
Each individual ContestEvent
contains multiple fields which together act to describe the change which has occured.
First, every ContestEvent
contains an ContestEvent.EventType
(an enum element) identifying the general category of event --
whether it is related to changes in Accounts, Languages, Problems, etc.
Next, each ContestEvent
contains detailed information which is event-type dependent. For example, events of type
ContestEvent.EventType.PROBLEM
(related to changes in contest problem configuration) contain an object of type IProblem
describing the problem configuration change which has occurred.
Clients implementing the PC2 API IConfigurationUpdateListener
interface can
determine the details of a contest configuration update event by first obtaining the ContestEvent.EventType
from the received event, and
subsequently using the appropriate ContestEvent
methods to obtain the configuration change details.
This documentation describes the current draft of the PC2 API, which is subject to change.
ContestEvent.EventType
Modifier and Type | Class and Description |
---|---|
static class |
ContestEvent.EventType
This enum identifies the types of configuration change events which can occur.
|
Constructor and Description |
---|
ContestEvent(ContestEvent.EventType eventType,
IClient client)
Construct an event representing a change in a contest Client (account).
|
ContestEvent(ContestEvent.EventType eventType,
IContestClock contestClock)
Construct an event representing a change in contest clock (time) information).
|
ContestEvent(ContestEvent.EventType eventType,
IGroup group)
Construct an event representing a change in a contest Group.
|
ContestEvent(ContestEvent.EventType eventType,
IJudgement judgement)
Construct an event representing a change in a contest Judgement.
|
ContestEvent(ContestEvent.EventType eventType,
ILanguage language)
Construct an event representing a change in a contest Language.
|
ContestEvent(ContestEvent.EventType eventType,
IProblem problem)
Construct an event representing a change in a contest Problem.
|
ContestEvent(ContestEvent.EventType eventType,
ISite site)
Construct an event representing a change in a contest site.
|
ContestEvent(ContestEvent.EventType eventType,
String contestTitle)
Construct an event representing a change in the contest title.
|
Modifier and Type | Method and Description |
---|---|
IClient |
getClient()
Get the client associated with events of type
ContestEvent.EventType.CLIENT . |
IContestClock |
getContestClock()
Get Contest Clock info associated with events of type
ContestEvent.EventType.CONTEST_CLOCK . |
String |
getContestTitle()
Get the Contest Title associated with events of type
ContestEvent.EventType.CONTEST_TITLE . |
ContestEvent.EventType |
getEventType()
Get the type of this event.
|
IGroup |
getGroup()
Get the Group info associated with events of type
ContestEvent.EventType.GROUP . |
IJudgement |
getJudgement()
Get the Judgement associated with events of type
ContestEvent.EventType.JUDGEMENT . |
ILanguage |
getLanguage()
Get the Language info associated with events of type
ContestEvent.EventType.LANGUAGE . |
IProblem |
getProblem()
Get the Problem info associated with events of type
ContestEvent.EventType.PROBLEM . |
ISite |
getSite()
Get the
ISite associated with events of type ContestEvent.EventType.SITE . |
public ContestEvent(ContestEvent.EventType eventType, ISite site)
eventType
- site
- the contest site which has changedpublic ContestEvent(ContestEvent.EventType eventType, String contestTitle)
eventType
- contestTitle
- the new contest titlepublic ContestEvent(ContestEvent.EventType eventType, IGroup group)
eventType
- group
- the changed contest grouppublic ContestEvent(ContestEvent.EventType eventType, IClient client)
eventType
- client
- the changed contest clientpublic ContestEvent(ContestEvent.EventType eventType, IContestClock contestClock)
eventType
- contestClock
- the changed contest clockpublic ContestEvent(ContestEvent.EventType eventType, IJudgement judgement)
eventType
- judgement
- the changed Judgementpublic ContestEvent(ContestEvent.EventType eventType, ILanguage language)
eventType
- language
- the changed contest languagepublic ContestEvent(ContestEvent.EventType eventType, IProblem problem)
eventType
- problem
- the changed contest problempublic IClient getClient()
ContestEvent.EventType.CLIENT
.getEventType()
public IContestClock getContestClock()
ContestEvent.EventType.CONTEST_CLOCK
.getEventType()
public ContestEvent.EventType getEventType()
public IGroup getGroup()
ContestEvent.EventType.GROUP
.getEventType()
public IJudgement getJudgement()
ContestEvent.EventType.JUDGEMENT
.getEventType()
public ILanguage getLanguage()
ContestEvent.EventType.LANGUAGE
.getEventType()
public IProblem getProblem()
ContestEvent.EventType.PROBLEM
.getEventType()
public String getContestTitle()
ContestEvent.EventType.CONTEST_TITLE
.public ISite getSite()
ISite
associated with events of type ContestEvent.EventType.SITE
.