public class RelativePathResolver extends Object
| Constructor and Description |
|---|
RelativePathResolver() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
fatalError(String message,
String path)
You would like to think that we could just log and continue (without throwing
a RuntimeException; however, unfortunately anything logged by the logger in the
launcher (PELaucnhFilter) does not appear in server.log, so for now, this
will be considered a fatal error.
|
static String |
getAlias(String propName)
check if a given property name matches AS alias pattern ${ALIAS=aliasname}.
|
protected String |
getPropertyValue(String propName,
boolean bIncludingEnvironmentVariables)
Resolves the given property by returning its value as either
1) a system property of the form ${system-property-name}
2) a password alias property of the form ${ALIAS=aliasname}.
|
static String |
getRealPasswordFromAlias(String at)
Returns the actual password from the domain-wide safe password store,
if the given password is aliased.
|
boolean |
isResolvable(String path,
boolean bIncludingEnvironmentVariables)
checks if string does not consist of unresolvable values
|
static void |
main(String[] args) |
String |
resolve(String path) |
String |
resolve(String path,
boolean bIncludingEnvironmentVariables)
Replace any system properties of the form ${property} in the given path.
|
static String |
resolvePath(String path) |
String |
unresolve(String path,
String[] propNames)
unresolvePath will replace the first occurrence of the value of the given
system properties with ${propName} in the given path
|
static String |
unresolvePath(String path,
String[] propNames) |
public String unresolve(String path, String[] propNames)
protected void fatalError(String message, String path)
public static String getAlias(String propName)
propName - The property name to resolve. ex. ${ALIAS=aliasname}.protected String getPropertyValue(String propName, boolean bIncludingEnvironmentVariables)
propName - The property name to resolvepublic String resolve(String path, boolean bIncludingEnvironmentVariables)
public boolean isResolvable(String path, boolean bIncludingEnvironmentVariables)
public static void main(String[] args)
public static String getRealPasswordFromAlias(String at) throws KeyStoreException, CertificateException, IOException, NoSuchAlgorithmException, UnrecoverableKeyException
at - is the aliased token of the form "${ALIAS=string}"IllegalArgumentException - if the alias is not definedKeyStoreException - CertificateException IOException NoSuchAlgorithmException
UnrecoverableKeyException if there is an error is opening or
processing the password storeCertificateExceptionIOExceptionNoSuchAlgorithmExceptionUnrecoverableKeyExceptionCopyright © 2018 Eclipse Foundation. All rights reserved.