public interface CockpitComponentDefinitionService
WidgetDefinition
objects.| Modifier and Type | Method and Description |
|---|---|
default void |
clearDefinitions()
Clears components definitions.
|
<T> T |
createAutowiredComponent(AbstractCockpitComponentDefinition definition,
String className,
org.springframework.context.ApplicationContext context)
Creates autowired component
|
<T> T |
createAutowiredComponent(AbstractCockpitComponentDefinition definition,
String className,
org.springframework.context.ApplicationContext context,
boolean cached)
Creates autowired component
|
List<AbstractCockpitComponentDefinition> |
getAllComponentDefinitions()
Provides all component definitions available in the system.
|
org.springframework.context.ApplicationContext |
getApplicationContext(AbstractCockpitComponentDefinition definition)
Deprecated.
since 1808, use
ApplicationContextAware instead |
ClassLoader |
getClassLoader(AbstractCockpitComponentDefinition definition)
Deprecated.
since 1808, use
CockpitApplicationContext.getClassLoader() instead |
AbstractCockpitComponentDefinition |
getComponentDefinitionForCode(String code)
Looks for a component definition with the given Editor code (example: 'com.hybris.cockpitng.editor.defaulttext')
|
<T extends AbstractCockpitComponentDefinition> |
getComponentDefinitionForCode(String code,
Class<T> componentType)
Looks for a component definition with the given code.
|
<T extends AbstractCockpitComponentDefinition> |
getComponentDefinitionsByClass(Class<T> componentType)
Provides all component definitions of given type.
|
Map<String,WidgetDefinition> |
getStubWidgetDefinitions()
Returns all stub widget definitions that were registered for 'non-widget' aware components
|
void |
reloadDefinitions()
Reloads all component definitions.
|
@Deprecated ClassLoader getClassLoader(AbstractCockpitComponentDefinition definition)
CockpitApplicationContext.getClassLoader() instead@Deprecated org.springframework.context.ApplicationContext getApplicationContext(AbstractCockpitComponentDefinition definition)
ApplicationContextAware insteadList<AbstractCockpitComponentDefinition> getAllComponentDefinitions()
<T extends AbstractCockpitComponentDefinition> List<T> getComponentDefinitionsByClass(Class<T> componentType)
componentType - class of componentAbstractCockpitComponentDefinition getComponentDefinitionForCode(String code)
code - the code of the component definition to be foundIllegalArgumentException - if component definition with the given code does not exist<T extends AbstractCockpitComponentDefinition> T getComponentDefinitionForCode(String code, Class<T> componentType)
code - the code of the component definition to be foundcomponentType - the expected class of the definitionIllegalArgumentException - if component definition with the given code does not exist or is not instance of expected componentTypedefault void clearDefinitions()
void reloadDefinitions()
Map<String,WidgetDefinition> getStubWidgetDefinitions()
<T> T createAutowiredComponent(AbstractCockpitComponentDefinition definition, String className, org.springframework.context.ApplicationContext context) throws ReflectiveOperationException
T - type of created componentdefinition - component definitionclassName - class of the component to be createdcontext - Spring application context from which the dependencies should be wired; if null the dependencies
are not wired only the instance is createdReflectiveOperationException - when it is impossible to create instance of class of given name<T> T createAutowiredComponent(AbstractCockpitComponentDefinition definition, String className, org.springframework.context.ApplicationContext context, boolean cached) throws ReflectiveOperationException
T - type of created componentdefinition - component definitionclassName - class of the component to be createdcontext - Spring application context from which the dependencies should be wired; if null the dependencies
are not wired only the instance is createdcached - if true the created object will be cached; for stateful objects the parameter should be falseReflectiveOperationException - when it is impossible to create instance of class of given nameCopyright © 2018. All rights reserved.