Class DefaultConfigUploadAuExtension
- java.lang.Object
-
- com.hybris.backoffice.config.zk.au.DefaultConfigUploadAuExtension
-
- All Implemented Interfaces:
org.zkoss.zk.au.http.AuExtension
public class DefaultConfigUploadAuExtension extends java.lang.Object implements org.zkoss.zk.au.http.AuExtension
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
CONFIG_UPLOAD
protected static java.lang.String
CONFIG_VALIDATE
static java.lang.String
I18N_CONFIG_PERSISTENCE_FAILED_GENERIC_MESSAGE
-
Constructor Summary
Constructors Constructor Description DefaultConfigUploadAuExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
protected java.lang.String
fetchConfigFromRequest(javax.servlet.http.HttpServletRequest request)
protected void
formatConfigValidationResponse(com.hybris.cockpitng.core.util.jaxb.SchemaValidationStatus status, javax.servlet.http.HttpServletResponse response)
org.springframework.context.ApplicationContext
getApplicationContext(javax.servlet.http.HttpServletRequest request)
protected com.hybris.cockpitng.admin.CockpitAdminService
getCockpitAdminService(javax.servlet.http.HttpServletRequest request)
protected com.hybris.cockpitng.core.config.impl.DefaultCockpitConfigurationService
getCockpitConfigurationService(javax.servlet.http.HttpServletRequest request)
protected com.hybris.cockpitng.core.util.CockpitProperties
getCockpitProperties(javax.servlet.http.HttpServletRequest request)
protected com.hybris.cockpitng.util.CockpitSessionService
getCockpitSessionService(javax.servlet.http.HttpServletRequest request)
protected javax.xml.bind.Unmarshaller
getConfigUnmarshaller(javax.servlet.http.HttpServletRequest request)
protected com.hybris.cockpitng.core.config.impl.jaxb.Config
getConfigWithAppliedChanges(com.hybris.cockpitng.core.config.impl.jaxb.Config changes, javax.servlet.http.HttpServletRequest request)
protected java.io.InputStream
getInputStream(javax.servlet.http.HttpServletRequest request)
protected java.lang.String
getValidationLabelForStatus(com.hybris.cockpitng.core.util.jaxb.SchemaValidationStatus status)
protected void
handleConfigUpload(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected void
handleConfigValidate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected void
handleError(javax.servlet.http.HttpServletResponse response, java.lang.Exception error)
void
init(org.zkoss.zk.au.http.DHtmlUpdateServlet servlet)
protected boolean
isConfigurationFiltered(javax.servlet.http.HttpServletRequest request)
void
service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String pi)
protected boolean
shouldValidateCockpitConfig(javax.servlet.http.HttpServletRequest request)
protected void
storeConfig(java.lang.String xml, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
-
-
Field Detail
-
CONFIG_VALIDATE
protected static final java.lang.String CONFIG_VALIDATE
- See Also:
- Constant Field Values
-
CONFIG_UPLOAD
protected static final java.lang.String CONFIG_UPLOAD
- See Also:
- Constant Field Values
-
I18N_CONFIG_PERSISTENCE_FAILED_GENERIC_MESSAGE
public static final java.lang.String I18N_CONFIG_PERSISTENCE_FAILED_GENERIC_MESSAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(org.zkoss.zk.au.http.DHtmlUpdateServlet servlet)
- Specified by:
init
in interfaceorg.zkoss.zk.au.http.AuExtension
-
destroy
public void destroy()
- Specified by:
destroy
in interfaceorg.zkoss.zk.au.http.AuExtension
-
service
public void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String pi)
- Specified by:
service
in interfaceorg.zkoss.zk.au.http.AuExtension
-
handleConfigValidate
protected void handleConfigValidate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
formatConfigValidationResponse
protected void formatConfigValidationResponse(com.hybris.cockpitng.core.util.jaxb.SchemaValidationStatus status, javax.servlet.http.HttpServletResponse response)
-
getInputStream
protected java.io.InputStream getInputStream(javax.servlet.http.HttpServletRequest request) throws java.io.IOException
- Throws:
java.io.IOException
-
getValidationLabelForStatus
protected java.lang.String getValidationLabelForStatus(com.hybris.cockpitng.core.util.jaxb.SchemaValidationStatus status)
-
handleConfigUpload
protected void handleConfigUpload(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
fetchConfigFromRequest
protected java.lang.String fetchConfigFromRequest(javax.servlet.http.HttpServletRequest request) throws java.io.IOException
- Throws:
java.io.IOException
-
storeConfig
protected void storeConfig(java.lang.String xml, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
isConfigurationFiltered
protected boolean isConfigurationFiltered(javax.servlet.http.HttpServletRequest request)
-
handleError
protected void handleError(javax.servlet.http.HttpServletResponse response, java.lang.Exception error)
-
shouldValidateCockpitConfig
protected boolean shouldValidateCockpitConfig(javax.servlet.http.HttpServletRequest request)
-
getCockpitProperties
protected com.hybris.cockpitng.core.util.CockpitProperties getCockpitProperties(javax.servlet.http.HttpServletRequest request)
-
getCockpitAdminService
protected com.hybris.cockpitng.admin.CockpitAdminService getCockpitAdminService(javax.servlet.http.HttpServletRequest request)
-
getConfigUnmarshaller
protected javax.xml.bind.Unmarshaller getConfigUnmarshaller(javax.servlet.http.HttpServletRequest request) throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
-
getConfigWithAppliedChanges
protected com.hybris.cockpitng.core.config.impl.jaxb.Config getConfigWithAppliedChanges(com.hybris.cockpitng.core.config.impl.jaxb.Config changes, javax.servlet.http.HttpServletRequest request) throws com.hybris.cockpitng.core.config.CockpitConfigurationException
- Throws:
com.hybris.cockpitng.core.config.CockpitConfigurationException
-
getCockpitConfigurationService
protected com.hybris.cockpitng.core.config.impl.DefaultCockpitConfigurationService getCockpitConfigurationService(javax.servlet.http.HttpServletRequest request)
-
getCockpitSessionService
protected com.hybris.cockpitng.util.CockpitSessionService getCockpitSessionService(javax.servlet.http.HttpServletRequest request)
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext(javax.servlet.http.HttpServletRequest request)
-
-