public class DomainDefinition extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
EDIT_DOMAIN_JSP |
protected static org.slf4j.Logger |
log |
Modifier and Type | Method and Description |
---|---|
static List<String> |
createDomains(String... domains)
Creates domains with default attributes.
|
static String |
createDomainUrlWithFlippedShowConfigurations(javax.servlet.ServletRequest request)
Creates a url based on the supplied request where all the parameters are the same, except the
ShowUnusedConfigurations boolean, which is flipped. |
static String |
createDomainUrlWithFlippedShowSeeds(javax.servlet.ServletRequest request)
Creates a url based on the supplied request where all the parameters are the same, except the
ShowUnusedSeedLists boolean, which is flipped. |
static List<String> |
getDomains(javax.servlet.jsp.PageContext context,
I18n i18n,
String searchQuery,
String searchType)
Search for domains matching the following criteria.
|
static List<SeedList> |
getSeedLists(List<DomainConfiguration> configurations)
Returns the seed lists associated with the supplied configurations.
|
static List<DomainConfiguration> |
getUsedConfiguration(Domain domain,
Locale locale)
Returns the list of domain configurations which are either used in a concrete harvest or is a 'default
configuration'.
|
static String |
makeDomainLink(String domain)
Creates a link to the domain edit page.
|
static void |
processRequest(javax.servlet.jsp.PageContext context,
I18n i18n)
Extracts all required parameters from the request, checks for any inconsistencies, and passes the requisite data
to the updateDomain method for processing.
|
protected static final org.slf4j.Logger log
protected static final String EDIT_DOMAIN_JSP
public static void processRequest(javax.servlet.jsp.PageContext context, I18n i18n)
For reference, the parameters for this page look something like http://localhost:8076/HarvestDefinition/Definitions-edit-domain.jsp? update=1&name=netarkivet.dk&default=defaultconfig&configName=&order_xml=& load=&maxObjects=&urlListName=&seedList=+&passwordName=&passwordDomain=& passwordRealm=&userName=&password=& crawlertraps=%2Fcgi-bin%2F*%0D%0A%2Ftrap%2F*%0D%0A
update: This method throws an exception if update is not set
name: must be the name of a known domain
comments: optional user-entered comments about the domain
default: the defaultconfig is set to this value. Must be non-null and a known configuration of this domain.
crawlertraps: a newline-separated list of urls to be ignored. May be empty or null
alias: If set, this domain is an alias of the set domain renewAlias: If set, the alias date should be renewed
context
- The context of this requesti18n
- I18n informationIOFailure
- on updateerrors in the DAOForwardedToErrorPage
- if domain is not found, if the edition is out-of-date, or if parameters are missing
or invalidpublic static List<String> createDomains(String... domains)
domains
- a list of domain namespublic static String makeDomainLink(String domain)
domain
- The domain to show with a linkpublic static String createDomainUrlWithFlippedShowConfigurations(javax.servlet.ServletRequest request)
ShowUnusedConfigurations
boolean, which is flipped.request
- The original 'create domain' request to based the new url on.ShowUnusedConfigurations
boolean switched.public static String createDomainUrlWithFlippedShowSeeds(javax.servlet.ServletRequest request)
ShowUnusedSeedLists
boolean, which is flipped.request
- The original 'create domain' request to based the new url on.ShowUnusedSeedLists
boolean switched.public static List<String> getDomains(javax.servlet.jsp.PageContext context, I18n i18n, String searchQuery, String searchType)
context
- the context of the JSP page callingi18n
- The translation properties file usedsearchQuery
- The given searchQuery for searching for among the domains.searchType
- The given searchCriteriapublic static List<DomainConfiguration> getUsedConfiguration(Domain domain, Locale locale)
The list is sorted alphabetically by name according to the supplied locale.
domain
- The domain to find the used configurations for.locale
- The locale to base the sorting onpublic static List<SeedList> getSeedLists(List<DomainConfiguration> configurations)
configurations
- The configurations to find seed lists forCopyright © 2005–2015 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.