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.StringCONFIG_UPLOADprotected static java.lang.StringCONFIG_VALIDATEstatic java.lang.StringI18N_CONFIG_PERSISTENCE_FAILED_GENERIC_MESSAGE
-
Constructor Summary
Constructors Constructor Description DefaultConfigUploadAuExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()protected java.lang.StringfetchConfigFromRequest(javax.servlet.http.HttpServletRequest request)protected voidformatConfigValidationResponse(com.hybris.cockpitng.core.util.jaxb.SchemaValidationStatus status, javax.servlet.http.HttpServletResponse response)org.springframework.context.ApplicationContextgetApplicationContext(javax.servlet.http.HttpServletRequest request)protected com.hybris.cockpitng.admin.CockpitAdminServicegetCockpitAdminService(javax.servlet.http.HttpServletRequest request)protected com.hybris.cockpitng.core.config.impl.DefaultCockpitConfigurationServicegetCockpitConfigurationService(javax.servlet.http.HttpServletRequest request)protected com.hybris.cockpitng.core.util.CockpitPropertiesgetCockpitProperties(javax.servlet.http.HttpServletRequest request)protected com.hybris.cockpitng.util.CockpitSessionServicegetCockpitSessionService(javax.servlet.http.HttpServletRequest request)protected javax.xml.bind.UnmarshallergetConfigUnmarshaller(javax.servlet.http.HttpServletRequest request)protected com.hybris.cockpitng.core.config.impl.jaxb.ConfiggetConfigWithAppliedChanges(com.hybris.cockpitng.core.config.impl.jaxb.Config changes, javax.servlet.http.HttpServletRequest request)protected java.io.InputStreamgetInputStream(javax.servlet.http.HttpServletRequest request)protected java.lang.StringgetValidationLabelForStatus(com.hybris.cockpitng.core.util.jaxb.SchemaValidationStatus status)protected voidhandleConfigUpload(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected voidhandleConfigValidate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected voidhandleError(javax.servlet.http.HttpServletResponse response, java.lang.Exception error)voidinit(org.zkoss.zk.au.http.DHtmlUpdateServlet servlet)protected booleanisConfigurationFiltered(javax.servlet.http.HttpServletRequest request)voidservice(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String pi)protected booleanshouldValidateCockpitConfig(javax.servlet.http.HttpServletRequest request)protected voidstoreConfig(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:
initin interfaceorg.zkoss.zk.au.http.AuExtension
-
destroy
public void destroy()
- Specified by:
destroyin 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:
servicein 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)
-
-