public class Constants extends Object
Modifier and Type | Field and Description |
---|---|
static String |
AB
Base string to generate random alphanumeric strings
|
static String |
ACCOUNT_TYPE
Account type
|
static String |
APP_TAG
Prefix tag name for Logcat
|
static String |
AUTHORITY
Synchronization authority
|
static int |
BIBLIOGRAPHY_REQUEST_CODE
Request code for Bibliography
|
static String |
BUGSENSE_API_KEY
BugSense application key
|
static int |
CONNECTION_TIMEOUT
Connection timeout (in milliseconds)
|
static int |
COURSE_GROUP
Group position inside the main menu for Course group
|
static int |
COURSES_REQUEST_CODE
Request code for Courses module.
|
private static int |
currentUserRole
Role of the logged User in the current selected course
|
static String |
DB_TABLE_COURSES
Table name for courses
|
static String |
DB_TABLE_GROUP_TYPES
Table name for group types
|
static String |
DB_TABLE_GROUPS
Table name for groups
|
static String |
DB_TABLE_GROUPS_COURSES
Table name for relationship between groups and courses
|
static String |
DB_TABLE_GROUPS_GROUPTYPES
Table name for relationship between groups and group types
|
static String |
DB_TABLE_NOTIFICATIONS
Table name for notifications
|
static String |
DB_TABLE_PRACTICE_SESSIONS
Table name for practice sessions
|
static String |
DB_TABLE_ROLLCALL
Table name for rollcall
|
static String |
DB_TABLE_TEST_ANSWERS
Table name for test's answers
|
static String |
DB_TABLE_TEST_CONFIG
Table name for test's configuration
|
static String |
DB_TABLE_TEST_QUESTION_ANSWERS
Table name for relationship between test's questions and answers
|
static String |
DB_TABLE_TEST_QUESTION_TAGS
Table name for relationship between test's questions and tags
|
static String |
DB_TABLE_TEST_QUESTIONS
Table name for test's questions
|
static String |
DB_TABLE_TEST_QUESTIONS_COURSE
Table name for relationship between test's questions and courses
|
static String |
DB_TABLE_TEST_TAGS
Table name for test's tags
|
static String |
DB_TABLE_USERS
Table name for users
|
static String |
DB_TABLE_USERS_COURSES
Table name for relationship between users and courses
|
static boolean |
dbCleaned
Indicates if there are changes on db
|
static String |
DEFAULT_SERVER
Server URL
|
static long |
DEFAULT_SYNC_TIME
Default synchronization time for notifications (in minutes)
|
static int |
DIRECTORY_TREE_REQUEST_CODE
Request code for Directory Tree Download module
|
static int |
DOCUMENTS_AREA_CODE
Code to access to the documents in documents area
|
static int |
DOCUMENTS_CHILD
Child position inside the course menu for Documents
|
static int |
DOWNLOADSMANAGER_REQUEST_CODE
Request code for Downloads Manager
|
static int |
ENROLLMENT_GROUP
Group position inside the main menu for Enrollment group
|
static int |
EVALUATION_GROUP
Group position inside the main menu for Evaluation group
|
static int |
FAQS_REQUEST_CODE
Request code for FAQs
|
static int |
GENERATE_QR_CHILD
Child position inside the users menu for Generate QR
|
static int |
GENERATE_QR_REQUEST_CODE
Request code for Generate QR
|
static int |
GETFILE_REQUEST_CODE
Request code for GetFile Manager
|
static int |
GROUPS_REQUEST_CODE
Request code for Directory Tree Download module
|
static int |
GROUPTYPES_REQUEST_CODE
Request code for Group Types module
|
static int |
INFORMATION_REQUEST_CODE
Request code for Information
|
static int |
INTRODUCTION_REQUEST_CODE
Request code for Introduction
|
private static long |
lastLoginTime
Time of application's last login
|
static int |
LINKS_REQUEST_CODE
Request code for Links
|
private static boolean |
logged
User logged flag
|
private static User |
loggedUser
Logged user
|
static int |
LOGIN_REQUEST_CODE
Request code for Login module.
|
static int |
MESSAGES_GROUP
Group position inside the main menu for Messages group
|
static int |
MESSAGES_REQUEST_CODE
Request code for Tests module.
|
static int |
MYGROUPS_CHILD
Child position inside the enrollment menu for My Groups
|
static int |
MYGROUPSMANAGER_REQUEST_CODE
Request code for MyGroups Manager
|
static int |
NOTICES_REQUEST_CODE
Request code for Notice module
|
static int |
NOTIFICATION_CHILD
Child position inside the messages menu for Notification
|
static int |
NOTIFICATIONS_REQUEST_CODE
Request code for Notifications module.
|
static int |
NOTIFMARKALLASREAD_REQUEST_CODE
Request code for NotificationMarkAsRead module
|
static int |
NOTIFYDOWNLOAD_REQUEST_CODE
Request code for Notify Download
|
static String |
NULL_VALUE
Null value returned by webservices when a field is empty
|
static int |
PRACTICESPROGRAM_REQUEST_CODE
Request code for Practices Program
|
private static boolean |
preferencesChanged
Indicates if there are changes on preferences
|
static int |
PUBLISH_NOTE_CHILD
Child position inside the messages menu for Publish Note
|
static int |
RELOGIN_TIME
Time to force relogin
|
static Random |
rnd
Random generator
|
static int |
ROLLCALL_CHILD
Child position inside the users menu for Rollcall
|
static int |
ROLLCALL_CONFIG_DOWNLOAD_REQUEST_CODE
Request code for Rollcall Config Download module.
|
static int |
ROLLCALL_HISTORY_REQUEST_CODE
Request code for Rollcall History module.
|
static int |
ROLLCALL_REQUEST_CODE
Request code for Rollcall module.
|
static int |
SCAN_QR_REQUEST_CODE
Request code for Scan QR module.
|
private static long |
selectedCourseCode
Code of the chosen course.
|
private static String |
selectedCourseFullName
Short name of the full course.
|
private static String |
selectedCourseShortName
Short name of the chosen course.
|
static int |
SEND_MESSAGES_CHILD
Child position inside the messages menu for Send message
|
static int |
SENDMYGROUPS_REQUEST_CODE
Request code for SendMyGroups
|
static int |
SESSIONS_LIST_REQUEST_CODE
Request code for Sessions List module.
|
static int |
SHARE_AREA_CODE
Code to access to the documents in share area
|
static int |
SHARED_AREA_CHILD
Child position inside the course menu for Shared area
|
static int |
STUDENT_TYPE_CODE
Student userRole for getUsers web service.
|
static int |
STUDENTS_HISTORY_REQUEST_CODE
Request code for Students History module.
|
static int |
STUDENTS_LIST_REQUEST_CODE
Request code for Students List module.
|
static String |
SWAD_APP_KEY
SWAD application key
|
static int |
TEACHER_TYPE_CODE
Teacher userTypeCode for getUsers web service.
|
static int |
TEACHINGGUIDE_REQUEST_CODE
Request code for Teaching Guide
|
static int |
TESTS_CHILD
Child position inside the evaluation menu for Tests
|
static int |
TESTS_CONFIG_DOWNLOAD_REQUEST_CODE
Request code for Tests module.
|
static int |
TESTS_MAKE_REQUEST_CODE
Request code for Tests module.
|
static int |
TESTS_QUESTIONS_DOWNLOAD_REQUEST_CODE
Request code for Tests module.
|
static int |
TESTS_REQUEST_CODE
Request code for Tests module.
|
static int |
THEORYPROGRAM_REQUEST_CODE
Request code for Theory Program
|
static int |
USERS_GROUP
Group position inside the main menu for User group
|
Constructor and Description |
---|
Constants() |
Modifier and Type | Method and Description |
---|---|
static int |
getCurrentUserRole()
Gets the role of the logged user in the current selected course
|
static long |
getLastLoginTime()
Gets start time of application
|
static User |
getLoggedUser()
Gets the user logged on SWAD
|
static long |
getSelectedCourseCode()
Gets code of current course
return -1 if no course chosen; code of current course in other case
|
static String |
getSelectedCourseFullName() |
static String |
getSelectedCourseShortName() |
static boolean |
isLogged()
Checks if user is already logged on SWAD
|
static boolean |
isPreferencesChanged() |
static void |
setCurrentUserRole(int userRole)
Sets user role in the current selected course
|
static void |
setLastLoginTime(long l)
Sets start time of application
|
static void |
setLogged(boolean logged)
Sets user logged flag
|
static void |
setLoggedUser(User loggedUser)
Sets the user logged on SWAD
|
static void |
setPreferencesChanged()
Set the fact that the preferences has changed
|
static void |
setPreferencesChanged(boolean newState)
Indicates if the preferences has changed
|
static void |
setSelectedCourseCode(long currentCourseCode)
Sets code of current course
|
static void |
setSelectedCourseFullName(String currentCourseFullName) |
static void |
setSelectedCourseShortName(String currentCourseShortName) |
public static final String SWAD_APP_KEY
public static final String BUGSENSE_API_KEY
public static final String DEFAULT_SERVER
public static final String ACCOUNT_TYPE
public static final String AUTHORITY
public static final long DEFAULT_SYNC_TIME
public static final int CONNECTION_TIMEOUT
private static boolean logged
private static User loggedUser
private static long lastLoginTime
private static long selectedCourseCode
private static String selectedCourseShortName
private static String selectedCourseFullName
private static int currentUserRole
private static boolean preferencesChanged
public static boolean dbCleaned
public static final String AB
public static final Random rnd
public static final String NULL_VALUE
public static final int RELOGIN_TIME
public static final int LOGIN_REQUEST_CODE
public static final int COURSES_REQUEST_CODE
public static final int NOTIFICATIONS_REQUEST_CODE
public static final int TESTS_REQUEST_CODE
public static final int TESTS_CONFIG_DOWNLOAD_REQUEST_CODE
public static final int TESTS_QUESTIONS_DOWNLOAD_REQUEST_CODE
public static final int TESTS_MAKE_REQUEST_CODE
public static final int MESSAGES_REQUEST_CODE
public static final int NOTICES_REQUEST_CODE
public static final int ROLLCALL_REQUEST_CODE
public static final int SCAN_QR_REQUEST_CODE
public static final int DIRECTORY_TREE_REQUEST_CODE
public static final int GROUPS_REQUEST_CODE
public static final int ROLLCALL_CONFIG_DOWNLOAD_REQUEST_CODE
public static final int ROLLCALL_HISTORY_REQUEST_CODE
public static final int STUDENTS_LIST_REQUEST_CODE
public static final int STUDENTS_HISTORY_REQUEST_CODE
public static final int SESSIONS_LIST_REQUEST_CODE
public static final int DOWNLOADSMANAGER_REQUEST_CODE
public static final int NOTIFYDOWNLOAD_REQUEST_CODE
public static final int MYGROUPSMANAGER_REQUEST_CODE
public static final int GROUPTYPES_REQUEST_CODE
public static final int SENDMYGROUPS_REQUEST_CODE
public static final int GETFILE_REQUEST_CODE
public static final int GENERATE_QR_REQUEST_CODE
public static final int INFORMATION_REQUEST_CODE
public static final int INTRODUCTION_REQUEST_CODE
public static final int FAQS_REQUEST_CODE
public static final int BIBLIOGRAPHY_REQUEST_CODE
public static final int PRACTICESPROGRAM_REQUEST_CODE
public static final int THEORYPROGRAM_REQUEST_CODE
public static final int LINKS_REQUEST_CODE
public static final int TEACHINGGUIDE_REQUEST_CODE
public static final int NOTIFMARKALLASREAD_REQUEST_CODE
public static final String APP_TAG
public static final String DB_TABLE_COURSES
public static final String DB_TABLE_NOTIFICATIONS
public static final String DB_TABLE_TEST_ANSWERS
public static final String DB_TABLE_TEST_QUESTIONS
public static final String DB_TABLE_TEST_TAGS
public static final String DB_TABLE_TEST_CONFIG
public static final String DB_TABLE_TEST_QUESTION_TAGS
public static final String DB_TABLE_TEST_QUESTIONS_COURSE
public static final String DB_TABLE_TEST_QUESTION_ANSWERS
public static final String DB_TABLE_USERS
public static final String DB_TABLE_USERS_COURSES
public static final String DB_TABLE_GROUPS
public static final String DB_TABLE_GROUPS_COURSES
public static final String DB_TABLE_GROUP_TYPES
public static final String DB_TABLE_GROUPS_GROUPTYPES
public static final String DB_TABLE_PRACTICE_SESSIONS
public static final String DB_TABLE_ROLLCALL
public static final int STUDENT_TYPE_CODE
public static final int TEACHER_TYPE_CODE
public static final int DOCUMENTS_AREA_CODE
public static final int SHARE_AREA_CODE
public static final int COURSE_GROUP
public static final int EVALUATION_GROUP
public static final int MESSAGES_GROUP
public static final int ENROLLMENT_GROUP
public static final int USERS_GROUP
public static final int NOTIFICATION_CHILD
public static final int SEND_MESSAGES_CHILD
public static final int PUBLISH_NOTE_CHILD
public static final int TESTS_CHILD
public static final int DOCUMENTS_CHILD
public static final int SHARED_AREA_CHILD
public static final int GENERATE_QR_CHILD
public static final int ROLLCALL_CHILD
public static final int MYGROUPS_CHILD
public static boolean isLogged()
public static void setLogged(boolean logged)
logged
- User logged flagpublic static User getLoggedUser()
public static void setLoggedUser(User loggedUser)
public static long getLastLoginTime()
public static void setLastLoginTime(long l)
l
- Start time of applicationpublic static long getSelectedCourseCode()
public static void setSelectedCourseCode(long currentCourseCode)
public static void setCurrentUserRole(int userRole)
userRole
- Role of the user: 0- unknown STUDENT_TYPE_CODE - student TEACHER_TYPE_CODE - teacherpublic static boolean isPreferencesChanged()
public static void setPreferencesChanged()
public static void setPreferencesChanged(boolean newState)
newState
- - true when the preferences has changed and it was not handled it
- false if the preferences has not changedpublic static void setSelectedCourseShortName(String currentCourseShortName)
public static void setSelectedCourseFullName(String currentCourseFullName)
public static String getSelectedCourseShortName()
public static String getSelectedCourseFullName()
public static int getCurrentUserRole()