Controllers of the RED FLAGS webapp

Below I list the controllers with their mapped URLs and their description and parameters. All controller class is in hu.petabyte.redflags.web.ctrl package.

AutocompleteCtrl (RestController)

Provides JSON data for the autocomplete services.

URL Description Parameters
/ac/organizations Data for the contracting authority and winner organization filter's autocomplete feature. Returns list of organization names that contain the search term. q - Search term

ChartCtrl (RestController)

Provides JSON data for the charts displayed on the front page.

URL Description
/charts/flagCounts Data for the donut chart
/chart/flaggedNotices Data for the area chart
/chart/sumValues Data for the bar chart

FilterCtrl

Handles requests of filter edit pages.

URL Description Parameters
/filter/delete/{id} Initiates the deletion of the specified filter then redirects to /filters id - path variable, identifier of the filter to be deleted (long)
GET /filter/{id} Displays the edit page of a filter (view: filter) id - path variable, identifier of the filter to be displayed (long)
POST /filter/{id} Initiates modification of the specified filter then redirects to /filters id - path variable, identifier of the filter to be modified (long)
name - display name of the filter (required)
subscribe - whether user subscribes to this filter (boolean, default: false)

FilterEmailCtrl (RestController)

Receives trigger to send subscription emails.

URL Description Parameters
/send-filter-emails Initiates sending of subscription letters and returns with true or false based on success secret - the trigger secret, see configuration (required)

FiltersCtrl

Displays the saved filters list.

URL Description
/filters Displays the saved filters list page (view: filters)

IndexCtrl

Serves the front page and related stuff.

URL Description
/ Displays the front page (view: index)
/* Redirects every non-mapped URLs to /
/robots.txt Serves robots.txt
/version Displays version information

NoticeCtrl

Serves notice pages.

URL Description Parameters
/notice Redirects to /notices
/notice/ Redirects to /notices
/notice/{id} Displays notice page for the given notice ID (view: notice) id - identifier of the notice to be displayed

NoticesCtrl

Serves notice list pages.

URL Description Parameters
/notices Redirects to /notices/10/1/by-date
/notices/ Redirects to /notices/10/1/by-date
/notices/{count} Redirects to /notices/{count}/1/by-date
/notices/{count}/ Redirects to /notices/{count}/1/by-date
/notices/{count}/{page} Redirects to /notices/{count}/{page}/by-date
/notices/{count}/{page}/{order} Validates parameters, gathers filtered data, builds model and displays list page (view: notices) contr - contracting authority filter
cpv - CPV code filter
date - publication date filter
doc - document type filter
filter - filters in compact string format
flags - flag count filter
indicators - indicator filter
saveFilter - value of Save filter button
text - text filter
value - total value filter
winner - winner organizaiton filter

OrganizationCtrl

Serves organization pages.

URL Description Parameters
/organization Redirects to /organizations
/organization/ Redirects to /organizations
/organization/{id} Displays organization page for the given organization ID (view: organization) id - identifier of the organization to be displayed

OrganizationsCtrl

Serves organization list pages.

URL Description Parameters
/organizations Redirects to /organizations/10/1
/organizations/ Redirects to /organizations/10/1
/organizations/{count} Redirects to /organizations/{count}/1
/organizations/{count}/ Redirects to /organizations/{count}/1
/organizations/{count}/{page} Validates parameters, gathers filtered data, builds model and displays list page (view: organizations) count - path variable, number of items per page (integer)
page - path variable, page number (integer)
filter - organization name filter

SecurityCtrl

Handles requests related to user accounts.

URL Description Parameters
/activate/{id}/{token} Initiates user account activation then displays login page (view: login) id - path variable, identifier of user to be activated (integer)
token - path variable, validation token
GET /change-password/{id}/{token} Displays password changer page (view: change-password) id - path variable, identifier of user whose password needs to be changed (integer)
token - path variable, validation token
POST /change-password Saves new password then displays login page (view: login) id - identifier of user to be modified (required, integer)
token - validation token (required)
password - new password to be saved (required)
g-recaptcha-response - captcha response (required)
GET /forgot Displays forgotten password page (view: login)
POST /forgot Initiates password change then displays forgotten password page (view: login) email - email address of the user who needs new password (required)
g-recaptcha-response - captcha response (required)
/login Displays login page (view: login)
GET /register Displays registration page (view: login)
POST /register Initiates registration then displays registration (view: login) email - email address (required)
password - password (required)
name - username (required)
g-recaptcha-response - captcha response (required)