Interface ApplicationConfiguration

    • Method Detail

      • getComponentPackages

        java.lang.String[] getComponentPackages()
        Returns:
        names of root packages, where slimweb components are found. For example return new String[] {"com.mypackage", "com.yourpackage.components"}
      • registerInjectors

        void registerInjectors​(java.util.Map<java.lang.Class<?>,​ArgumentInjector> mapInjectors)
        Register injectors for method parameters
        Parameters:
        mapInjectors - map of injectors
      • getLoginView

        java.lang.String getLoginView()
        Returns:
        path to view, which requires user login
      • getValidOrigins

        java.lang.String[] getValidOrigins()
        Provides a list of valid origins for CSRF attack detection. When null is returned, all origins are valid and CSRF attack is possible
        Returns:
        a list of valid origins, for example ["http://myhost.com", "https://myhost.com"]; these origins are used in CSRF attack detection algorithm
      • getFrameForTemplate

        java.lang.String getFrameForTemplate​(java.lang.String templateFile,
                                             HttpAccessor htAccessor)
        Parameters:
        templateFile - template file name, including extension, but excluding folder names
        htAccessor - http request/response details
        Returns:
        frame template file name (without folders and .html extension)
      • preprocessComponent

        void preprocessComponent​(java.lang.Object component,
                                 HttpAccessor htAccessor)
        This preprocessor is invoked for all components immediately prior get-, post-, put- or delete-method.
        Parameters:
        component - component
        htAccessor - http request/response details
      • postprocessComponent

        void postprocessComponent​(java.lang.Object component,
                                  HttpAccessor htAccessor)
        This postprocessor is invoked for all components immediately after get-, post-, put- or delete-method has finished.
        Parameters:
        component - component
        htAccessor - http request/response details