Methods Summary |
---|
public void | transform()
logger.log(Level.INFO, stringManager.getString("upgrade.configTransfers.initconf.startMessage"));
String fileName = commonInfo.getSourceInitConfFileName();
BufferedReader reader = null;
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
//factory.setValidating(true);
factory.setNamespaceAware(true);
try {
DocumentBuilder builderDomainXml = factory.newDocumentBuilder();
builderDomainXml.setEntityResolver((org.xml.sax.helpers.DefaultHandler)Class.forName
("com.sun.enterprise.config.serverbeans.ServerValidationHandler").newInstance());
Document resultDoc = builderDomainXml.parse( new File(commonInfo.getTargetConfigXMLFile()) );
reader = new BufferedReader(new FileReader(fileName));
while (reader.ready()) {
String line = reader.readLine();
String key = null;
String value = null;
StringTokenizer st = new StringTokenizer(line, " ", false);
if ( st.hasMoreTokens() ) {
key = st.nextToken();
} else {
continue;
}
if ( st.hasMoreTokens() ) {
value = st.nextToken();
} else {
continue;
}
try {
Method m = getClass().getMethod("transform" + key, new Class [] { Document.class, String.class });
m.invoke(this, new Object [] { resultDoc, value } );
} catch (NoSuchMethodException nsm) {
logger.log(Level.WARNING, stringManager.getString("upgrade.configTransfers.initconf.unsupportedElement") + key);
} catch (Exception e) {
logger.log(Level.WARNING, stringManager.getString("upgrade.configTransfers.initconf.exception") + e.getLocalizedMessage());
}
}
// write out the resultDoc to destination file.
// Use a Transformer for output
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer();
if (resultDoc.getDoctype() != null){
String systemValue = resultDoc.getDoctype().getSystemId();
transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, systemValue);
String pubValue = resultDoc.getDoctype().getPublicId();
transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, pubValue);
}
DOMSource source = new DOMSource(resultDoc);
StreamResult result = new StreamResult(new FileOutputStream(commonInfo.getTargetConfigXMLFile()));
transformer.transform(source, result);
} catch (IOException ioe) {
logger.log(Level.WARNING, stringManager.getString("upgrade.configTransfers.initconf.iofailure") + ioe.getLocalizedMessage());
} catch (Exception e) {
logger.log(Level.WARNING, stringManager.getString("upgrade.configTransfers.initconf.exception") + e.getLocalizedMessage());
}
if (reader != null) {
try {
reader.close();
} catch (Exception e) {
logger.log(Level.WARNING, stringManager.getString("upgrade.configTransfers.initconf.iofailure") + e.getLocalizedMessage());
}
}
|
public void | transformAsyncDNS(org.w3c.dom.Document domainXML, java.lang.String value)
//TO DO - don't know what this translates to?
|
public void | transformConnQueueSize(org.w3c.dom.Document domainXML, java.lang.String value)
//http-service/connection-pool:queue-size-bytes
logger.finest("ConnQueueSize = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList subList = httpServiceElement.getElementsByTagName("connection-pool");
// There can be only one connection-pool element.
Element element = (Element)subList.item(0);
//If the element exists in the target, do the transformation
if (element != null) {
//Fix for CR 6461070
element.setAttribute("queue-size-in-bytes", value);
//element.setAttribute("queue-size-bytes", value);
//End - 6461070
}
}
}
|
public void | transformDNS(org.w3c.dom.Document domainXML, java.lang.String value)
logger.finest("DNS = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList httpList = httpServiceElement.getElementsByTagName("http-protocol");
// There should be only one http-protocol element.
Element element = (Element)httpList.item(0);
//If the element exists in the target, do the transformation
if (element != null) {
if (value.equalsIgnoreCase("off")) {
element.setAttribute("dns-lookup-enabled", "false");
} else {
element.setAttribute("dns-lookup-enabled", "true");
}
}
}
}
|
public void | transformErrorLogDateFormat(org.w3c.dom.Document domainXML, java.lang.String value)
|
public void | transformExtraPath(org.w3c.dom.Document domainXML, java.lang.String value)
|
public void | transformHTTPVersion(org.w3c.dom.Document domainXML, java.lang.String value)
//http-service/http-protocol:http-version
logger.finest("HTTPVersion = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList httpList = httpServiceElement.getElementsByTagName("http-protocol");
// There should be only one http-protocol element.
Element element = (Element)httpList.item(0);
//If the element exists in the target, do the transformation
if (element != null) {
element.setAttribute("http-version", value);
}
}
}
|
public void | transformHeaderBufferSize(org.w3c.dom.Document domainXML, java.lang.String value)
//http-service/request-processing:header-buffer-size-bytes
logger.finest("HeaderBufferSize = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList subList = httpServiceElement.getElementsByTagName("request-processing");
// There can be only one request-processing element.
Element element = (Element)subList.item(0);
//If the element exists in the target, do the transformation
if (element != null) {
element.setAttribute("header-buffer-size-bytes", value);
}
}
}
|
public void | transformIOTimeout(org.w3c.dom.Document domainXML, java.lang.String value)
//http-service/request-processing:request-timeout-in-seconds
logger.finest("IOTimeout = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element.
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList subList = httpServiceElement.getElementsByTagName("request-processing");
// There can be only one request-processing element.
Element element = (Element)subList.item(0);
//If the element exists in the target, do the transformation
if (element != null) {
element.setAttribute("request-timeout-in-seconds", value);
}
}
}
|
public void | transformInit(org.w3c.dom.Document domainXML, java.lang.String value)
//NSAPI no longer supported
|
public void | transformKeepAliveThreads(org.w3c.dom.Document domainXML, java.lang.String value)
//http-service/keep-alive:keep-alive-thread-count
logger.finest("KeepAliveThreads = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList subList = httpServiceElement.getElementsByTagName("keep-alive");
// There can be only one request-processing element.
Element element = (Element)subList.item(0);
//If the element exists in the target, do the transformation
if (element != null) {
element.setAttribute("keep-alive-thread-count", value);
}
}
}
|
public void | transformKeepAliveTimeout(org.w3c.dom.Document domainXML, java.lang.String value)
//http-service/keep-alive:timeout-in-seconds
logger.finest("KeepAliveTimeout = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList subList = httpServiceElement.getElementsByTagName("keep-alive");
// There can be only one request-processing element.
Element element = (Element)subList.item(0);
//If the element exists in the target, do the transformation
if (element != null) {
element.setAttribute("timeout-in-seconds", value);
}
}
}
|
public void | transformKernelThreads(org.w3c.dom.Document domainXML, java.lang.String value)
//unsupported
|
public void | transformListenQ(org.w3c.dom.Document domainXML, java.lang.String value)
//http-service/connection-pool:max-pending-count
logger.finest("ListenQ = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList subList = httpServiceElement.getElementsByTagName("connection-pool");
// There can be only one connection-pool element.
Element element = (Element)subList.item(0);
//If the element exists in the target, do the transformation
if (element != null) {
element.setAttribute("max-pending-count", value);
}
}
}
|
public void | transformLogFlushInterval(org.w3c.dom.Document domainXML, java.lang.String value)
|
public void | transformMaxKeepAliveConnections(org.w3c.dom.Document domainXML, java.lang.String value)
//http-service/keep-alive:timeout-in-seconds
logger.finest("MaxKeepAliveConnections = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList subList = httpServiceElement.getElementsByTagName("keep-alive");
// There can be only one request-processing element.
Element element = (Element)subList.item(0);
//If the element exists in the target, do the transformation
if (element != null) {
element.setAttribute("max-keep-alive-connections", value);
}
}
}
|
public void | transformNativePoolMaxThreads(org.w3c.dom.Document domainXML, java.lang.String value)
|
public void | transformNativePoolMinThreads(org.w3c.dom.Document domainXML, java.lang.String value)
|
public void | transformNativePoolQueueSize(org.w3c.dom.Document domainXML, java.lang.String value)
|
public void | transformNativePoolStackSize(org.w3c.dom.Document domainXML, java.lang.String value)
|
public void | transformNetsiteRoot(org.w3c.dom.Document domainXML, java.lang.String value)
|
public void | transformPidLog(org.w3c.dom.Document domainXML, java.lang.String value)
|
public void | transformRcvBufSize(org.w3c.dom.Document domainXML, java.lang.String value)
//http-service/connection-pool:receive-buffer-size-bytes
logger.finest("RcvBufSize = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList subList = httpServiceElement.getElementsByTagName("connection-pool");
// There can be only one connection-pool element.
Element element = (Element)subList.item(0);
//If the element exists in the target, do the transformation
if (element != null) {
element.setAttribute("receive-buffer-size-bytes", value);
}
}
}
|
public void | transformRqThrottle(org.w3c.dom.Document domainXML, java.lang.String value)
//http-service/request-processing:thread-count
logger.finest("RqThrottle = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList subList = httpServiceElement.getElementsByTagName("request-processing");
// There can be only one request-processing element.
Element element = (Element)subList.item(0);
//If the element exists in the target, do the transformation
if (element != null) {
element.setAttribute("thread-count", value);
}
}
}
|
public void | transformRqThrottleMin(org.w3c.dom.Document domainXML, java.lang.String value)
//http-service/request-processing:initial-thread-count
logger.finest("RqThrottleMin = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList subList = httpServiceElement.getElementsByTagName("request-processing");
// There can be only one request-processing element.
Element element = (Element)subList.item(0);
//If the element exists in the target, do the transformation
if (element != null) {
element.setAttribute("initial-thread-count", value);
}
}
}
|
public void | transformSSL3SessionTimeout(org.w3c.dom.Document domainXML, java.lang.String value)
//http-service
//property "ssl3-session-timeout"
//specified as a name value pair in the property element under http-service.
String name = "ssl3-session-timeout";
logger.finest("SSL3SessionTimeout = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList resultProperties = httpServiceElement.getElementsByTagName("property");
Element resultProperty = null;
if(resultProperties != null){
for(int index=0; index < resultProperties.getLength(); index++){
if(((Element)resultProperties.item(index)).getAttribute("name").equals(name)){
resultProperty = (Element)resultProperties.item(index);
resultProperty.getAttributeNode("value").setValue(value);
//this.handleSpecialCases(element, resultProperty, parentSource, parentResult);
break;
}
}
}
if(resultProperty == null){
resultProperty = httpServiceElement.getOwnerDocument().createElement("property");
resultProperty.setAttribute("name", name);
resultProperty.setAttribute("value", value);
httpServiceElement.appendChild(resultProperty);
}
}
}
|
public void | transformSSLCacheEntries(org.w3c.dom.Document domainXML, java.lang.String value)
//http-service
//property "ssl-cache-entries"
//specified as a name value pair in the property element under http-service.
String name = "ssl-cache-entries";
logger.finest("SSLCacheEntries = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList resultProperties = httpServiceElement.getElementsByTagName("property");
Element resultProperty = null;
if(resultProperties != null){
for(int index=0; index < resultProperties.getLength(); index++){
if(((Element)resultProperties.item(index)).getAttribute("name").equals(name)){
resultProperty = (Element)resultProperties.item(index);
resultProperty.getAttributeNode("value").setValue(value);
//this.handleSpecialCases(element, resultProperty, parentSource, parentResult);
break;
}
}
}
if(resultProperty == null){
resultProperty = httpServiceElement.getOwnerDocument().createElement("property");
resultProperty.setAttribute("name", name);
resultProperty.setAttribute("value", value);
httpServiceElement.appendChild(resultProperty);
}
}
}
|
public void | transformSSLClientAuthDataLimit(org.w3c.dom.Document domainXML, java.lang.String value)
//http-service
//property "ssl-client-auth-data-limit"
//specified as a name value pair in the property element under http-service.
String name = "ssl-client-auth-data-limit";
logger.finest("SSLClientAuthDataLimit = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList resultProperties = httpServiceElement.getElementsByTagName("property");
Element resultProperty = null;
if(resultProperties != null){
for(int index=0; index < resultProperties.getLength(); index++){
if(((Element)resultProperties.item(index)).getAttribute("name").equals(name)){
resultProperty = (Element)resultProperties.item(index);
resultProperty.getAttributeNode("value").setValue(value);
//this.handleSpecialCases(element, resultProperty, parentSource, parentResult);
break;
}
}
}
if(resultProperty == null){
resultProperty = httpServiceElement.getOwnerDocument().createElement("property");
resultProperty.setAttribute("name", name);
resultProperty.setAttribute("value", value);
httpServiceElement.appendChild(resultProperty);
}
}
}
|
public void | transformSSLClientAuthTimeout(org.w3c.dom.Document domainXML, java.lang.String value)
//http-service
//property "ssl-client-auth-timeout"
//specified as a name value pair in the property element under http-service.
String name = "ssl-client-auth-timeout";
logger.finest("SSLClientAuthTimeout = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList resultProperties = httpServiceElement.getElementsByTagName("property");
Element resultProperty = null;
if(resultProperties != null){
for(int index=0; index < resultProperties.getLength(); index++){
if(((Element)resultProperties.item(index)).getAttribute("name").equals(name)){
resultProperty = (Element)resultProperties.item(index);
resultProperty.getAttributeNode("value").setValue(value);
//this.handleSpecialCases(element, resultProperty, parentSource, parentResult);
break;
}
}
}
if(resultProperty == null){
resultProperty = httpServiceElement.getOwnerDocument().createElement("property");
resultProperty.setAttribute("name", name);
resultProperty.setAttribute("value", value);
httpServiceElement.appendChild(resultProperty);
}
}
}
|
public void | transformSSLSessionTimeout(org.w3c.dom.Document domainXML, java.lang.String value)
//http-service
//property "ssl-session-timeout"
//specified as a name value pair in the property element under http-service.
String name = "ssl-session-timeout";
logger.finest("SSLSessionTimeout = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList resultProperties = httpServiceElement.getElementsByTagName("property");
Element resultProperty = null;
if(resultProperties != null){
for(int index=0; index < resultProperties.getLength(); index++){
if(((Element)resultProperties.item(index)).getAttribute("name").equals(name)){
resultProperty = (Element)resultProperties.item(index);
resultProperty.getAttributeNode("value").setValue(value);
//this.handleSpecialCases(element, resultProperty, parentSource, parentResult);
break;
}
}
}
if(resultProperty == null){
resultProperty = httpServiceElement.getOwnerDocument().createElement("property");
resultProperty.setAttribute("name", name);
resultProperty.setAttribute("value", value);
httpServiceElement.appendChild(resultProperty);
}
}
}
|
public void | transformSecurity(org.w3c.dom.Document domainXML, java.lang.String value)
//http-service/http-protocol:ssl-enabled
logger.finest("Security = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList httpList = httpServiceElement.getElementsByTagName("http-protocol");
// There should be only one http-protocol element.
Element element = (Element)httpList.item(0);
//If the element exists in the target, do the transformation
if (element != null) {
if (value.equalsIgnoreCase("off")) {
element.setAttribute("ssl-enabled", "false");
} else {
element.setAttribute("ssl-enabled", "true");
}
}
}
}
|
public void | transformServerID(org.w3c.dom.Document domainXML, java.lang.String value)
|
public void | transformServerName(org.w3c.dom.Document domainXML, java.lang.String value)
|
public void | transformSndBufSize(org.w3c.dom.Document domainXML, java.lang.String value)
//http-service/connection-pool:send-buffer-size-bytes
logger.finest("SndBufSize = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList subList = httpServiceElement.getElementsByTagName("connection-pool");
// There can be only one connection-pool element.
Element element = (Element)subList.item(0);
//If the element exists in the target, do the transformation
if (element != null) {
element.setAttribute("send-buffer-size-bytes", value);
}
}
}
|
public void | transformStackSize(org.w3c.dom.Document domainXML, java.lang.String value)
//http-service
//property "stack-size"
//specified as a name value pair in the property element under http-service.
String name = "stack-size";
logger.finest("StackSize = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList resultProperties = httpServiceElement.getElementsByTagName("property");
Element resultProperty = null;
if(resultProperties != null){
for(int index=0; index < resultProperties.getLength(); index++){
if(((Element)resultProperties.item(index)).getAttribute("name").equals(name)){
resultProperty = (Element)resultProperties.item(index);
resultProperty.getAttributeNode("value").setValue(value);
//this.handleSpecialCases(element, resultProperty, parentSource, parentResult);
break;
}
}
}
if(resultProperty == null){
resultProperty = httpServiceElement.getOwnerDocument().createElement("property");
resultProperty.setAttribute("name", name);
resultProperty.setAttribute("value", value);
httpServiceElement.appendChild(resultProperty);
}
}
}
|
public void | transformStrictHttpHeaders(org.w3c.dom.Document domainXML, java.lang.String value)
//not exposed in domain.xml
|
public void | transformTempDir(org.w3c.dom.Document domainXML, java.lang.String value)
//not supported
|
public void | transformTerminateTimeout(org.w3c.dom.Document domainXML, java.lang.String value)
//not supported
|
public void | transformThreadIncrement(org.w3c.dom.Document domainXML, java.lang.String value)
//http-service/request-processing:thread-increment
logger.finest("ThreadIncrement = " + value);
Element docEle = domainXML.getDocumentElement();
NodeList nodeList = docEle.getElementsByTagName("config");
for (int i=0; i < nodeList.getLength(); i++) {
Element configElement = (Element)nodeList.item(i);
String attrValue = configElement.getAttribute("name");
if (attrValue.equals(commonInfo.getCurrentSourceInstance() + "-config")) {
NodeList httpServiceNodes = configElement.getElementsByTagName("http-service");
//there is only one http-service element
Element httpServiceElement = (Element)httpServiceNodes.item(0);
NodeList subList = httpServiceElement.getElementsByTagName("request-processing");
// There can be only one request-processing element.
Element element = (Element)subList.item(0);
//If the element exists in the target, do the transformation
if (element != null) {
element.setAttribute("thread-increment", value);
}
}
}
|
public void | transformUser(org.w3c.dom.Document domainXML, java.lang.String value)
//not supported
|