Package org.wildfly.naming.client.util
Class EnvironmentUtils
- java.lang.Object
-
- org.wildfly.naming.client.util.EnvironmentUtils
-
public final class EnvironmentUtils extends Object
Various utilities dealing with environment properties.- Author:
- David M. Lloyd
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONNECT_OPTIONSstatic StringEJB_CALLBACK_HANDLER_CLASS_KEYstatic StringEJB_HOST_KEYstatic StringEJB_PASSWORD_BASE64_KEYstatic StringEJB_PASSWORD_KEYstatic StringEJB_PORT_KEYstatic StringEJB_REMOTE_CONNECTION_PREFIXstatic StringEJB_REMOTE_CONNECTION_PROVIDER_PREFIXstatic StringEJB_REMOTE_CONNECTIONSstatic StringEJB_USERNAME_KEY
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringcompileURLPackagePrefixes(Collection<String> prefixes)Compile the given collection of URL package prefixes into a string.static org.wildfly.security.auth.server.IdentityCredentialsgetSecurityCredentials(Map<String,?> env)Get the security credential, if any.static org.wildfly.security.auth.server.IdentityCredentialsgetSecurityCredentials(Map<String,?> env, String propertyName)Get the security credential, if any.static StringgetSecurityRealmName(Map<String,?> env)Get the name of the security realm, if any.static List<String>getURLPackagePrefixes(Map<String,?> env)Get the URL package prefixes defined in the given property name.static List<String>getURLPackagePrefixes(Map<String,?> env, String propertyName)Get the URL package prefixes defined in the given property name.
-
-
-
Field Detail
-
EJB_REMOTE_CONNECTIONS
public static final String EJB_REMOTE_CONNECTIONS
- See Also:
- Constant Field Values
-
EJB_REMOTE_CONNECTION_PREFIX
public static final String EJB_REMOTE_CONNECTION_PREFIX
- See Also:
- Constant Field Values
-
EJB_REMOTE_CONNECTION_PROVIDER_PREFIX
public static final String EJB_REMOTE_CONNECTION_PROVIDER_PREFIX
- See Also:
- Constant Field Values
-
CONNECT_OPTIONS
public static final String CONNECT_OPTIONS
- See Also:
- Constant Field Values
-
EJB_HOST_KEY
public static final String EJB_HOST_KEY
- See Also:
- Constant Field Values
-
EJB_PORT_KEY
public static final String EJB_PORT_KEY
- See Also:
- Constant Field Values
-
EJB_CALLBACK_HANDLER_CLASS_KEY
public static final String EJB_CALLBACK_HANDLER_CLASS_KEY
- See Also:
- Constant Field Values
-
EJB_USERNAME_KEY
public static final String EJB_USERNAME_KEY
- See Also:
- Constant Field Values
-
EJB_PASSWORD_KEY
public static final String EJB_PASSWORD_KEY
- See Also:
- Constant Field Values
-
EJB_PASSWORD_BASE64_KEY
public static final String EJB_PASSWORD_BASE64_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSecurityCredentials
public static org.wildfly.security.auth.server.IdentityCredentials getSecurityCredentials(Map<String,?> env)
Get the security credential, if any. If an entry is present but not recognized, an empty credential set is returned.- Parameters:
env- the environment (must not benull)- Returns:
- the security credentials, or
nullif none was present
-
getSecurityCredentials
public static org.wildfly.security.auth.server.IdentityCredentials getSecurityCredentials(Map<String,?> env, String propertyName)
Get the security credential, if any. If an entry is present but not recognized, an empty credential set is returned.- Parameters:
env- the environment (must not benull)propertyName- the property name (must not benull)- Returns:
- the security credentials, or
nullif none was present
-
getSecurityRealmName
public static String getSecurityRealmName(Map<String,?> env)
Get the name of the security realm, if any.- Returns:
- the name of the security realm, or
nullif there is none or it is in an unrecognized format
-
getURLPackagePrefixes
public static List<String> getURLPackagePrefixes(Map<String,?> env)
Get the URL package prefixes defined in the given property name. If no URL package prefixes are defined in the given property name, then the default list is returned. The returned list is mutable.- Parameters:
env- the environment (must not benull)- Returns:
- the list of package prefixes
-
getURLPackagePrefixes
public static List<String> getURLPackagePrefixes(Map<String,?> env, String propertyName)
Get the URL package prefixes defined in the given property name. If no URL package prefixes are defined in the given property name, then the default list is returned. The returned list is mutable.- Parameters:
env- the environment (must not benull)propertyName- the property name to search (must not benull)- Returns:
- the list of package prefixes
-
compileURLPackagePrefixes
public static String compileURLPackagePrefixes(Collection<String> prefixes)
Compile the given collection of URL package prefixes into a string.- Parameters:
prefixes- the package prefixes (must not benull)- Returns:
- the string, or
nullif there are no package prefixes (i.e. the corresponding property can be removed)
-
-