Class ConfigBeansUtilities
- java.lang.Object
-
- com.sun.enterprise.config.serverbeans.ConfigBeansUtilities
-
@Service @Singleton public final class ConfigBeansUtilities extends Object
Bunch of utility methods for the new serverbeans config api based on jaxb
-
-
Constructor Summary
Constructors Constructor Description ConfigBeansUtilities(Applications paramApps, Domain paramDomain)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Application>
getAllDefinedSystemApplications()
ApplicationRef
getApplicationRefInServer(String sn, String name)
List<ApplicationRef>
getApplicationRefsInServer(String sn)
Lists the app refs for non-system apps assigned to the specified serverList<ApplicationRef>
getApplicationRefsInServer(String sn, boolean excludeSystemApps)
Lists the app refs for apps assigned to the specified server, excluding system apps from the result if requested.String
getContextRoot(String moduleID)
static String
getDefaultCondition()
static String
getDefaultFormat()
Get the default value of Format from dtdstatic String
getDefaultQueueSizeInBytes()
Get the default value of QueueSizeInBytes from dtdstatic String
getDefaultRotationEnabled()
Get the default value of RotationEnabled from dtdstatic String
getDefaultRotationIntervalInMinutes()
Get the default value of RotationIntervalInMinutes from dtdstatic String
getDefaultRotationOnDateChange()
Get the default value of RotationOnDateChange from dtdstatic String
getDefaultRotationPolicy()
Get the default value of RotationPolicy from dtdString
getDirectoryDeployed(String moduleID)
Domain
getDomain()
String
getEnabled(String sn, String moduleID)
String
getLibraries(String moduleID)
String
getLocation(String moduleID)
ApplicationName
getModule(String moduleID)
Server
getServerNamed(String name)
List<Server>
getServers()
Application
getSystemApplicationReferencedFrom(String sn, String appName)
List<Application>
getSystemApplicationsReferencedFrom(String sn)
Returns the list of system-applications that are referenced from the given server.String
getVirtualServers(String sn, String moduleID)
boolean
isNamedSystemApplicationReferencedFrom(String appName, String serverName)
static String
join(Iterable<String> list, String delimiter)
static boolean
toBoolean(String value)
This method is used to convert a string value to boolean.static String
toString(Throwable t)
-
-
-
Constructor Detail
-
ConfigBeansUtilities
@Inject public ConfigBeansUtilities(Applications paramApps, Domain paramDomain)
-
-
Method Detail
-
getDefaultCondition
public static String getDefaultCondition()
-
getDefaultFormat
public static String getDefaultFormat()
Get the default value of Format from dtd- Returns:
-
getDefaultRotationPolicy
public static String getDefaultRotationPolicy()
Get the default value of RotationPolicy from dtd- Returns:
-
getDefaultRotationEnabled
public static String getDefaultRotationEnabled()
Get the default value of RotationEnabled from dtd- Returns:
-
getDefaultRotationOnDateChange
public static String getDefaultRotationOnDateChange()
Get the default value of RotationOnDateChange from dtd- Returns:
-
getDefaultRotationIntervalInMinutes
public static String getDefaultRotationIntervalInMinutes()
Get the default value of RotationIntervalInMinutes from dtd- Returns:
-
getDefaultQueueSizeInBytes
public static String getDefaultQueueSizeInBytes()
Get the default value of QueueSizeInBytes from dtd- Returns:
-
toBoolean
public static boolean toBoolean(String value)
This method is used to convert a string value to boolean.- Parameters:
value
-- Returns:
- true if the value is one of true, on, yes, 1. Note that the values are case sensitive. If it is not one of these values, then, it returns false.
-
getSystemApplicationsReferencedFrom
public List<Application> getSystemApplicationsReferencedFrom(String sn)
Returns the list of system-applications that are referenced from the given server. A server references an application, if the server has an element named <application-ref> in it that points to given application. The given server is a <server> element inside domain.- Parameters:
sn
- the string denoting name of the server- Returns:
- List of system-applications for that server, an empty list in case there is none
-
getSystemApplicationReferencedFrom
public Application getSystemApplicationReferencedFrom(String sn, String appName)
-
isNamedSystemApplicationReferencedFrom
public boolean isNamedSystemApplicationReferencedFrom(String appName, String serverName)
-
getAllDefinedSystemApplications
public List<Application> getAllDefinedSystemApplications()
-
getApplicationRefsInServer
public List<ApplicationRef> getApplicationRefsInServer(String sn)
Lists the app refs for non-system apps assigned to the specified server- Parameters:
sn
- server name- Returns:
- List of ApplicationRef for non-system apps assigned to the specified server
-
getApplicationRefsInServer
public List<ApplicationRef> getApplicationRefsInServer(String sn, boolean excludeSystemApps)
Lists the app refs for apps assigned to the specified server, excluding system apps from the result if requested.- Parameters:
sn
- server name to checkexcludeSystemApps
- whether system apps should be excluded- Returns:
- List of ApplicationRef for apps assigned to the specified server
-
getApplicationRefInServer
public ApplicationRef getApplicationRefInServer(String sn, String name)
-
getModule
public ApplicationName getModule(String moduleID)
-
getDomain
public Domain getDomain()
-
-