Annotation Type SlingServletResourceTypes

    • Field Summary

      Fields 
      Modifier and Type Fields Description
      static java.lang.String PREFIX_
      Prefix for every property being generated from the annotations elements (as defined in OSGi 7 Compendium, 112.8.2.1)
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String[] resourceTypes
      The resource type(s) supported by the servlet (value is "sling.servlet.resourceTypes").
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String[] extensions
      The request URL extensions supported by the servlet.
      java.lang.String[] methods
      The request methods supported by the servlet.
      java.lang.String resourceSuperType
      The resource super type from which the servlet inherits (value is "sling.servlet.resourceSuperType").
      java.lang.String[] selectors
      One ore more request URL selectors supported by the servlet.
    • Field Detail

      • PREFIX_

        static final java.lang.String PREFIX_
        Prefix for every property being generated from the annotations elements (as defined in OSGi 7 Compendium, 112.8.2.1)
    • Element Detail

      • resourceTypes

        java.lang.String[] resourceTypes
        The resource type(s) supported by the servlet (value is "sling.servlet.resourceTypes"). A relative resource type is made absolute by prefixing it with the value set through the SlingServletPrefix annotation.
        Returns:
        the resource type(s)
      • resourceSuperType

        java.lang.String resourceSuperType
        The resource super type from which the servlet inherits (value is "sling.servlet.resourceSuperType"). The default value of this registration property is "sling/bundle/resource".

        In order for this property to be taken into consideration, the org.apache.sling.servlets.resolver bundle needs to be deployed on the system, version 2.5.0 or above.

        Returns:
        the resource super type
        See Also:
        ServletResolverConstants.SLING_SERVLET_RESOURCE_SUPER_TYPE, Apache Sling Resource Types
        Default:
        "sling/bundle/resource"
      • selectors

        java.lang.String[] selectors
        One ore more request URL selectors supported by the servlet. The selectors must be configured in the order as they would be specified in the URL that is as a list of dot-separated strings such as print.a4. In case this is not empty the first selector(s) (i.e. the one on the left in the URL) must match, otherwise the servlet is not executed. After that may follow arbitrarily many non-registered selectors.
        Returns:
        the selector(s)
        See Also:
        ServletResolverConstants.SLING_SERVLET_SELECTORS
        Default:
        {}
      • extensions

        java.lang.String[] extensions
        The request URL extensions supported by the servlet.

        It this is not set, the servlet is not limited to certain extensions.

        Returns:
        the extension(s)
        See Also:
        ServletResolverConstants.SLING_SERVLET_EXTENSIONS
        Default:
        {}