src/web/js/acsimpleconfig.js
/**
 * This method fills the models based on the configuration XML which is currently available.
 *
 * @param nConfigNode The current configuration node.
 */
This method fills the models based on the configuration XML which is currently available.

@param nConfigNode The current configuration node.
This method fills the models based on the configuration XML which is currently available . @param nConfigNode The current configuration node .
function fillInPropertyScreen(nConfigNode)
{
	if (DEBUG_USERS.indexOf(system.getUser().name) > -1)
	{
		debugger;
	}
	var xmlDoc = createXMLDocument(nConfigNode.xml, NAMESPACE_PREFIXES);
	var nRoot = xmlDoc.documentElement;
    var nNode = nRoot.selectSingleNode("//ns:configuration");
    if (nNode == null)
    {
    	nNode = xmlBaseObject.documentElement;
    }
    nNode = createSimpleXMLDocument(nNode.xml).documentElement;
    decodePasswords(nNode, "//emailbox/password");
    decodePasswords(nNode, "//keymanager/password");
    decodePasswords(nNode, "//smtpserver/password");
    decodePasswords(nNode, "//parameters/parameter[@name='password']");
    decodePasswords(nNode, "//certificate/password");
    var nEmailBoxes = nNode.selectSingleNode("./inbound/emailboxes");
    setFormattedXML(nEmailBoxes, taEmailBoxes);
    var nSMTPServers = nNode.selectSingleNode("./outbound/smtpservers");
    setFormattedXML(nSMTPServers, taSMTPServers);
    var nKeyManagers = nNode.selectSingleNode("./outbound/keymanagers");
    setFormattedXML(nKeyManagers, taKeyManagers);
    mdlConfiguration.putData(nNode);
    mdlConfiguration.refreshAllViews();
    var nStorageProvider = nRoot.selectSingleNode("//ns:configuration/ns:general/ns:storage/ns:class");
    if (nStorageProvider != null)
    {
    	var sClass = nStorageProvider.text;
    	if (sClass != "com.cordys.coe.ac.emailio.storage.DBStorageProvider" &&
    		sClass != "com.cordys.coe.ac.emailio.storage.FileStorageProvider" &&
    		sClass != "com.cordys.coe.ac.emailio.storage.DefaultMemoryStore")
    	{
    		txtSPCustomClass.setValue(sClass);
    		sClass = ""; 
    	}
    	cbStorageProvider.setValue(sClass);
    	var nParameters = nRoot.selectSingleNode("//ns:configuration/ns:general/ns:storage/ns:parameters");
    	var anNodes = nParameters.selectNodes(".//ns:component/ns:password");
    	for (var iCount = 0; iCount < anNodes.length; iCount++)
    	{
    		anNodes[iCount].text = libPassword.decode(anNodes[iCount].text);
    	}
    	fillStorageProviderConfig(sClass, nParameters);
    }
    handleStorageProviderChange(null);
}
function fillInPropertyScreen ( nConfigNode ) { if ( DEBUG_USERS . indexOf ( system . getUser ( ) . name ) > - 1 ) { debugger ; } var xmlDoc = createXMLDocument ( nConfigNode . xml , NAMESPACE_PREFIXES ) ; var nRoot = xmlDoc . documentElement ; var nNode = nRoot . selectSingleNode ( "//ns:configuration" ) ; if ( nNode == null ) { nNode = xmlBaseObject . documentElement ; } nNode = createSimpleXMLDocument ( nNode . xml ) . documentElement ; decodePasswords ( nNode , "//emailbox/password" ) ; decodePasswords ( nNode , "//keymanager/password" ) ; decodePasswords ( nNode , "//smtpserver/password" ) ; decodePasswords ( nNode , "//parameters/parameter[@name='password']" ) ; decodePasswords ( nNode , "//certificate/password" ) ; var nEmailBoxes = nNode . selectSingleNode ( "./inbound/emailboxes" ) ; setFormattedXML ( nEmailBoxes , taEmailBoxes ) ; var nSMTPServers = nNode . selectSingleNode ( "./outbound/smtpservers" ) ; setFormattedXML ( nSMTPServers , taSMTPServers ) ; var nKeyManagers = nNode . selectSingleNode ( "./outbound/keymanagers" ) ; setFormattedXML ( nKeyManagers , taKeyManagers ) ; mdlConfiguration . putData ( nNode ) ; mdlConfiguration . refreshAllViews ( ) ; var nStorageProvider = nRoot . selectSingleNode ( "//ns:configuration/ns:general/ns:storage/ns:class" ) ; if ( nStorageProvider != null ) { var sClass = nStorageProvider . text ; if ( sClass != "com.cordys.coe.ac.emailio.storage.DBStorageProvider" && sClass != "com.cordys.coe.ac.emailio.storage.FileStorageProvider" && sClass != "com.cordys.coe.ac.emailio.storage.DefaultMemoryStore" ) { txtSPCustomClass . setValue ( sClass ) ; sClass = "" ; } cbStorageProvider . setValue ( sClass ) ; var nParameters = nRoot . selectSingleNode ( "//ns:configuration/ns:general/ns:storage/ns:parameters" ) ; var anNodes = nParameters . selectNodes ( ".//ns:component/ns:password" ) ; for ( var iCount = 0 ; iCount < anNodes . length ; iCount ++ ) { anNodes [ iCount ] . text = libPassword . decode ( anNodes [ iCount ] . text ) ; } fillStorageProviderConfig ( sClass , nParameters ) ; } handleStorageProviderChange ( null ) ; }
This method fills the models based on the configuration XML which is currently available.
This method fills the models based on the configuration XML which is currently available .
//Create a XPath version of the document.
 //No configuration found, use the empty template.
 //Decode all passwords
 //Set the email boxes XML.
 //Set the SMTP servers
 //Set the key managers
 //Set the properly selected storage provider
 //Custom class
 //Now we need to fill the proper panel with the proper data
 //Decode the password
