Class DefaultConfigUploadAuExtension

  • All Implemented Interfaces:
    org.zkoss.zk.au.http.AuExtension

    public class DefaultConfigUploadAuExtension
    extends java.lang.Object
    implements org.zkoss.zk.au.http.AuExtension
    • 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CONFIG_VALIDATE

        protected static final java.lang.String CONFIG_VALIDATE
        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
    • Constructor Detail

      • DefaultConfigUploadAuExtension

        public DefaultConfigUploadAuExtension()
    • Method Detail

      • init

        public void init​(org.zkoss.zk.au.http.DHtmlUpdateServlet servlet)
        Specified by:
        init in interface org.zkoss.zk.au.http.AuExtension
      • destroy

        public void destroy()
        Specified by:
        destroy in interface org.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 interface org.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)