001/* 002 * #%L 003 * Netarchivesuite - harvester 004 * %% 005 * Copyright (C) 2005 - 2014 The Royal Danish Library, the Danish State and University Library, 006 * the National Library of France and the Austrian National Library. 007 * %% 008 * This program is free software: you can redistribute it and/or modify 009 * it under the terms of the GNU Lesser General Public License as 010 * published by the Free Software Foundation, either version 2.1 of the 011 * License, or (at your option) any later version. 012 * 013 * This program is distributed in the hope that it will be useful, 014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 016 * GNU General Lesser Public License for more details. 017 * 018 * You should have received a copy of the GNU General Lesser Public 019 * License along with this program. If not, see 020 * <http://www.gnu.org/licenses/lgpl-2.1.html>. 021 * #L% 022 */ 023 024package dk.netarkivet.harvester.webinterface; 025 026/** 027 * Harvester webinterface constants. 028 */ 029public class Constants { 030 031 /** 032 * The constructor for this class. Making the constructor private prevents the class from being instantiated. 033 */ 034 private Constants() { 035 } 036 037 /** Names of various parameters used in the webinterface. */ 038 public static final String JOBSTATUS_PARAM = HarvestStatusQuery.UI_FIELD.JOB_STATUS.name(); 039 040 public static final String JOBIDORDER_PARAM = "jobidorder"; 041 042 public static final String DOMAIN_SEARCH_PARAM = "domainName"; 043 044 // public static final String DOMAIN 045 046 public static final String HARVEST_ID_PARAM = HarvestStatusQuery.UI_FIELD.HARVEST_ID.name(); 047 048 public static final String HARVEST_NUM_PARAM = HarvestStatusQuery.UI_FIELD.HARVEST_RUN.name(); 049 050 public static final String EDIT_CONFIG_PARAM = "editConfig"; 051 052 public static final String DEFAULT_PARAM = "default"; 053 054 public static final String EDIT_SEEDLIST_PARAM = "editSeedList"; 055 056 public static final String SEEDLIST_NAME_PARAM = "seedListName"; 057 058 public static final String CRAWLERTRAPS_PARAM = "crawlerTraps"; 059 060 public static final String SEED_LIST_PARAMETER = "seedList"; 061 062 public static final String INDEXLABEL_PARAM = "indexLabel"; 063 064 public static final String SCHEDULE_PARAM = "schedulename"; 065 066 public static final String HARVEST_PARAM = "harvestname"; 067 068 public static final String HARVEST_OLD_PARAM = "harvestoldname"; 069 070 public static final String HARVEST_ID = "harvestid"; 071 072 public static final String COLUMN_PARAM = "column"; 073 074 public static final String SORT_FIELD_PARAM = "sort_field"; 075 public static final String SORT_ORDER_PARAM = "sort_order"; 076 public static final String SORT_ORDER_ASC = "asc"; 077 public static final String SORT_ORDER_DESC = "desc"; 078 079 public static final String FROM_FILE_PARAM = "fromFile"; 080 081 public static final String DOMAINLIST_PARAM = "domainlist"; 082 083 public static final String OLDSNAPSHOT_PARAM = "old_snapshot_name"; 084 085 public static final String DOMAIN_OBJECTLIMIT_PARAM = "snapshot_object_limit"; 086 087 public static final String DOMAIN_BYTELIMIT_PARAM = "snapshot_byte_limit"; 088 089 public static final String JOB_TIMELIMIT_PARAM = "snapshot_time_limit"; 090 091 public static final String CREATENEW_PARAM = "createnew"; 092 093 public static final String UPDATE_PARAM = "update"; 094 095 public static final String ADDDOMAINS_PARAM = "addDomains"; 096 097 public static final String SAVE_PARAM = "save"; 098 099 public static final String COMMENTS_PARAM = "comments"; 100 101 public static final String AUDIENCE_PARAM = "audience"; 102 103 public static final String NEXTDATE_PARAM = "nextdate"; 104 105 public static final String NEXTDATE_SUBMIT = "setnextdate"; 106 107 public static final String DELETEDOMAIN_PARAM = "deletedomain"; 108 109 public static final String DELETECONFIG_PARAM = "deleteconfig"; 110 111 public static final String EDITION_PARAM = "edition"; 112 113 public static final String UNKNOWN_DOMAINS_PARAM = "unknownDomains"; 114 115 public static final String DOMAIN_PARAM = "name"; 116 117 public static final String CONFIG_NAME_PARAM = "configName"; 118 119 public static final String CONFIG_OLDNAME_PARAM = "configOldName"; 120 121 public static final String ORDER_XML_NAME_PARAM = "order_xml"; 122 123 public static final String MAX_RATE_PARAM = "maxRate"; 124 125 public static final String MAX_OBJECTS_PARAM = "maxObjects"; 126 127 public static final String MAX_BYTES_PARAM = "maxBytes"; 128 129 public static final String FLIPACTIVE_PARAM = "flipactive"; 130 131 public static final String SHOW_INACTIVE_PARAM = "showInactive"; 132 133 public static final String SHOW_UNUSED_CONFIGURATIONS_PARAM = "showUnusedConfigurations"; 134 135 public static final String SHOW_UNUSED_SEEDS_PARAM = "showUnusedSeeds"; 136 137 public static final String SEEDLIST_LIST_PARAM = "seedListList"; 138 139 public static final String JOB_PARAM = "jobID"; 140 141 public static final String JOB_RESUBMIT_PARAM = "resubmit"; 142 143 public static final String JOB_REJECT_PARAM = "reject"; 144 145 public static final String JOB_UNREJECT_PARAM = "unreject"; 146 147 public static final String SEEDS_PARAM = "seeds"; 148 149 public static final String ORDER_TEMPLATE_PARAM = "orderTemplate"; 150 151 public static final String ALIAS_PARAM = "alias"; 152 153 public static final String RENEW_ALIAS_PARAM = "renewAlias"; 154 155 public static final String UPLOAD_FILE_PARAM = "upload_file"; 156 157 public static final String IS_NEWEST_FIRST = "is_newest_first"; 158 159 public static final String DESCENDING = "DESC"; 160 public static final String ASCENDING = "ASC"; 161 162 public static final String FALSE = "false"; 163 public static final String TRUE = "true"; 164 165 /** 166 * Names of some parameters used in management of global crawler traps. 167 */ 168 public static final String TRAP_ID = "trap_id"; 169 170 public static final String TRAP_ACTION = "trap_action"; 171 172 public static final String TRAP_CREATE = "trap_create"; 173 174 public static final String TRAP_DOWNLOAD = "trap_download"; 175 176 public static final String TRAP_ACTIVATE = "trap_activate"; 177 178 public static final String TRAP_DEACTIVATE = "trap_deactivate"; 179 180 public static final String TRAP_CONTENT_TYPE = "trap_content_type"; 181 182 public static final String TRAP_NAME = "trap_name"; 183 184 public static final String TRAP_IS_ACTIVE = "trap_is_active"; 185 186 public static final String TRAP_FILENAME = "trap_filename"; 187 188 public static final String TRAP_DESCRIPTION = "trap_description"; 189 190 /** 191 * Names of the two directories for the sitesections belonging to the harvester package, and the directory belonging 192 * to the viewerproxy package. 193 */ 194 public static final String DEFINITIONS_SITESECTION_DIRNAME = "HarvestDefinition"; 195 196 public static final String HISTORY_SITESECTION_DIRNAME = "History"; 197 198 public static final String QA_SITESECTION_DIRNAME = "QA"; 199 200 /** 201 * The maximum length of a seed before it is truncated before showing it. 202 */ 203 public static final int MAX_SHOWN_SIZE_OF_URL = 40; 204 205 /** Regexp for checking if a seed starts with a protocol. */ 206 public static final String PROTOCOL_REGEXP = "^[a-zA-Z]+:.*"; 207 208 /** Fields used in our calendar functionality. */ 209 public static final String END_TIME_FIELD = "endTimeField"; 210 211 public static final String HOW_OFTEN_FIELD = "howOftenField"; 212 213 /** 214 * This constant is used as a prefix to identify a request parameter as a domain/configuration pair. Ie one sets 215 * such a pair as DOMAIN_IDENTIFIER<domainname>=<configname> 216 */ 217 public static final String DOMAIN_IDENTIFIER = "domain_config_pair_"; 218 219 /** 220 * Extension used for XML files, including '.' separator. 221 */ 222 public static final String XML_EXTENSION = ".xml"; 223 224 /** An edition that will never occur in existing DAO-controlled objects. */ 225 public static final long NO_EDITION = 1L; 226 227 /** 228 * String constant to denote: No next date. 229 */ 230 public static final String NoNextDate = "-"; 231 232 /** The size of field for a domain name. */ 233 public static final int DOMAIN_NAME_FIELD_SIZE = 40; 234 235 /** 236 * The number of columns when showing the crawlertraps associated with a domain. 237 */ 238 public static final int CRAWLERTRAPS_COLUMNS = 60; 239 240 /** 241 * The number of rows when showing the crawlertraps associated with a domain. 242 */ 243 public static final int CRAWLERTRAPS_ROWS = 20; 244 245 /** 246 * The width of the field for the upload file. 247 */ 248 public static final int UPLOAD_FILE_FIELD_WIDTH = 60; 249 250 /** The width of the harvest template name. */ 251 public static final int TEMPLATE_NAME_WIDTH = 30; 252 253 /** Optional argument for which page of the searchresult to show. */ 254 public static final String START_PAGE_PARAMETER = "START_PAGE_INDEX"; 255 256 /** 257 * Domain query type parameter. Used in the jsp-page Definitions-find-domains.jsp. 258 */ 259 public static final String DOMAIN_QUERY_TYPE_PARAM = "DOMAIN_QUERY_TYPE"; 260 261 /** 262 * Domain search key parameter. Used in the jsp-page Definitions-find-domains.jsp. 263 */ 264 public static final String DOMAIN_QUERY_STRING_PARAM = "DOMAIN_QUERY_STRING"; 265 266 public static final String TRAPS_DOMAIN_SEARCH = "crawlertraps"; 267 268 public static final String NAME_DOMAIN_SEARCH = "name"; 269 270 public static final String COMMENTS_DOMAIN_SEARCH = "comments"; 271 272 /** 273 * The default domain search type is name. 274 */ 275 public static final String DEFAULT_DOMAIN_SEARCH_TYPE = NAME_DOMAIN_SEARCH; 276 277 public static final String JOB_ORDERING_BY_STARTDATE_PARAM = "ORDERING_BY_STARTDATE"; 278 279 280}