Class DefaultConfigurationPersistingStrategy<CONFIG extends UIComponentConfiguration,JAXBCLASS>
java.lang.Object
de.hybris.platform.cockpit.services.config.impl.DefaultConfigurationPersistingStrategy<CONFIG,JAXBCLASS>
- All Implemented Interfaces:
ConfigurationPersistingStrategy<CONFIG>
- Direct Known Subclasses:
AdvancedSearchConfigurationPersistingStrategy,DashboardPersistingStrategy,EditorConfigurationPersistingStrategy,ListViewConfigurationPersistingStrategy
public class DefaultConfigurationPersistingStrategy<CONFIG extends UIComponentConfiguration,JAXBCLASS>
extends Object
implements ConfigurationPersistingStrategy<CONFIG>
-
Field Summary
Fields inherited from interface de.hybris.platform.cockpit.services.config.ConfigurationPersistingStrategy
COMPONENT_PERMISSION_CODE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckPermissions(UserModel user) Provides the class this strategy is valid for.protected ObjectgetJaxbElement(CONFIG config, Object element) protected JAXBCLASSgetRootJaxbElement(CONFIG config) voidpersistComponentConfiguration(CONFIG configuration, UserModel user, ObjectTemplate objectTemplate, String code) Stores the configuration according to the strategy implementationvoidsetCockpitUIComponentConfigurationDao(CockpitUIComponentConfigurationDao cockpitConfigurationDao) voidsetComponentClassName(String componentClass) voidsetConfigurationFactory(String factory) voidsetJaxbClass(Class<JAXBCLASS> jaxbClass) voidsetJaxbContextCache(JAXBContextCache jaxbContextCache) voidsetMediaService(MediaService mediaService) voidsetModelService(ModelService modelService) voidsetSchemaResource(org.springframework.core.io.Resource schemaResource) voidsetUiAccessRightService(UIAccessRightService uiAccessRightService) protected voidstoreConfigurationMedia(PrincipalModel principal, String xmlContent, String code, String objectTemplateCode, String factoryBeanId) updateJaxb(CONFIG configuration) Converts/updates given configuration to the corresponding JAXB class - this method must be overriden by subclass!
-
Constructor Details
-
DefaultConfigurationPersistingStrategy
public DefaultConfigurationPersistingStrategy()
-
-
Method Details
-
updateJaxb
Converts/updates given configuration to the corresponding JAXB class - this method must be overriden by subclass!- Parameters:
configuration- the java configuration- Returns:
- the corresponding JAXB class
-
persistComponentConfiguration
public void persistComponentConfiguration(CONFIG configuration, UserModel user, ObjectTemplate objectTemplate, String code) Description copied from interface:ConfigurationPersistingStrategyStores the configuration according to the strategy implementation- Specified by:
persistComponentConfigurationin interfaceConfigurationPersistingStrategy<CONFIG extends UIComponentConfiguration>- Parameters:
configuration- the configuration to storeuser- the user the configuration should be valid forobjectTemplate- the object template the configuration should be valid forcode- the component code of the configuration
-
checkPermissions
-
storeConfigurationMedia
protected void storeConfigurationMedia(PrincipalModel principal, String xmlContent, String code, String objectTemplateCode, String factoryBeanId) -
getComponentClass
Description copied from interface:ConfigurationPersistingStrategyProvides the class this strategy is valid for. Used for mapping strategies to classes via spring.- Specified by:
getComponentClassin interfaceConfigurationPersistingStrategy<CONFIG extends UIComponentConfiguration>- Returns:
- the class of the configuration which this strategy can handle
-
createXml
-
setJaxbClass
-
getComponentClassName
-
setComponentClassName
-
getConfigurationFactory
-
setConfigurationFactory
-
getRootJaxbElement
-
getJaxbElement
-
setSchemaResource
public void setSchemaResource(org.springframework.core.io.Resource schemaResource) -
getModelService
-
setModelService
-
getMediaService
-
setMediaService
-
setUiAccessRightService
-
getCockpitUIComponentConfigurationDao
-
setCockpitUIComponentConfigurationDao
public void setCockpitUIComponentConfigurationDao(CockpitUIComponentConfigurationDao cockpitConfigurationDao) -
setJaxbContextCache
-