All Packages Class Hierarchy This Package Previous Next Index
Class sat.Validator
java.lang.Object
|
+----sat.Validator
- public class Validator
- extends Object
this class has functions which validate the data passed in
as parameters. It also returns metadata about events/subevents -
whether the event is team based or not, whether a user has registered
for subevent or not, etc.
- Author:
- Satyen Kale
-
Validator()
- a constructor.
-
firstTime(String)
- returns true if the Event_Manager has logged in
for the first time.
-
firstTime(String, String)
- returns true if the SubEvent_Manager has logged in
for the first time.
-
isModerated(String)
- returns true if an event is moderated.
-
isModerated(String, String)
- returns true if a subevent is moderated.
-
isRegisteredFor(String, String)
- returns true if the userid is registered for the given event
-
isTeamBased(String)
- returns true if a an event is team based.
-
isTeamMember(String)
- checks if flo is already a team member
-
isValidEventID(String)
- checks if a given event_id exists.
-
isValidSubEventID(String, String)
- checks if a given subevent_id exists within a given event_id.
-
nextPID()
- returns the next PID in the list
Validator
public Validator()
- a constructor.
isValidEventID
public boolean isValidEventID(String event_id)
- checks if a given event_id exists.
- Parameters:
- event_id - the id to be checked
- Returns:
- true if event_id exists, false otherwise
isValidSubEventID
public boolean isValidSubEventID(String event_id,
String subevent_id)
- checks if a given subevent_id exists within a given event_id.
- Parameters:
- event_id - the event under which the subevent_id should exist.
- subevent_id - the id to be checked.
- Returns:
- true if subevent_id exists, false otherwise.
isTeamBased
public boolean isTeamBased(String event_id) throws IllegalArgumentException
- returns true if a an event is team based.
- Parameters:
- event_id - the id of the event
- Returns:
- true if event is team based, false if not.
- Throws: IllegalArgumentException
- if this method is called when this field has not been set yet.
isModerated
public boolean isModerated(String event_id) throws IllegalArgumentException
- returns true if an event is moderated.
- Parameters:
- event_id - the id of the event
- Returns:
- true if event is moderated, false if not.
- Throws: IllegalArgumentException
- if this method is called when this field has not been set yet.
isModerated
public boolean isModerated(String event_id,
String subevent_id)
- returns true if a subevent is moderated.
- Parameters:
- event_id - the id of the event
- subevent_id - the id of the subevent
- Returns:
- true if event is moderated, false if not.
isRegisteredFor
public boolean isRegisteredFor(String userid,
String event_id)
- returns true if the userid is registered for the given event
- Parameters:
- userid - the user's login id
- event_id - the given event
- Returns:
- true if the user is registered, false if not
firstTime
public boolean firstTime(String event_id)
- returns true if the Event_Manager has logged in
for the first time.
- Parameters:
- event_id - the ID of the event
- Returns:
- true if the Event_Manager has logged in
for the first time, false if not.
firstTime
public boolean firstTime(String event_id,
String subevent_id)
- returns true if the SubEvent_Manager has logged in
for the first time.
- Parameters:
- event_id - the ID of the event
- subevent_id - the ID of the subevent
- Returns:
- true if the SubEvent_Manager has logged in
for the first time, false if not.
nextPID
public int nextPID()
- returns the next PID in the list
- Returns:
- the next PID
isTeamMember
public boolean isTeamMember(String email)
- checks if flo is already a team member
- Parameters:
- email - the email ID of the flo
- Returns:
- true if team member, false otherwise
All Packages Class Hierarchy This Package Previous Next Index