CustomTokenClient tokenClient = new CustomTokenClient(_domainConfig);
Map<String, String> generatedTokens = tokenClient.getSubstitutableTokens();
// Perform string substitution.
if (_domainTempalte.hasStringsubs()) {
StringSubstitutor substitutor = _domainTempalte.getStringSubs();
Map<String, String> lookUpMap = SubstitutableTokens.getSubstitutableTokens(_domainConfig);
lookUpMap.putAll(generatedTokens);
substitutor.setAttributePreprocessor(new AttributePreprocessorImpl(lookUpMap));
substitutor.substituteAll();
}
// Change the permission for bin & config directories.
try {
File binDir = new File(domainDir, DomainConstants.BIN_DIR);