Package org.openbravo.client.kernel
Class KernelComponentProvider
- java.lang.Object
-
- org.openbravo.client.kernel.BaseComponentProvider
-
- org.openbravo.client.kernel.KernelComponentProvider
-
- All Implemented Interfaces:
ComponentProvider
@ApplicationScoped public class KernelComponentProvider extends BaseComponentProvider
Provides Kernel Components.- Author:
- mtaal
- See Also:
StaticResourceComponent
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openbravo.client.kernel.BaseComponentProvider
BaseComponentProvider.ComponentResource
-
Nested classes/interfaces inherited from interface org.openbravo.client.kernel.ComponentProvider
ComponentProvider.Qualifier, ComponentProvider.Selector
-
-
Constructor Summary
Constructors Constructor Description KernelComponentProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BaseComponent
createComponent(String componentId, Map<String,Object> parameters)
Component
getComponent(String componentId, Map<String,Object> parameters)
List<BaseComponentProvider.ComponentResource>
getGlobalComponentResources()
Implemented here for backward compatibility, calls theBaseComponentProvider.getGlobalResources()
String
getVersionParameters(String resource)
Computes parameters to add to a link of a resource.-
Methods inherited from class org.openbravo.client.kernel.BaseComponentProvider
createComponentResource, createComponentResource, createComponentResource, createDynamicResource, createStaticResource, createStaticResource, createStyleSheetResource, createStyleSheetResource, getADAppDependencies, getComponent, getGlobalResources, getModule, getModulePackageName, setAppDependencies
-
-
-
-
Field Detail
-
QUALIFIER
public static final String QUALIFIER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getComponent
public Component getComponent(String componentId, Map<String,Object> parameters)
- Returns:
- the JavaScript code to create this datasource on the client
-
createComponent
protected BaseComponent createComponent(String componentId, Map<String,Object> parameters)
-
getVersionParameters
public String getVersionParameters(String resource)
Description copied from class:BaseComponentProvider
Computes parameters to add to a link of a resource. The parameters include the version and language of the user. The version computation logic depends on if the module is in development (Module.isInDevelopment()
. If in developers mode then theSystem.currentTimeMillis()
is used. If not in developers mode then theModule.getVersion()
is used. These values are prepended with the language id of the user. This makes it possible to generate language specific components on the server.- Specified by:
getVersionParameters
in interfaceComponentProvider
- Overrides:
getVersionParameters
in classBaseComponentProvider
- Parameters:
resource
- , the resource to compute the version string for, is typically a resource provided by the getGlobalResources method- Returns:
- the version parameter string, a concatenation of the version and language with parameter names
- See Also:
KernelConstants.RESOURCE_VERSION_PARAMETER
,KernelConstants.RESOURCE_LANGUAGE_PARAMETER
,KernelUtils.getVersionParameters(Module)
-
getGlobalComponentResources
public List<BaseComponentProvider.ComponentResource> getGlobalComponentResources()
Description copied from class:BaseComponentProvider
Implemented here for backward compatibility, calls theBaseComponentProvider.getGlobalResources()
- Specified by:
getGlobalComponentResources
in interfaceComponentProvider
- Overrides:
getGlobalComponentResources
in classBaseComponentProvider
- Returns:
- the global resources which are needed to be present on every page.
-
-