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 java.lang.Object implements ConfigurationPersistingStrategy<CONFIG>
-
-
Field Summary
-
Fields inherited from interface de.hybris.platform.cockpit.services.config.ConfigurationPersistingStrategy
COMPONENT_PERMISSION_CODE
-
-
Constructor Summary
Constructors Constructor Description DefaultConfigurationPersistingStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
checkPermissions(UserModel user)
java.lang.String
createXml(JAXBCLASS root)
CockpitUIComponentConfigurationDao
getCockpitUIComponentConfigurationDao()
java.lang.Class<CONFIG>
getComponentClass()
Provides the class this strategy is valid for.java.lang.String
getComponentClassName()
java.lang.String
getConfigurationFactory()
protected java.lang.Object
getJaxbElement(CONFIG config, java.lang.Object element)
MediaService
getMediaService()
ModelService
getModelService()
protected JAXBCLASS
getRootJaxbElement(CONFIG config)
void
persistComponentConfiguration(CONFIG configuration, UserModel user, ObjectTemplate objectTemplate, java.lang.String code)
Stores the configuration according to the strategy implementationvoid
setCockpitUIComponentConfigurationDao(CockpitUIComponentConfigurationDao cockpitConfigurationDao)
void
setComponentClassName(java.lang.String componentClass)
void
setConfigurationFactory(java.lang.String factory)
void
setJaxbClass(java.lang.Class<JAXBCLASS> jaxbClass)
void
setJaxbContextCache(JAXBContextCache jaxbContextCache)
void
setMediaService(MediaService mediaService)
void
setModelService(ModelService modelService)
void
setSchemaResource(org.springframework.core.io.Resource schemaResource)
void
setUiAccessRightService(UIAccessRightService uiAccessRightService)
protected void
storeConfigurationMedia(PrincipalModel principal, java.lang.String xmlContent, java.lang.String code, java.lang.String objectTemplateCode, java.lang.String factoryBeanId)
JAXBCLASS
updateJaxb(CONFIG configuration)
Converts/updates given configuration to the corresponding JAXB class - this method must be overriden by subclass!
-
-
-
Method Detail
-
updateJaxb
public JAXBCLASS updateJaxb(CONFIG configuration)
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, java.lang.String code)
Description copied from interface:ConfigurationPersistingStrategy
Stores the configuration according to the strategy implementation- Specified by:
persistComponentConfiguration
in 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
protected boolean checkPermissions(UserModel user)
-
storeConfigurationMedia
protected void storeConfigurationMedia(PrincipalModel principal, java.lang.String xmlContent, java.lang.String code, java.lang.String objectTemplateCode, java.lang.String factoryBeanId)
-
getComponentClass
public java.lang.Class<CONFIG> getComponentClass()
Description copied from interface:ConfigurationPersistingStrategy
Provides the class this strategy is valid for. Used for mapping strategies to classes via spring.- Specified by:
getComponentClass
in interfaceConfigurationPersistingStrategy<CONFIG extends UIComponentConfiguration>
- Returns:
- the class of the configuration which this strategy can handle
-
createXml
public java.lang.String createXml(JAXBCLASS root)
-
setJaxbClass
public void setJaxbClass(java.lang.Class<JAXBCLASS> jaxbClass)
-
getComponentClassName
public java.lang.String getComponentClassName()
-
setComponentClassName
public void setComponentClassName(java.lang.String componentClass)
-
getConfigurationFactory
public java.lang.String getConfigurationFactory()
-
setConfigurationFactory
public void setConfigurationFactory(java.lang.String factory)
-
getJaxbElement
protected java.lang.Object getJaxbElement(CONFIG config, java.lang.Object element)
-
setSchemaResource
public void setSchemaResource(org.springframework.core.io.Resource schemaResource)
-
getModelService
public ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getMediaService
public MediaService getMediaService()
-
setMediaService
public void setMediaService(MediaService mediaService)
-
setUiAccessRightService
public void setUiAccessRightService(UIAccessRightService uiAccessRightService)
-
getCockpitUIComponentConfigurationDao
public CockpitUIComponentConfigurationDao getCockpitUIComponentConfigurationDao()
-
setCockpitUIComponentConfigurationDao
public void setCockpitUIComponentConfigurationDao(CockpitUIComponentConfigurationDao cockpitConfigurationDao)
-
setJaxbContextCache
public void setJaxbContextCache(JAXBContextCache jaxbContextCache)
-
-