Class ViewScope

  • All Implemented Interfaces:
    org.springframework.beans.factory.config.Scope

    public class ViewScope
    extends java.lang.Object
    implements org.springframework.beans.factory.config.Scope
    Implementation of view scope. This class exposes the JSF view map as spring Scope.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DESTRUCTION_CALLBACK_NAME_PREFIX
      Constant identifying the String prefixed to the name of a destruction callback when it is stored in a view map.
      static java.lang.String SCOPE_VIEW
      Scope identifier for view scope: "view".
    • Constructor Summary

      Constructors 
      Constructor Description
      ViewScope()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object get​(java.lang.String name, org.springframework.beans.factory.ObjectFactory objectFactory)  
      java.lang.String getConversationId()  
      void registerDestructionCallback​(java.lang.String name, java.lang.Runnable callback)  
      java.lang.Object remove​(java.lang.String name)  
      java.lang.Object resolveContextualObject​(java.lang.String key)  
      • Methods inherited from class java.lang.Object

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

      • SCOPE_VIEW

        public static final java.lang.String SCOPE_VIEW
        Scope identifier for view scope: "view".
        See Also:
        WebApplicationContext.SCOPE_SESSION, WebApplicationContext.SCOPE_REQUEST, Constant Field Values
      • DESTRUCTION_CALLBACK_NAME_PREFIX

        public static final java.lang.String DESTRUCTION_CALLBACK_NAME_PREFIX
        Constant identifying the String prefixed to the name of a destruction callback when it is stored in a view map.
        See Also:
        ServletRequestAttributes.DESTRUCTION_CALLBACK_NAME_PREFIX
    • Constructor Detail

      • ViewScope

        public ViewScope()
    • Method Detail

      • get

        public java.lang.Object get​(java.lang.String name,
                                    org.springframework.beans.factory.ObjectFactory objectFactory)
        Specified by:
        get in interface org.springframework.beans.factory.config.Scope
      • remove

        @Nullable
        public java.lang.Object remove​(java.lang.String name)
        Specified by:
        remove in interface org.springframework.beans.factory.config.Scope
      • getConversationId

        @Nullable
        public java.lang.String getConversationId()
        Specified by:
        getConversationId in interface org.springframework.beans.factory.config.Scope
      • registerDestructionCallback

        public void registerDestructionCallback​(java.lang.String name,
                                                java.lang.Runnable callback)
        Specified by:
        registerDestructionCallback in interface org.springframework.beans.factory.config.Scope
      • resolveContextualObject

        @Nullable
        public java.lang.Object resolveContextualObject​(java.lang.String key)
        Specified by:
        resolveContextualObject in interface org.springframework.beans.factory.config.Scope