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_URLLIST_PARAM = "editUrlList"; 055 056 public static final String URLLIST_NAME_PARAM = "urlListName"; 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_ID = "harvestid"; 069 070 public static final String COLUMN_PARAM = "column"; 071 072 public static final String SORT_FIELD_PARAM = "sort_field"; 073 public static final String SORT_ORDER_PARAM = "sort_order"; 074 public static final String SORT_ORDER_ASC = "asc"; 075 public static final String SORT_ORDER_DESC = "desc"; 076 077 public static final String FROM_FILE_PARAM = "fromFile"; 078 079 public static final String DOMAINLIST_PARAM = "domainlist"; 080 081 public static final String OLDSNAPSHOT_PARAM = "old_snapshot_name"; 082 083 public static final String DOMAIN_OBJECTLIMIT_PARAM = "snapshot_object_limit"; 084 085 public static final String DOMAIN_BYTELIMIT_PARAM = "snapshot_byte_limit"; 086 087 public static final String JOB_TIMELIMIT_PARAM = "snapshot_time_limit"; 088 089 public static final String CREATENEW_PARAM = "createnew"; 090 091 public static final String UPDATE_PARAM = "update"; 092 093 public static final String ADDDOMAINS_PARAM = "addDomains"; 094 095 public static final String SAVE_PARAM = "save"; 096 097 public static final String COMMENTS_PARAM = "comments"; 098 099 public static final String AUDIENCE_PARAM = "audience"; 100 101 public static final String NEXTDATE_PARAM = "nextdate"; 102 103 public static final String NEXTDATE_SUBMIT = "setnextdate"; 104 105 public static final String DELETEDOMAIN_PARAM = "deletedomain"; 106 107 public static final String DELETECONFIG_PARAM = "deleteconfig"; 108 109 public static final String EDITION_PARAM = "edition"; 110 111 public static final String UNKNOWN_DOMAINS_PARAM = "unknownDomains"; 112 113 public static final String DOMAIN_PARAM = "name"; 114 115 public static final String CONFIG_NAME_PARAM = "configName"; 116 117 public static final String ORDER_XML_NAME_PARAM = "order_xml"; 118 119 public static final String MAX_RATE_PARAM = "maxRate"; 120 121 public static final String MAX_OBJECTS_PARAM = "maxObjects"; 122 123 public static final String MAX_BYTES_PARAM = "maxBytes"; 124 125 public static final String FLIPACTIVE_PARAM = "flipactive"; 126 127 public static final String SHOW_INACTIVE_PARAM = "showInactive"; 128 129 public static final String SHOW_UNUSED_CONFIGURATIONS_PARAM = "showUnusedConfigurations"; 130 131 public static final String SHOW_UNUSED_SEEDS_PARAM = "showUnusedSeeds"; 132 133 public static final String URLLIST_LIST_PARAM = "urlListList"; 134 135 public static final String JOB_PARAM = "jobID"; 136 137 public static final String JOB_RESUBMIT_PARAM = "resubmit"; 138 139 public static final String JOB_REJECT_PARAM = "reject"; 140 141 public static final String JOB_UNREJECT_PARAM = "unreject"; 142 143 public static final String SEEDS_PARAM = "seeds"; 144 145 public static final String ORDER_TEMPLATE_PARAM = "orderTemplate"; 146 147 public static final String ALIAS_PARAM = "alias"; 148 149 public static final String RENEW_ALIAS_PARAM = "renewAlias"; 150 151 public static final String UPLOAD_FILE_PARAM = "upload_file"; 152 153 public static final String IS_NEWEST_FIRST = "is_newest_first"; 154 155 public static final String DESCENDING = "DESC"; 156 public static final String ASCENDING = "ASC"; 157 158 public static final String FALSE = "false"; 159 public static final String TRUE = "true"; 160 161 /** 162 * Names of some parameters used in management of global crawler traps. 163 */ 164 public static final String TRAP_ID = "trap_id"; 165 166 public static final String TRAP_ACTION = "trap_action"; 167 168 public static final String TRAP_CREATE = "trap_create"; 169 170 public static final String TRAP_DOWNLOAD = "trap_download"; 171 172 public static final String TRAP_ACTIVATE = "trap_activate"; 173 174 public static final String TRAP_DEACTIVATE = "trap_deactivate"; 175 176 public static final String TRAP_CONTENT_TYPE = "trap_content_type"; 177 178 public static final String TRAP_NAME = "trap_name"; 179 180 public static final String TRAP_IS_ACTIVE = "trap_is_active"; 181 182 public static final String TRAP_FILENAME = "trap_filename"; 183 184 public static final String TRAP_DESCRIPTION = "trap_description"; 185 186 /** 187 * Names of the two directories for the sitesections belonging to the harvester package, and the directory belonging 188 * to the viewerproxy package. 189 */ 190 public static final String DEFINITIONS_SITESECTION_DIRNAME = "HarvestDefinition"; 191 192 public static final String HISTORY_SITESECTION_DIRNAME = "History"; 193 194 public static final String QA_SITESECTION_DIRNAME = "QA"; 195 196 /** 197 * The maximum length of a seed before it is truncated before showing it. 198 */ 199 public static final int MAX_SHOWN_SIZE_OF_URL = 40; 200 201 /** Regexp for checking if a seed starts with a protocol. */ 202 public static final String PROTOCOL_REGEXP = "^[a-zA-Z]+:.*"; 203 204 /** Fields used in our calendar functionality. */ 205 public static final String END_TIME_FIELD = "endTimeField"; 206 207 public static final String HOW_OFTEN_FIELD = "howOftenField"; 208 209 /** 210 * This constant is used as a prefix to identify a request parameter as a domain/configuration pair. Ie one sets 211 * such a pair as DOMAIN_IDENTIFIER<domainname>=<configname> 212 */ 213 public static final String DOMAIN_IDENTIFIER = "domain_config_pair_"; 214 215 /** 216 * Extension used for XML files, including '.' separator. 217 */ 218 public static final String XML_EXTENSION = ".xml"; 219 220 /** An edition that will never occur in existing DAO-controlled objects. */ 221 public static final long NO_EDITION = 1L; 222 223 /** 224 * String constant to denote: No next date. 225 */ 226 public static final String NoNextDate = "-"; 227 228 /** The size of field for a domain name. */ 229 public static final int DOMAIN_NAME_FIELD_SIZE = 40; 230 231 /** 232 * The number of columns when showing the crawlertraps associated with a domain. 233 */ 234 public static final int CRAWLERTRAPS_COLUMNS = 60; 235 236 /** 237 * The number of rows when showing the crawlertraps associated with a domain. 238 */ 239 public static final int CRAWLERTRAPS_ROWS = 20; 240 241 /** 242 * The width of the field for the upload file. 243 */ 244 public static final int UPLOAD_FILE_FIELD_WIDTH = 60; 245 246 /** The width of the harvest template name. */ 247 public static final int TEMPLATE_NAME_WIDTH = 30; 248 249 /** Optional argument for which page of the searchresult to show. */ 250 public static final String START_PAGE_PARAMETER = "START_PAGE_INDEX"; 251 252 /** 253 * Domain query type parameter. Used in the jsp-page Definitions-find-domains.jsp. 254 */ 255 public static final String DOMAIN_QUERY_TYPE_PARAM = "DOMAIN_QUERY_TYPE"; 256 257 /** 258 * Domain search key parameter. Used in the jsp-page Definitions-find-domains.jsp. 259 */ 260 public static final String DOMAIN_QUERY_STRING_PARAM = "DOMAIN_QUERY_STRING"; 261 262 public static final String TRAPS_DOMAIN_SEARCH = "crawlertraps"; 263 264 public static final String NAME_DOMAIN_SEARCH = "name"; 265 266 public static final String COMMENTS_DOMAIN_SEARCH = "comments"; 267 268 /** 269 * The default domain search type is name. 270 */ 271 public static final String DEFAULT_DOMAIN_SEARCH_TYPE = NAME_DOMAIN_SEARCH; 272 273 public static final String JOB_ORDERING_BY_STARTDATE_PARAM = "ORDERING_BY_STARTDATE"; 274}