Package org.apache.ofbiz.base.component
Class ComponentConfig
java.lang.Object
org.apache.ofbiz.base.component.ComponentConfig
An object that models the
<ofbiz-component>
element.- See Also:
-
ofbiz-component.xsd
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builder for component configuration.static final class
An object that models the<classpath>
element.static final class
An object that models the<entity-resource>
element.static final class
An object that models the<keystore>
element.static class
static final class
An object that models the<resource-loader>
element.static final class
An object that models the<service-resource>
element.static final class
An object that models the<test-suite>
element.static final class
An object that models the<webapp>
element. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Boolean
componentExists
(String componentName) static Stream<ComponentConfig>
boolean
enabled()
static List<ComponentConfig.ClasspathInfo>
Provides the list of all the classpath information available in components.static Collection<ComponentConfig>
static List<ContainerConfig.Configuration>
Provides the list of all the container configuration elements available in components.getAllEntityResourceInfos
(String type, String name) Provides the list of all the entity resource information matching a type.static List<ComponentConfig.KeystoreInfo>
Provides the list of all the keystore information available in components.Provides the list of all the service resource information matching a type.static List<ComponentConfig.TestSuiteInfo>
getAllTestSuiteInfos
(String name) Provides the list of all the test-suite information matching a component name.static List<ComponentConfig.WebappInfo>
Provides the list of all the web-app information in componentsProvides the list of class path information.static ComponentConfig
getComponentConfig
(String globalName) static ComponentConfig
getComponentConfig
(String globalName, String rootLocation) Provides the list of dependent components.static ComponentConfig.KeystoreInfo
getKeystoreInfo
(String componentName, String keystoreName) Provides the first key-store matching a name from a specific component.static String
getRootLocation
(String componentName) static URL
static ComponentConfig.WebappInfo
getWebAppInfo
(String serverName, String contextRoot) boolean
isFileResource
(ComponentConfig.ResourceInfo resourceInfo) Provides the root location of the component definition.static void
Sorts the cached component configurations.toString()
-
Field Details
-
OFBIZ_COMPONENT_XML_FILENAME
- See Also:
-
-
Method Details
-
componentExists
-
getAllClasspathInfos
Provides the list of all the classpath information available in components.- Returns:
- a list of classpath information
-
getAllComponents
-
sortDependencies
Sorts the cached component configurations.- Throws:
ComponentException
- when a component configuration contains an invalid dependency or if the dependency graph contains a cycle.
-
components
-
getAllConfigurations
Provides the list of all the container configuration elements available in components.- Returns:
- a list of container configuration elements
-
getAllEntityResourceInfos
-
getAllEntityResourceInfos
public static List<ComponentConfig.EntityResourceInfo> getAllEntityResourceInfos(String type, String name) Provides the list of all the entity resource information matching a type.- Parameters:
type
- the service resource type to matchname
- the name of the component to match- Returns:
- a list of entity resource information
-
getAllKeystoreInfos
Provides the list of all the keystore information available in components.- Returns:
- a list of keystore information
-
getAllServiceResourceInfos
Provides the list of all the service resource information matching a type.- Parameters:
type
- the service resource type to match- Returns:
- a list of service resource information
-
getAllTestSuiteInfos
Provides the list of all the test-suite information matching a component name.- Parameters:
name
- the name of the component to match wherenull
means "any"- Returns:
- a list of test-suite information
-
getAllWebappResourceInfos
Provides the list of all the web-app information in components- Returns:
- a list of web-app information
-
getComponentConfig
- Throws:
ComponentException
-
getComponentConfig
public static ComponentConfig getComponentConfig(String globalName, String rootLocation) throws ComponentException - Throws:
ComponentException
-
getKeystoreInfo
public static ComponentConfig.KeystoreInfo getKeystoreInfo(String componentName, String keystoreName) Provides the first key-store matching a name from a specific component.- Parameters:
componentName
- the name of the component to match which can benull
keystoreName
- the name of the key-store to match which can benull
- Returns:
- the first key-store matching both
componentName
andkeystoreName
.
-
getRootLocation
- Throws:
ComponentException
-
getURL
public static URL getURL(String componentName, String resourceLoaderName, String location) throws ComponentException - Throws:
ComponentException
-
getWebAppInfo
-
enabled
public boolean enabled() -
getClasspathInfos
Provides the list of class path information.- Returns:
- an immutable list containing the class path information.
-
getComponentName
-
getConfigurations
-
getGlobalName
-
getDependsOn
Provides the list of dependent components.- Returns:
- an immutable list containing the dependency information.
-
getResourceLoaderInfos
-
rootLocation
Provides the root location of the component definition.- Returns:
- a normalized absolute path
-
getURL
- Throws:
ComponentException
-
getWebappInfos
-
isFileResource
- Throws:
ComponentException
-
toString
-