de.innovationgate.wga.common
public class WGAXML extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DESIGNPROVIDER_DB
String representing design sharing as design provider in wga.xml
|
static java.lang.String |
DESIGNPROVIDER_SYNC
String representing design synchronisation as design provider in wga.xml
|
static java.lang.String |
DESIGNSHARING_MODE_ANONYMOUS
String representing anonymous cross login mode for design sharing in wga.xml
|
static java.lang.String |
DESIGNSHARING_MODE_PARALLEL
String representing anonymous cross login mode for design sharing in wga.xml
|
static java.lang.String |
DESIGNSYNC_MODE_DIRECT
String representing direct file system design providing in wga.xml
|
static java.lang.String |
DESIGNSYNC_MODE_FULL
String representing full design synchronisation in wga.xml
|
static java.lang.String |
DESIGNSYNC_MODE_VIRTUAL
String representing virtual design synchronisation in wga.xml
|
static java.lang.String |
DOMAIN_LOGINMODE_MASTERLOGIN
String representing domain login mode "master login" in wga.xml
|
static java.lang.String |
DOMAIN_LOGINMODE_USERLOGINS
String representing domain login mode "user based" in wga.xml
|
static java.lang.String |
DUMMY_CONTENTDB_TITLE
Dummy content db title to use in Manager when no title is configured
|
static java.lang.String |
PERS_MODE_AUTO
String representing personalisation mode "automatic" in wga.xml
|
static java.lang.String |
PERS_MODE_CUSTOM
String representing personalisation mode "custom / TMLScript based" in wga.xml
|
static java.lang.String |
PERS_MODE_LOGIN
String representing personalisation mode "login based" in wga.xml
|
static java.lang.String |
PERS_STATISTICS_HIT
String representing personalisation statistics mode "hit based" in wga.xml
|
static java.lang.String |
PERS_STATISTICS_OFF
String representing personalisation statistics mode "off" in wga.xml
|
static java.lang.String |
PERS_STATISTICS_SESSION
String representing personalisation statistics mode "session based" in wga.xml
|
Constructor and Description |
---|
WGAXML() |
Modifier and Type | Method and Description |
---|---|
static org.dom4j.Element |
addContentDB(org.dom4j.Element parent,
java.lang.String implClass)
add a default database element to the given parentElement (
|
static org.dom4j.Element |
addDomain(org.dom4j.Element parent,
java.lang.String domainName)
add a default domain element to the given parentElement (
|
static org.dom4j.Element |
addOrReplaceOption(org.dom4j.Element parent,
java.lang.String name,
java.lang.String value)
Adds or replaces a single option.
|
static org.dom4j.Element |
addPersDB(org.dom4j.Element parent,
java.lang.String implClass)
add a default persDbElement to the given parentElement (
|
static boolean |
contentDBExists(org.dom4j.Element wgaXMLElement,
java.lang.String dbkey)
Tests if a content database of the given key is already registered
|
static org.dom4j.Element |
copyContentDB(org.dom4j.Element contentDBElement,
java.lang.String newDBKey)
copy a whole contentDB definition and inserts it as new db with the given key
|
static org.dom4j.Element |
createClientRestrictions(org.dom4j.Element contentDbElement,
boolean enabled,
java.util.List restrictions)
set the given clientRestrictions on the given contentDbElement
|
static org.dom4j.Element |
createDefaultDbOptions(org.dom4j.Element data)
Creates default DB options that are included on every new database
|
static org.dom4j.Element |
createDefaultFileHandlerMappings(org.dom4j.Element fileHandlerMappingElement)
creates default file handler mappings on the given filehandlermappings-element
|
static org.dom4j.Element |
createDefaultPublisherOptions(org.dom4j.Element data)
Creates default publisher options that are included on every new database
|
static org.dom4j.Element |
createDesignConfig(org.dom4j.Element dbElement,
DesignConfiguration config)
set the given designSyncConfiguration on the given contentDbElement
|
static org.dom4j.Element |
createDesignConfig(org.dom4j.Element contentDbElement,
java.lang.String provider,
java.lang.String key,
java.lang.String mode,
java.lang.String detailInfo)
set the given designSyncConfiguration on the given contentDbElement
|
static org.dom4j.Element |
createLuceneConfig(org.dom4j.Element contentDbElement,
boolean enabled,
java.util.List indexItemRules)
set the given luceneConfiguration on the given contentDbElement
|
static org.dom4j.Element |
createLuceneConfig(org.dom4j.Element contentDbElement,
LuceneConfiguration config)
set the given luceneConfiguration on the given contentDbElement
|
static boolean |
domainExists(org.dom4j.Element wgaXMLElement,
java.lang.String domainName)
Tests if a domain of the given name already exists in wga.xml
|
static java.util.List |
getDomainElements(org.dom4j.Element wgaXMLElement)
get all defined domainElements in wga.xml
|
static void |
normalize(org.dom4j.Document doc)
Performs normalization on the wga.xml by creating mandatory elements and attributes and doing some
additional validations, like converting obsolete structures, defining yet undefined domains etc.
|
static void |
pullupDesignProviders(org.dom4j.Document doc)
Automatically sorts design providers in wga.xml to be the first to be connected.
|
static boolean |
removeOption(org.dom4j.Element parent,
java.lang.String name)
Remoevs a single option.
|
static org.dom4j.Element |
setBasicContentDBInformation(org.dom4j.Element contentDbElement,
boolean enabled,
boolean lazyConnect,
java.lang.String dbImplClass,
java.lang.String dbkey,
java.lang.String title,
java.lang.String domain,
java.lang.String dbPath,
boolean defaultLogin,
java.lang.String username,
java.lang.String password)
set the given information on the given contentDbElement
|
static org.dom4j.Element |
setBasicDomainInformation(org.dom4j.Element domainElement,
java.lang.String domainName,
java.lang.String loginMode,
java.lang.String masterLoginUsername,
java.lang.String masterLoginPassword)
set the given information on the given domainElement
|
static org.dom4j.Element |
setBasicPersDBInformation(org.dom4j.Element persDbElement,
boolean enabled,
boolean lazyConnect,
java.lang.String dbImplClass,
java.lang.String dbPath,
java.lang.String mode,
java.lang.String statistics,
boolean defaultLogin,
java.lang.String username,
java.lang.String password,
java.lang.String domain)
set the given information on the given persDbElement
|
public static final java.lang.String DUMMY_CONTENTDB_TITLE
public static final java.lang.String PERS_MODE_AUTO
public static final java.lang.String PERS_MODE_LOGIN
public static final java.lang.String PERS_MODE_CUSTOM
public static final java.lang.String PERS_STATISTICS_OFF
public static final java.lang.String PERS_STATISTICS_SESSION
public static final java.lang.String PERS_STATISTICS_HIT
public static final java.lang.String DOMAIN_LOGINMODE_USERLOGINS
public static final java.lang.String DOMAIN_LOGINMODE_MASTERLOGIN
public static final java.lang.String DESIGNPROVIDER_SYNC
public static final java.lang.String DESIGNPROVIDER_DB
public static final java.lang.String DESIGNSYNC_MODE_VIRTUAL
public static final java.lang.String DESIGNSYNC_MODE_FULL
public static final java.lang.String DESIGNSYNC_MODE_DIRECT
public static final java.lang.String DESIGNSHARING_MODE_ANONYMOUS
public static final java.lang.String DESIGNSHARING_MODE_PARALLEL
public static org.dom4j.Element addDomain(org.dom4j.Element parent, java.lang.String domainName)
parent
- domainName
- public static org.dom4j.Element setBasicDomainInformation(org.dom4j.Element domainElement, java.lang.String domainName, java.lang.String loginMode, java.lang.String masterLoginUsername, java.lang.String masterLoginPassword)
domainElement
- domainName
- loginMode
- valid values - (WGAXML.DOMAIN_LOGINMODE_USERLOGINS, WGAXML.DOMAIN_LOGINMODE_MASTERLOGIN)masterLoginUsername
- masterLoginPassword
- public static boolean domainExists(org.dom4j.Element wgaXMLElement, java.lang.String domainName)
wgaXMLElement
- The document element of wga.xmldomainName
- The name of the domainpublic static java.util.List getDomainElements(org.dom4j.Element wgaXMLElement)
wgaXMLElement
- - an element of wga.xmlpublic static org.dom4j.Element addContentDB(org.dom4j.Element parent, java.lang.String implClass)
parent
- implClass
- public static org.dom4j.Element setBasicContentDBInformation(org.dom4j.Element contentDbElement, boolean enabled, boolean lazyConnect, java.lang.String dbImplClass, java.lang.String dbkey, java.lang.String title, java.lang.String domain, java.lang.String dbPath, boolean defaultLogin, java.lang.String username, java.lang.String password)
contentDbElement
- enabled
- dbImplClass
- dbkey
- title
- domain
- dbPath
- defaultLogin
- username
- password
- public static boolean contentDBExists(org.dom4j.Element wgaXMLElement, java.lang.String dbkey)
wgaXMLElement
- The root node of the wga.xmldbkey
- The dbkey to searchpublic static org.dom4j.Element copyContentDB(org.dom4j.Element contentDBElement, java.lang.String newDBKey)
contentDBElement
- The element to copynewDBKey
- The new database key for the copypublic static org.dom4j.Element createDefaultDbOptions(org.dom4j.Element data)
data
- The database elementpublic static org.dom4j.Element createDefaultPublisherOptions(org.dom4j.Element data)
data
- The database elementpublic static org.dom4j.Element addPersDB(org.dom4j.Element parent, java.lang.String implClass)
parent
- implClass
- public static org.dom4j.Element setBasicPersDBInformation(org.dom4j.Element persDbElement, boolean enabled, boolean lazyConnect, java.lang.String dbImplClass, java.lang.String dbPath, java.lang.String mode, java.lang.String statistics, boolean defaultLogin, java.lang.String username, java.lang.String password, java.lang.String domain)
persDbElement
- enabled
- lazyConnect
- dbImplClass
- dbPath
- mode
- - valid values (WGAXML.PERS_MODE_AUTO, WGAXML.PERS_MODE_LOGIN, WGAXML.PERS_MODE_CUSTOM)statistics
- - valid values (WGAXML.PERS_STATISTICS_OFF, WGAXML.PERS_STATISTICS_SESSION, WGAXML.PERS_STATISTICS_HIT)defaultLogin
- username
- password
- domain
- public static org.dom4j.Element createDesignConfig(org.dom4j.Element dbElement, DesignConfiguration config)
dbElement
- database element to receive the design sync configurationconfig
- Design sync configuration beanpublic static org.dom4j.Element createDesignConfig(org.dom4j.Element contentDbElement, java.lang.String provider, java.lang.String key, java.lang.String mode, java.lang.String detailInfo)
contentDbElement
- database element to receive the design sync configurationprovider
- The design providerkey
- Provider information "key"mode
- Provider information "mode"detailInfo
- Detail provider informationpublic static org.dom4j.Element createLuceneConfig(org.dom4j.Element contentDbElement, boolean enabled, java.util.List indexItemRules)
contentDbElement
- enabled
- indexItemRules
- - list of de.innovationgate.wga.common.beans.LuceneIndexItemRulepublic static org.dom4j.Element createLuceneConfig(org.dom4j.Element contentDbElement, LuceneConfiguration config)
contentDbElement
- config
- public static org.dom4j.Element createClientRestrictions(org.dom4j.Element contentDbElement, boolean enabled, java.util.List restrictions)
contentDbElement
- enabled
- restrictions
- - list of de.innovationgate.utils.net.IPv4Restrictionpublic static org.dom4j.Element createDefaultFileHandlerMappings(org.dom4j.Element fileHandlerMappingElement)
fileHandlerMappingElement
- public static void pullupDesignProviders(org.dom4j.Document doc)
doc
- The wga.xml documentpublic static void normalize(org.dom4j.Document doc)
doc
- The wga.xmlpublic static org.dom4j.Element addOrReplaceOption(org.dom4j.Element parent, java.lang.String name, java.lang.String value)
parent
- The parent element for optionsname
- The name of the optionvalue
- The value of the optionpublic static boolean removeOption(org.dom4j.Element parent, java.lang.String name)
parent
- The parent element for optionsname
- The name of the option