com.sun.enterprise.config.serverbeans
Class ConfigBeansUtilities

java.lang.Object
  extended by com.sun.enterprise.config.serverbeans.ConfigBeansUtilities

@Service
public final class ConfigBeansUtilities
extends java.lang.Object

Bunch of utility methods for the new serverbeans config api based on jaxb


Constructor Summary
ConfigBeansUtilities()
           
 
Method Summary
static java.util.List<Application> getAllDefinedSystemApplications()
           
static ApplicationRef getApplicationRefInServer(java.lang.String sn, java.lang.String name)
           
static java.util.List<ApplicationRef> getApplicationRefsInServer(java.lang.String sn)
          Lists the app refs for non-system apps assigned to the specified server
static java.util.List<ApplicationRef> getApplicationRefsInServer(java.lang.String sn, boolean excludeSystemApps)
          Lists the app refs for apps assigned to the specified server, excluding system apps from the result if requested.
static java.lang.String getContextRoot(java.lang.String moduleID)
           
static java.lang.String getDefaultFormat()
          Get the default value of Format from dtd
static java.lang.String getDefaultQueueSizeInBytes()
          Get the default value of QueueSizeInBytes from dtd
static java.lang.String getDefaultRotationEnabled()
          Get the default value of RotationEnabled from dtd
static java.lang.String getDefaultRotationIntervalInMinutes()
          Get the default value of RotationIntervalInMinutes from dtd
static java.lang.String getDefaultRotationPolicy()
          Get the default value of RotationPolicy from dtd
static java.lang.String getDirectoryDeployed(java.lang.String moduleID)
           
static Domain getDomain()
           
static java.lang.String getEnabled(java.lang.String sn, java.lang.String moduleID)
           
static java.lang.String getLibraries(java.lang.String moduleID)
           
static java.lang.String getLocation(java.lang.String moduleID)
           
static ApplicationName getModule(java.lang.String moduleID)
           
static Server getServerNamed(java.lang.String name)
           
static java.util.List<Server> getServers()
           
static Application getSystemApplicationReferencedFrom(java.lang.String sn, java.lang.String appName)
           
static java.util.List<Application> getSystemApplicationsReferencedFrom(java.lang.String sn)
          Returns the list of system-applications that are referenced from the given server.
static java.lang.String getVirtualServers(java.lang.String sn, java.lang.String moduleID)
           
static boolean isNamedSystemApplicationReferencedFrom(java.lang.String appName, java.lang.String serverName)
           
static java.lang.String join(java.lang.Iterable<java.lang.String> list, java.lang.String delimiter)
           
static boolean toBoolean(java.lang.String value)
          This method is used to convert a string value to boolean.
static java.lang.String toString(java.lang.Throwable t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigBeansUtilities

public ConfigBeansUtilities()
Method Detail

getDefaultFormat

public static java.lang.String getDefaultFormat()
Get the default value of Format from dtd


getDefaultRotationPolicy

public static java.lang.String getDefaultRotationPolicy()
Get the default value of RotationPolicy from dtd


getDefaultRotationEnabled

public static java.lang.String getDefaultRotationEnabled()
Get the default value of RotationEnabled from dtd


getDefaultRotationIntervalInMinutes

public static java.lang.String getDefaultRotationIntervalInMinutes()
Get the default value of RotationIntervalInMinutes from dtd


getDefaultQueueSizeInBytes

public static java.lang.String getDefaultQueueSizeInBytes()
Get the default value of QueueSizeInBytes from dtd


toBoolean

public static boolean toBoolean(java.lang.String value)
This method is used to convert a string value to boolean.

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 static java.util.List<Application> getSystemApplicationsReferencedFrom(java.lang.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 static Application getSystemApplicationReferencedFrom(java.lang.String sn,
                                                             java.lang.String appName)

isNamedSystemApplicationReferencedFrom

public static boolean isNamedSystemApplicationReferencedFrom(java.lang.String appName,
                                                             java.lang.String serverName)

getServers

public static java.util.List<Server> getServers()

getServerNamed

public static Server getServerNamed(java.lang.String name)

getAllDefinedSystemApplications

public static java.util.List<Application> getAllDefinedSystemApplications()

getApplicationRefsInServer

public static java.util.List<ApplicationRef> getApplicationRefsInServer(java.lang.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 static java.util.List<ApplicationRef> getApplicationRefsInServer(java.lang.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 check
excludeSystemApps - whether system apps should be excluded
Returns:
List of ApplicationRef for apps assigned to the specified server

getApplicationRefInServer

public static ApplicationRef getApplicationRefInServer(java.lang.String sn,
                                                       java.lang.String name)

getModule

public static ApplicationName getModule(java.lang.String moduleID)

getEnabled

public static java.lang.String getEnabled(java.lang.String sn,
                                          java.lang.String moduleID)

getVirtualServers

public static java.lang.String getVirtualServers(java.lang.String sn,
                                                 java.lang.String moduleID)

getContextRoot

public static java.lang.String getContextRoot(java.lang.String moduleID)

getLibraries

public static java.lang.String getLibraries(java.lang.String moduleID)

getLocation

public static java.lang.String getLocation(java.lang.String moduleID)

getDirectoryDeployed

public static java.lang.String getDirectoryDeployed(java.lang.String moduleID)

join

public static java.lang.String join(java.lang.Iterable<java.lang.String> list,
                                    java.lang.String delimiter)

toString

public static java.lang.String toString(java.lang.Throwable t)

getDomain

public static Domain getDomain()


Copyright © 2012 GlassFish Community. All Rights Reserved.