Class BeanContext.Map

    • Field Detail

      • request

        protected transient org.apache.sling.api.SlingHttpServletRequest request
      • resource

        protected transient org.apache.sling.api.resource.Resource resource
      • resolver

        protected transient org.apache.sling.api.resource.ResourceResolver resolver
    • Method Detail

      • getResource

        public org.apache.sling.api.resource.Resource getResource()
        Description copied from interface: BeanContext
        Returns the resource declared in the context.
      • getResolver

        public org.apache.sling.api.resource.ResourceResolver getResolver()
        Description copied from interface: BeanContext
        Returns the resolver declared in the context.
      • getRequest

        public org.apache.sling.api.SlingHttpServletRequest getRequest()
        Description copied from interface: BeanContext
        Returns the request declared in the context.
      • getResponse

        public org.apache.sling.api.SlingHttpServletResponse getResponse()
        Description copied from interface: BeanContext
        Returns the response declared in the context.
      • getAttribute

        public <T> T getAttribute​(String name,
                                  Class<T> T)
        Description copied from interface: BeanContext
        Returns an attribute value from the context.
      • setAttribute

        public void setAttribute​(String name,
                                 Object value,
                                 BeanContext.Scope scope)
        Description copied from interface: BeanContext
        Stores an attribute in the context in th given scope.
      • withResource

        public BeanContext.Map withResource​(org.apache.sling.api.resource.Resource resource)
        Description copied from interface: BeanContext
        Returns a clone of this context with the resource overridden, or this if it already had this resource. All other internal structures of this will be referenced by the copy, too.
        Parameters:
        resource - the resource
        Returns:
        a context with the BeanContext.getResource() resource, everything else (except possibly resolver) unchanged. Might be this.