Subversion Repositories bacoAlunos

Rev

Rev 237 | Rev 248 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 fvelez 1
package pt.estgp.estgweb;
2
 
3
import pt.estgp.estgweb.utils.ConfigProperties;
4
 
9 jmachado 5
import java.util.List;
116 jmachado 6
import java.math.BigDecimal;
9 jmachado 7
 
1 fvelez 8
/**
9
 * @author Jorge Machado
10
 * @date 28/Fev/2008
11
 * @time 12:51:32
12
 * @see pt.estgp.estgweb
13
 */
92 jmachado 14
public class Globals {
18 jmachado 15
 
92 jmachado 16
 
244 jmachado 17
    public static 1.5.0/docs/api/java/lang/String.html">String CLASSES_ABSOLUTE_PATH;
18
 
19
    static
20
    {
21
        CLASSES_ABSOLUTE_PATH = Globals.class.getProtectionDomain().getCodeSource().getLocation().toString().replace("%20"," ");
22
        if(CLASSES_ABSOLUTE_PATH.endsWith("Globals.class")) CLASSES_ABSOLUTE_PATH = CLASSES_ABSOLUTE_PATH.substring(0, CLASSES_ABSOLUTE_PATH.lastIndexOf("/")) + "/../../../";
23
        if(CLASSES_ABSOLUTE_PATH.endsWith(".jar")) CLASSES_ABSOLUTE_PATH = CLASSES_ABSOLUTE_PATH.substring(0, CLASSES_ABSOLUTE_PATH.lastIndexOf("/")) + "/../classes/";
24
        if(CLASSES_ABSOLUTE_PATH.endsWith("/"))
25
            CLASSES_ABSOLUTE_PATH = CLASSES_ABSOLUTE_PATH.substring(0,CLASSES_ABSOLUTE_PATH.length()-1);
26
    }
223 jmachado 27
    public static final 1.5.0/docs/api/java/lang/String.html">String INTRANET_CONTENTS = ConfigProperties.getProperty("intranet.contents.dir");
28
    public static final 1.5.0/docs/api/java/lang/String.html">String INTRANET_GRADES = ConfigProperties.getProperty("intranet.grades.dir");
29
    public static final 1.5.0/docs/api/java/lang/String.html">String INTRANET_PRESENCES = ConfigProperties.getProperty("intranet.presences.dir");
30
 
90 jmachado 31
    public static final int SEARCH_MAX_RESULTS = ConfigProperties.getIntProperty("search.max.results");
92 jmachado 32
    public static final int SEARCH_BEST_FRAGMENTS_MAX_FRAGMENT_SIZE = ConfigProperties.getIntProperty("search.best.fragments.max.fragment.size");
33
    public static final int SEARCH_BEST_FRAGMENTS_MAX_FRAGMENTS = ConfigProperties.getIntProperty("search.best.fragments.max.fragments");
34
 
90 jmachado 35
    public static final 1.5.0/docs/api/java/lang/String.html">String ALL_ROLE = ConfigProperties.getProperty("user.super");
18 jmachado 36
    public static final 1.5.0/docs/api/java/lang/String.html">String ACTUAL_RELATIVE_PATH = "ACTUAL_RELATIVE_PATH";
1 fvelez 37
    public static final 1.5.0/docs/api/java/lang/String.html">String ADMIN_ROLE = ConfigProperties.getProperty("user.admin");
38
    public static final 1.5.0/docs/api/java/lang/String.html">String SUPER_USER_ROLE = ConfigProperties.getProperty("user.super");
215 jmachado 39
    public static final 1.5.0/docs/api/java/lang/String.html">String MANAGED_IDENTIFIER_MANAGERS_ROLE = ConfigProperties.getProperty("user.identifiersManagers");
44 fvelez 40
    public static final 1.5.0/docs/api/java/lang/String.html">String USER_SESSION_KEY = "UserSession";
9 jmachado 41
    public static final List<String> AUTOMATIC_VALIDATION_ROLES = ConfigProperties.getListValues("announcements.automatic.validation.role");
18 jmachado 42
    public static final 1.5.0/docs/api/java/lang/String.html">String TMP_DIR = ConfigProperties.getProperty("tmp.dir");
187 jmachado 43
    public static final 1.5.0/docs/api/java/lang/String.html">String DATA_DIR = ConfigProperties.getProperty("data.dir");
29 jmachado 44
    public static final 1.5.0/docs/api/java/lang/String.html">String EMAIL_SERVER_HOST = ConfigProperties.getProperty("email.server");
45
    public static final 1.5.0/docs/api/java/lang/String.html">String SYSTEM_EMAIL_BOX = ConfigProperties.getProperty("email.from");
35 fvelez 46
    public static final 1.5.0/docs/api/java/lang/String.html">String ANNOUNCEMENT_TYPE_NEWS = "news";
47
    public static final 1.5.0/docs/api/java/lang/String.html">String ANNOUNCEMENT_TYPE_TOP_FLASH_NEWS = "top.flash.news";
48
    public static final 1.5.0/docs/api/java/lang/String.html">String ANNOUNCEMENT_TYPE_BOTTOM_FLASH_NEWS = "bottom.flash.news";
214 jmachado 49
    public static final 1.5.0/docs/api/java/lang/String.html">String ANNOUNCEMENT_TYPE_TODO = "todo";
50
    public static final 1.5.0/docs/api/java/lang/String.html">String ANNOUNCEMENT_TYPE_COURSE_UNIT = "courseUnitAnnouncement";
92 jmachado 51
    public static final int NUMBER_ANNOUNCEMENT_TYPE_NEW_INDEX = 5;
52
    public static final int NUMBER_ANNOUNCEMENT_TYPE_TOP_FLASH_NEWS_INDEX = 1;
53
    public static final int NUMBER_ANNOUNCEMENT_TYPE_BOTTOM_FLASH_NEWS_INDEX = 2;
54
    public static final int ANNOUNCEMENT_TYPE_TOP_FLASH_NEWS_TIMEOUT = ConfigProperties.getIntProperty("announcements.top.flash.news.timeout.miliseconds");
214 jmachado 55
    public static final List<String> ANNOUNCEMENT_NOT_STANDARD = ConfigProperties.getListValues("announcements.not.standard");
56
    public static final int HOME_MAX_COURSE_UNIT_ANNOUNCEMENTS = 3;
146 jmachado 57
    public static List<String> USER_ROLES = ConfigProperties.getListValues("user.role");
42 fvelez 58
 
151 fvelez 59
    public static final 1.5.0/docs/api/java/lang/String.html">String STUDENT_ROLE = ConfigProperties.getProperty("user.student");
60
    public static final 1.5.0/docs/api/java/lang/String.html">String TEACHER_ROLE = ConfigProperties.getProperty("user.teacher");
221 jmachado 61
    public static final 1.5.0/docs/api/java/lang/String.html">String EMAIL_LOCAL_SUFFIX = ConfigProperties.getProperty("email.local.suffix");
163 jmachado 62
 
221 jmachado 63
 
214 jmachado 64
    public static final 1.5.0/docs/api/java/lang/String.html">String COURSE_COORDINATOR_ROLE = ConfigProperties.getProperty("user.courseCoordinator");
65
    public static final 1.5.0/docs/api/java/lang/String.html">String COURSE_DIRECTOR_ROLE = ConfigProperties.getProperty("user.courseDirector");
66
 
67
 
68
    public static final 1.5.0/docs/api/java/lang/String.html">String BLOG_TYPE_COURSE_UNIT = ConfigProperties.getProperty("blog.type.courseunit");
69
 
163 jmachado 70
    /*SIGES WEB SERVICES*/
116 jmachado 71
    public static final 1.5.0/docs/api/java/math/BigDecimal.html">BigDecimal SIGES_INSTITUTION_CODE = new 1.5.0/docs/api/java/math/BigDecimal.html">BigDecimal(ConfigProperties.getIntProperty("siges.institution.code"));
163 jmachado 72
    public static final 1.5.0/docs/api/java/lang/String.html">String SIGES_WEBSERVICE_WSDL = ConfigProperties.getProperty("ws.siges.wsdl");
73
    public static final 1.5.0/docs/api/java/lang/String.html">String SIGES_WEBSERVICE_TARGET_NAMESPACE = ConfigProperties.getProperty("ws.siges.target.namespace");
219 jmachado 74
    public static final 1.5.0/docs/api/java/lang/String.html">String SIGES_WEBSERVICE_SECRET = ConfigProperties.getProperty("ws.siges.secret");
114 jmachado 75
 
163 jmachado 76
 
77
 
144 jmachado 78
    public static final long URL_STAT_CHART_EXPIRE_INTERVAL = ConfigProperties.getIntProperty("url.stat.image.expire.interval.time.minutes");
79
    public static final 1.5.0/docs/api/java/lang/String.html">String URL_STAT_CHART_TMP_DIR = ConfigProperties.getProperty("url.stat.tmp.dir");
80
    public static final int URL_STAT_CACHE_SIZE = ConfigProperties.getIntProperty("url.stat.click.cache.size");
81
    public static final long URL_STAT_CACHE_TIMEOUT = ConfigProperties.getIntProperty("url.stat.click.cache.timeout") * 60 * 1000;
82
    public static final List<String> URL_STAT_IGNORE_EXTENSIONS = ConfigProperties.getListValues("url.stat.ignore.extension");
83
    public static final List<String> URL_STAT_IGNORE_PREFIXS = ConfigProperties.getListValues("url.stat.ignore.prefix");
146 jmachado 84
 
181 jmachado 85
    public static final List<String> FILTER_IGNORE_EXTENSIONS = ConfigProperties.getListValues("filter.ignore.extension");
182 jmachado 86
    public static final List<String> FILTER_IGNORE_PREFIXES = ConfigProperties.getListValues("filter.ignore.prefix");
181 jmachado 87
 
146 jmachado 88
    public static final 1.5.0/docs/api/java/lang/String.html">String SITE_URL = ConfigProperties.getProperty("site.url");
156 jmachado 89
 
90
    public static final 1.5.0/docs/api/java/lang/String.html">String INTRANET_MESSAGES_PREFIX = "intranet.";
91
 
92
    public static final List<String> ANNOUNCEMENTS_VALIDATOR_ROLES = ConfigProperties.getListValues("announcements.validator.role");
157 jmachado 93
 
94
    public static final 1.5.0/docs/api/java/lang/String.html">String POP_SERVER = ConfigProperties.getProperty("pop.server");
95
    public static final int POP_MAX_MESSAGES = ConfigProperties.getIntProperty("pop.max.messages");
96
    public static final 1.5.0/docs/api/java/lang/String.html">String POP_WEB_INTERFACE = ConfigProperties.getProperty("pop.web.interface");
159 jmachado 97
    public static final boolean POP_CONTAINER_USAGE = ConfigProperties.getBooleanProperty("pop.container.use");
98
    public static final int POP_FRAGMENT_TEXT_SIZE = ConfigProperties.getIntProperty("pop.fragment.text.size");
162 jmachado 99
    public static final int POP_REFRESH_TIMEOUT_MILISECONDS = ConfigProperties.getIntProperty("pop.refresh.timeout.minutes") * 1000 * 60;
163 jmachado 100
    public static final boolean POP_USE_DEFAULT_SERVER = ConfigProperties.getBooleanProperty("pop.use.default.server");
101
    public static final boolean POP_USE_USERNAME_AND_PASSWORD_FIRST_AUTH = ConfigProperties.getBooleanProperty("pop.use.username.and.password.first.authentication");
161 jmachado 102
 
163 jmachado 103
 
104
    public static final int REMINDER_TEXT_SUMMARY_SIZE =  ConfigProperties.getIntProperty("reminders.text.summary.size");
105
 
168 fvelez 106
    public static final long MAX_BIGMAGE_FILE_SIZE_KBYTES = 500;
107
    public static final long MAX_SMALLIMAGE_FILE_SIZE_KBYTES = 500;
178 jmachado 108
    public static final long MAX_BIGMAGE_FILE_SIZE_BYTES = MAX_BIGMAGE_FILE_SIZE_KBYTES * 1024;
109
    public static final long MAX_SMALLIMAGE_FILE_SIZE_BYTES = MAX_SMALLIMAGE_FILE_SIZE_KBYTES * 1024;
168 fvelez 110
 
206 jmachado 111
 
112
    //CourseUnits
113
    public static final 1.5.0/docs/api/java/lang/String.html">String SIGES_importFirstYearFormat = ConfigProperties.getProperty("importFirstYearFormat");
114
    public static final 1.5.0/docs/api/java/lang/String.html">String SIGES_importSecondYearFormat = ConfigProperties.getProperty("importSecondYearFormat");
115
    public static final 1.5.0/docs/api/java/lang/String.html">String SIGES_importFinalFormat = ConfigProperties.getProperty("importFinalFormat");
116
 
214 jmachado 117
    public static final 1.5.0/docs/api/java/lang/String.html">String SIGES_importFirstYearFormatIntranet = ConfigProperties.getProperty("importFirstYearFormatIntranet");
118
    public static final 1.5.0/docs/api/java/lang/String.html">String SIGES_importSecondYearFormatIntranet = ConfigProperties.getProperty("importSecondYearFormatIntranet");
119
    public static final 1.5.0/docs/api/java/lang/String.html">String SIGES_importFinalFormatIntranet = ConfigProperties.getProperty("importFinalFormatIntranet");
206 jmachado 120
 
214 jmachado 121
    public static final 1.5.0/docs/api/java/lang/String.html">String INTRANET_SEMESTRE_S1 = ConfigProperties.getProperty("intranet.semestre.S1");
122
    public static final 1.5.0/docs/api/java/lang/String.html">String INTRANET_SEMESTRE_S2 = ConfigProperties.getProperty("intranet.semestre.S2");
123
 
124
 
125
    public static final 1.5.0/docs/api/java/lang/String.html">String INTRANET_SETUP_FILE = ConfigProperties.getProperty("intranet.setup.file");
126
    public static final 1.5.0/docs/api/java/lang/String.html">String INTRANET_USERS_SETUP_FILE_NAME = ConfigProperties.getProperty("intranet.setup.users.filename");
127
    public static final 1.5.0/docs/api/java/lang/String.html">String INTRANET_SETUP_FILE_NAME = ConfigProperties.getProperty("intranet.setup.filename");
128
 
129
 
215 jmachado 130
    public static final 1.5.0/docs/api/java/lang/String.html">String COURSEUNIT_ASSIGNEMENT_TYPE_NO_FILE = "nofile";
214 jmachado 131
 
215 jmachado 132
    public static final 1.5.0/docs/api/java/lang/String.html">String PROFILE_SCHOLAR_DEGREE_SUPERIOR = "superior";
133
    public static final 1.5.0/docs/api/java/lang/String.html">String PROFILE_DEGREE_NOTSET = "notset";
214 jmachado 134
 
135
 
215 jmachado 136
 
227 jmachado 137
    public static final boolean SMS_COURSEUNIT_ANNOUNCEMENT = ConfigProperties.getBooleanProperty("sms.courseunit.announcement");
138
    public static final boolean SMS_NEW_GRADES = ConfigProperties.getBooleanProperty("sms.new.grades");
236 jmachado 139
    public static final boolean EMAIL_NEW_GRADES = ConfigProperties.getBooleanProperty("email.new.grades");
237 jmachado 140
    public static final boolean EMAIL_COURSEUNIT_ANNOUNCEMENTS = ConfigProperties.getBooleanProperty("email.courseunit.announcements");
215 jmachado 141
 
227 jmachado 142
    public static final boolean SMS_COURSEUNIT_ANNOUNCEMENT_ONLY_PROFS = ConfigProperties.getBooleanProperty("sms.courseunit.announcement.only.profs");
143
 
144
 
215 jmachado 145
    public static final 1.5.0/docs/api/java/lang/String.html">String MODULE_STATUS_PREFIX = "module.";
146
    public static final boolean MODULE_STATUS_ANNOUNCEMENTS = ConfigProperties.getBooleanProperty("module.announcements");
147
    public static final boolean MODULE_STATUS_MANAGE_IDENTIFIERS = ConfigProperties.getBooleanProperty("module.manageidentifiers");
148
    public static final boolean MODULE_STATUS_BLOGS = ConfigProperties.getBooleanProperty("module.blogs");
149
    public static final boolean MODULE_STATUS_URLSTAT = ConfigProperties.getBooleanProperty("module.urlstat");
150
    public static final boolean MODULE_STATUS_SEARCH = ConfigProperties.getBooleanProperty("module.search");
151
    public static final boolean MODULE_STATUS_SEARCH_GOOGLE = ConfigProperties.getBooleanProperty("module.searchGoogle");
152
    public static final boolean MODULE_STATUS_TODOS = ConfigProperties.getBooleanProperty("module.todos");
153
    public static final boolean MODULE_STATUS_REMINDERS = ConfigProperties.getBooleanProperty("module.reminders");
154
    public static final boolean MODULE_STATUS_INTRANET = ConfigProperties.getBooleanProperty("module.intranet");
155
    public static final boolean MODULE_STATUS_PROFILE = ConfigProperties.getBooleanProperty("module.profile");
156
    public static final boolean MODULE_STATUS_COURSEUNITS = ConfigProperties.getBooleanProperty("module.courseunits");
227 jmachado 157
    public static final boolean MODULE_STATUS_SMS = ConfigProperties.getBooleanProperty("module.sms");
215 jmachado 158
 
227 jmachado 159
 
244 jmachado 160
    public static final 1.5.0/docs/api/java/lang/String.html">String TEMPLATE_XSD_PATH = "/template/xsd";
236 jmachado 161
    public static final 1.5.0/docs/api/java/lang/String.html">String TEMPLATE_EMAIL_PATH = "/template/email";
227 jmachado 162
    public static final 1.5.0/docs/api/java/lang/String.html">String TEMPLATE_ASSIGNEMENT_PATH = "/template/assignement";
163
    public static final 1.5.0/docs/api/java/lang/String.html">String TEMPLATE_SMS_PATH = "/template/sms";
228 jmachado 164
    public static final 1.5.0/docs/api/java/lang/String.html">String TEMPLATE_SMS_COURSEUNIT_ANNOUNCMENT = TEMPLATE_SMS_PATH + "/CourseUnit.txt";
165
    public static final 1.5.0/docs/api/java/lang/String.html">String TEMPLATE_SMS_NEW_GRADES = TEMPLATE_SMS_PATH + "/GradesUnit.txt";
166
    public static final 1.5.0/docs/api/java/lang/String.html">String TEMPLATE_SMS_NEW_GRADE = TEMPLATE_SMS_PATH + "/GradeUnit.txt";
227 jmachado 167
 
237 jmachado 168
    public static final 1.5.0/docs/api/java/lang/String.html">String EMAIL_SEND_URL_FRIEND_SUBJECT_PT = ConfigProperties.getProperty("email.send.url.friend.subject.pt");
169
    public static final 1.5.0/docs/api/java/lang/String.html">String EMAIL_SEND_URL_FRIEND_SUBJECT_EN = ConfigProperties.getProperty("email.send.url.friend.subject.en");
236 jmachado 170
    public static final 1.5.0/docs/api/java/lang/String.html">String EMAIL_SEND_URL_FRIEND_TEMPLATE_PT = "sendPageFriend_pt.txt";
171
    public static final 1.5.0/docs/api/java/lang/String.html">String EMAIL_SEND_URL_FRIEND_TEMPLATE_EN = "sendPageFriend_en.txt";
172
 
237 jmachado 173
    public static final 1.5.0/docs/api/java/lang/String.html">String EMAIL_COURSEUNIT_ANNOUNCEMENT_SUBJECT_PT = ConfigProperties.getProperty("email.courseunit.announcement.subject.pt");
174
    public static final 1.5.0/docs/api/java/lang/String.html">String EMAIL_COURSEUNIT_ANNOUNCEMENT_SUBJECT_EN = ConfigProperties.getProperty("email.courseunit.announcement.subject.en");
175
    public static final 1.5.0/docs/api/java/lang/String.html">String EMAIL_COURSEUNIT_ANNOUNCEMENT_TEMPLATE_PT = "courseUnitAnnouncement_pt.txt";
176
    public static final 1.5.0/docs/api/java/lang/String.html">String EMAIL_COURSEUNIT_ANNOUNCEMENT_TEMPLATE_EN = "courseUnitAnnouncement_en.txt";
177
 
178
    public static final 1.5.0/docs/api/java/lang/String.html">String EMAIL_NEW_GRADES_SUBJECT_PT = ConfigProperties.getProperty("email.new.grades.subject.pt");
179
    public static final 1.5.0/docs/api/java/lang/String.html">String EMAIL_NEW_GRADES_SUBJECT_EN = ConfigProperties.getProperty("email.new.grades.subject.en");
236 jmachado 180
    public static final 1.5.0/docs/api/java/lang/String.html">String EMAIL_NEW_GRADES_TEMPLATE_PT = "newGrades_pt.txt";
181
    public static final 1.5.0/docs/api/java/lang/String.html">String EMAIL_NEW_GRADES_TEMPLATE_EN = "newGrades_en.txt";
182
 
183
    public static final 1.5.0/docs/api/java/lang/String.html">String EMAIL_GRADE_UNIT_TEMPLATE = "GradeUnit.txt";
1 fvelez 184
}