Skip to content

2. Models

Mihail Varbanov edited this page Apr 18, 2022 · 6 revisions

Auth2

AuthCard

Describes user iCard details that comes as response from ‘rwCardInfo’ API residing in icard.uillinois.edu. It contains i-Card fields like name, UIN, card number, library number, expiration date, user photo, etc.

Explore

Dining

Describes dining locations that appear in Explore panels. It extends the Explore abstract class and implements its common interfaces.

It contains basic location data like name, description, image url, geographic location and available payment types. This basic data is loaded from assets.json that is a statically embedded application resource file.

Dining also contains a list of DiningSchedule objects for this location, that is loaded separately from MobileAppWS/api/SettingTable API of web housing service

DiningSchedule

Describes a single meal period for a specific date and a specific Dining. It contains information about the schedule id, location id, meal name, start time, end time and various helpers methods for handling future and past schedules as long as formatting the work time in the UI

DiningProductItem

Describes a product item mapped to a specific dining location and dining schedule.

It contains basic information about the product as: item id, schedule id, location id, serving unit, product name, treats and sorting priority

DiningNutritionItem

Describes various nutrition information (e.g calories, total fat, cholesterol, sugar etc.) for a specific DiningProductItem.

The mapping between DiningProductItem and DiningNutritionItem is made through the id property

Laundry

LaundryRoom

Describes the laundry room that appears in the Laundry Home panel.

Laundry room contains basic data like id, title, campus name, status (online, offline) and location. All except location is loaded from school?api_key={api_key}&method=getRoomData API of laundry view service. Location is loaded from assets/assets.json.

LaundryRoomAppliance

Describes a single appliance - washer or dryer. It appears in the laundry detail panel.

LaundryRoomAppliance contains applianceDescKey, lrmStatus, applianceType, status, outOfService, label, avgCycleTime, timeRemaining.

They are loaded from room?api_key={api_key}&method=getAppliances&location={laundry_room_location} API of laundry view service.

LaundryRoomAvailability

Describes how many dryers and washers are available for a specific laundry room. It appears in Laundry Detail panel.

LaundryRoomAvailability contains available washers, available dryers and location. This location field represents location key of the laundry room.

Laundry room availability is loaded from school?api_key={api_key}&method=getNumAvailable API of laundry view service.

Sports

Game

Represents a single Athletics game that appears in Athletics panels.

It contains basic data for a single game like id, start and end dates, type, location, tv and radio display names, custom fields, opponent details, sponsor, results.

It also provides properties for evaluating if a game is today or upcoming, for display time, for random image url. Game also contains other wrapper models that describe inner data structures.

SportSeasons

Represents a wrapper object of the server response for /services/schedule_xml_2.aspx?sportseasons=true API of sidearm service. It describes a sport and its seasons.

SportSeason contains code (which is the SportTypeConfig short name), label, staff url and list of Seasons.

SportSocialMedia

Describes the profiles for a sport in social media. It appears at the bottom of the Athletics Team panel.

Single SportSocialMedia entry contains id, sport short name, abbreviation, name, short display name, global sport short name, twitter name, instagram name, facebook page and facebook id.

SportSocialMedia entries are loaded from /api/assets?operation=sports API of sidearm service.

SportDefinition

Describes a single sport and its specific characteristics. Appears in most of the Athletics panels.

It contains name, customName, shortName, hasHeight, hasWeight, hasPosition, hasSortByPosition, hasSortByNumber, hasScores, gender, ticketed, iconPath.

SportDefinition entries are loaded from assets/assets.json.

TeamRecord

Represents a record for specific team in a specific sport that appears in the Athletics Team panel.

TeamSchedule

Represents wrapper object of the server response for /services/schedule_xml_2.aspx API of sidearm service. It contains a list of Games and a single Record.

LiveGame

Represents live game entity. It contains fields as clock seconds, period, home score and visiting score.

Coach

Describes a single Coach that appears in the Athletics Team panel and Staff panel.

Coach contains id, name, title, email, phone, html bio and photos. Photos are full size, thumbnail and roster. Coaches are loaded from /services/coaches_xml.aspx?path={sport}&format={format} API of sidearm service.

News

Describes a single news item that appears in Athletics panels - News, Team and Article.

It contains id, title, link, category, description, summary, full text, publication date and image(enclosure) url.

They are loaded from /services/stories_xml.aspx?format={format} API of sidearm service.

Roster

Describes single roster item (e.g. player) that appears in Athletics panels - Team, Roster list and Roster detail.

It contains id, name, position, number, height, weight, year, home town, high school, major, bio and photos.

Rosters are loaded from /services/roster_xml.aspx?path={sport}&format={format} API of sidearm service.

Illini Cash

IlliniCashBallance

Describes Illini Cash balance information for the currently logged in user. This information is accessible only if the user is a University Student or Employee and respectively he/she is logged in with a Shibboleth NetID (OIDC).

It contains the current Illini Cash, Meal Plan and Cafe Credit balances.

BaseTransaction

Abstract class that defines a common interface for transaction history panels. It contains date, location, description and amount

CafeCreditTransaction

Inherits BaseTransaction and represents Cafe Credit transaction record

IlliniCashTransaction

Inherits BaseTransaction and represents Illini Cash transaction record

MealPlanTransaction

Inherits BaseTransaction and represents Meal Plan transaction record

Parking

ParkingLot

Legacy model entry that represents a parking lot. It is not used and has to be removed.

ParkingLotRef

Represents reference to a parking lot. Each parking event contains a collection of parking lot references.

ParkingEvent

Represents an event with parking lot references. It contains details related to parking for a specific event.

ParkingLotInventory

Describes full details for a parking lot such as name, address, entrance, polygon and parking spots - sold, pre-sold and total.

Voter

VoterRule

Describes a single rule for displaying voter widget to users. Each rule is for a specific period of time. It defines different texts, button options and alerts that should be displayed to the user based on that if the user is registered to vote or is entered in voting region.

RuleOption

Describes an option that the user may choose in voter.

Privacy

PrivacyData

Represent the Privacy level information visible in the SettingsPrivacyPanel. It contains "Levels": all supported privacy levels, types: [Feature/Stored], categories: the categories displayed in SettingsPrivacyPanel, feature2: displayed alert messages. This data is loaded from the assets\assets.json.

PrivacyCategory

Represent the Privacy category which is displayed in the SettingsPrivacyPanel. It contains Title and title key(used to localize the title) and description(map for each privacy level). It also contains lists of PrivacyEntry and PrivacyEntry2.

PrivacyEntry

Represent the Privacy entry data. It contains text, key(used for localization of the text field), type and minimal privacy level for which this entry is available.

PrivacyEntry2

Represent a more extended version of the Privacy entry data with more details. It contains: String values for title, description, dataUsage, additionalDescription, additionalDataUsage and also keys for these values in order to support localization. It also contains a minimal level and additional minimal level. It also contains two icon resources- icon and off icon.

PrivacyDescription

Represent the privacy description and contains a text and privacy level. It also contains a key to support localization of the text.

PrivacyLevel

Represent the privacy level. It contains int value and title which will be displayed.

PrivacyType

Represent Type. It contains string value and title which will be displayed.

PrivacyFeature2

Represent a privacy feature displayed in the SettingsPrivacyPanel. It contains text and integer maxLevel for which this feature is available. It also contains a key to support localization of the text.

Tweeter

Tweeter classes map the data model of Twitter v2 API. The main goal is to load a list of recent tweets for a given user. This list is represented by the TweetsPage class that mainly contains a list of Tweet instances. The Tweet instances share the same TweetsIncludes set of data that is applied to each of them in order to convert their data in a flat (not reference) format.

The tweet content is represented by raw text and entities metadata on this text like url links, hash tags, etc. On construction the entities are applied on the raw text producing a HTML content to be displayed for this tweet.

Canvas

Canvas classes represent the data model of the Canvas Learning Management System (LMS) defined in its documentation. They serve mainly the courses of a student in this LMS.

CanvasCourse

Represents single canvas course and its properties.

CanvasCalendar

Represents the course calendar with its url in ics format.

CanvasEnrollment

Represents the course enrollment that links the students to their course.

CanvasFile

Represents a file and its properties.

CanvasFolder

Represents a folder and its properties.

CanvasFileSystemEntity

Represents common entity abstraction for File and Folder.

CanvasDiscussionTopic

Represents discussion topic (or announcements) in canvas groups and courses.

CanvasTopicPermissions

The current canvas user’s permission on this topic.

CanvasTopicAuthor

Represents the author of the discussion topic.

CanvasGroupTopic

Holds a group discussion id that the current canvas user is part of.

CanvasCollaboration

Holds the course and/or group collaboration information.

CanvasCalendarEvent

Represents a single event in the canvas calendar.

CanvasUser

Represents a single canvas user.

CanvasGroup

Canvas Groups serve as the data for a few different ideas in Canvas. The first is that they can be a community in the canvas network. The second is that they can be organized by students in a course, for study or communication (but not grading). The third is that they can be organized by teachers or account administrators for the purpose of projects, assignments, and grading. This last kind of group is always part of a group category, which adds the restriction that a user may only be a member of one group per category.

CanvasGroupPermissions

Represents the permissions the user has for a group.

CanvasAccountNotification

Represents a notification to a specific account.

CanvasModule

Represents a collection of learning materials useful for organizing courses and optionally providing a linear flow through them.

CanvasModuleItem

Represents a single item of a specific canvas module.

CanvasModuleItemCompletionRequirement

Represents a completion requirement for a specific module item.

CanvasModuleItemContentDetails

Holds additional details specific to the associated module item.

CanvasExternalToolTagAttributes

Represents assignment's settings for external tools.

CanvasLockInfo

Represents information for the user about the lock.

CanvasAssignmentDate

Holds details for a date associated with the assignment.

CanvasTurnitinSettings

Represents settings to pass along to turnitin to control what kinds of matches should be considered.

CanvasNeedsGradingCount

Represents the number of submissions that need grading split out by section in an assignment.

CanvasScoreStatistic

Holds the min, max, and mean for a specific assignment.

CanvasAssignment

Represents the assignment to a user for a specific canvas course.

CanvasAssignmentGroup

Represents a group of assignments for a specific course.

CanvasErrorReport

Holds information about a specific problem in Canvas LMS. It is submitted by a user.

Other

RecentItem

RecentItem is a record of a resource that was accessed recently by the user. It keeps the resource type, title, description, time and a source JSON. The possible types are athletics news, athletics game, explore event, explore location, general explore or student guide article.

RewardHistoryEntry

Holds information about a reward for the user.

ImageType

Represents image type entity. It has identifier and width fields. The system supports different image sizes for the different images. For example, the football tout image type has bigger size than the football list item image type.

Extensions

Some model classes from the plugin are extended in the application as class extensions. The purpose of this extension is to provide functionality that is not available in the plugin. This functionality could be separated into following areas:

  • Analytics data associated with the particular class. Since analytics content is application specific this must be defined at application level.
  • UI APIs associated with the particular class. For example, formatting a date or time for displaying in the UI should be performed on application level.
  • Access to string resources associated with the particular class. Since the plugin does not predefine the existence of any string resource this has to be handled at application level.

The extended models are Explore, Event, Dining, Game and Group.