updateLibraryLoader();
info.setEnfordedLibraryUpdate(true);
}
// If no cxconfig.xml we are finished here
CSConfig csConfig = info.getCsConfig();
if (csConfig == null) {
return;
}
// WGA wide configurations, that can be bypassed if the system file container is from a provider DB
// (because they already were enforced by the provider db)
if (!info.isFromProviderDB()) {
// Add encoder mappings
Iterator encoderMappings = csConfig.getEncoderMappings().iterator();
while (encoderMappings.hasNext()) {
EncoderMapping mapping = (EncoderMapping) encoderMappings.next();
getLog().info("Adding WebTML encoder '" + mapping.getName() + "'");
if (addEncoderMapping(mapping.getName(), mapping.getImplementationClass(), false)) {
info.getEnforcedEncoderMappings().add(mapping.getName());
}
}
// Add element mappings
Iterator elementMappings = csConfig.getElementMappings().iterator();
while (elementMappings.hasNext()) {
ElementMapping mapping = (ElementMapping) elementMappings.next();
getLog().info("Adding WebTML element '" + mapping.getName() + "'");
if (addElementMapping(mapping.getName(), mapping.getImplementationClass(), false)) {
info.getEnforcedElementMappings().add(mapping.getName());
}
}
// Add media keys
Iterator mediaKeys = csConfig.getMediaKeys().iterator();
while (mediaKeys.hasNext()) {
de.innovationgate.wga.common.beans.csconfig.v1.MediaKey mediaKey = (de.innovationgate.wga.common.beans.csconfig.v1.MediaKey) mediaKeys.next();
getLog().info("Adding WebTML media key '" + mediaKey.getKey() + "' for MIME type '" + mediaKey.getMimeType() + "'");
addMediaMapping(mediaKey, false);
info.getEnforcedMediaMappings().add(mediaKey.getKey());
}
if (csConfig instanceof de.innovationgate.wga.common.beans.csconfig.v2.CSConfig) {
// Add TMLScript global shortcuts
de.innovationgate.wga.common.beans.csconfig.v2.CSConfig v2 = (de.innovationgate.wga.common.beans.csconfig.v2.CSConfig) csConfig;
Iterator shortcuts = v2.getShortcuts().iterator();
while (shortcuts.hasNext()) {
Shortcut shortcut = (Shortcut) shortcuts.next();
if (shortcut.getType() == Shortcut.TYPE_TMLSCRIPT_GLOBAL) {
getTmlscriptGlobalRegistry().registerGlobal(new TMLScriptGlobal(shortcut.getShortcut(), TMLScriptGlobal.TYPE_PACKAGE_OR_CLASS, shortcut.getReference()));
}
}
}
}
// Set WGA version compliance if not explicitly set via first level db option
Set firstLevelOptions = (Set) db.getAttribute(DBATTRIB_FIRSTLEVELDBOPTIONS);
if (!firstLevelOptions.contains(WGDatabase.COPTION_NOITEMBEHAVIOUR)) {
db.getNoItemBehaviour().compliantTo(csConfig.getVersionCompliance());
}
// Add jobs
Iterator jobs = csConfig.getJobDefinitions().iterator();
while (jobs.hasNext()) {
JobDefinition job = (JobDefinition) jobs.next();
String jobName = db.getDbReference() + "." + job.getName();
try {
Task task = null;