Skip to content

Commit

Permalink
Make some methods public, add simple init for logger and props (#439)
Browse files Browse the repository at this point in the history
  • Loading branch information
evie-lau authored Feb 8, 2024
1 parent da1f1f5 commit 30aa98e
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ public ServerConfigDocument(CommonLoggerI log, File serverXML, File configDir, F
initializeAppsLocation(log, serverXML, configDir, bootstrapFile, bootstrapProp, serverEnvFile, giveConfigDirPrecedence, libertyDirPropertyFiles);
}

public ServerConfigDocument(CommonLoggerI log) {
this.log = log;
props = new Properties();
defaultProps = new Properties();
}

private DocumentBuilder getDocumentBuilder() {
DocumentBuilder docBuilder;

Expand Down Expand Up @@ -482,7 +488,7 @@ private void parseDocumentsInDirectory(File directory, ArrayList<Document> docs)
* @throws IOException
* @throws SAXException
*/
private Document parseDocument(File file) throws FileNotFoundException, IOException {
public Document parseDocument(File file) throws FileNotFoundException, IOException {
try (FileInputStream is = new FileInputStream(file)) {
return parseDocument(is);
} catch (SAXException ex) {
Expand Down Expand Up @@ -537,7 +543,7 @@ private void parseVariablesForValues(Document doc) throws XPathExpressionExcepti
parseVariables(doc, false, true, false);
}

private void parseVariablesForBothValues(Document doc) throws XPathExpressionException {
public void parseVariablesForBothValues(Document doc) throws XPathExpressionException {
parseVariables(doc, false, false, true);
}

Expand Down Expand Up @@ -575,7 +581,7 @@ private String getValue(NamedNodeMap attr, String nodeName) {
return value;
}

private void parseIncludeVariables(Document doc) throws XPathExpressionException, IOException, SAXException {
public void parseIncludeVariables(Document doc) throws XPathExpressionException, IOException, SAXException {
// parse include document in source server xml
NodeList nodeList = (NodeList) XPATH_SERVER_INCLUDE.evaluate(doc, XPathConstants.NODESET);

Expand Down

0 comments on commit 30aa98e

Please sign in to comment.