Package sc.obj

Class ScopeDefinition

  • Direct Known Subclasses:
    AppGlobalScopeDefinition, GlobalScopeDefinition, RequestScopeDefinition

    public abstract class ScopeDefinition
    extends java.lang.Object
    Frameworks that need to implement a new scope - i.e. a new type of lifecycle extend this class and ScopeContext. There is one instance of this class for every scope implementation. It holds metadata that help us manage objects of this scope.
    • Field Detail

      • scopeId

        public int scopeId
      • name

        public java.lang.String name
      • aliases

        public java.util.List<java.lang.String> aliases
      • eventListenerCtx

        public boolean eventListenerCtx
        Does this scope receive queued up events for sharing in cross-scope bindings
      • supportsChangeEvents

        public boolean supportsChangeEvents
        Must set this to true for scopes that clients will use to send/receive events (e.g. window for the server and global for the client). It's false for the intermediate 'store-only' contexts
      • verbose

        public static boolean verbose
        High-level messages about object-level events
      • trace

        public static boolean trace
        Detailed messages about property-level events
      • traceLocks

        public static boolean traceLocks
    • Constructor Detail

      • ScopeDefinition

        public ScopeDefinition​(int scopeId)
      • ScopeDefinition

        public ScopeDefinition()
    • Method Detail

      • getScopeContext

        public ScopeContext getScopeContext​(boolean create)
        Use this base class method to retrieve a scope context from temporary scope context state that's pushed onto the stack (i.e. the CurrentScopeContext). If this method returns null, each scope definition subclass should use it's normal mechanism for looking up the current scope context.
      • getScope

        public static ScopeContext getScope​(int scopeId)
      • getParentScopes

        public java.util.ArrayList<ScopeDefinition> getParentScopes()
      • getScopeDefinition

        public static ScopeDefinition getScopeDefinition​(int scopeId)
      • getActiveScopes

        public static java.util.List<ScopeDefinition> getActiveScopes()
      • lookupName

        public static java.lang.Object lookupName​(java.lang.String typeName)
      • resolveName

        public static java.lang.Object resolveName​(java.lang.String typeName,
                                                   boolean create,
                                                   boolean returnTypes)
      • getScopeByName

        public static ScopeDefinition getScopeByName​(java.lang.String scopeName)
      • getScopeByType

        public static ScopeDefinition getScopeByType​(java.lang.Object pageType)
      • getScopeInstanceOfType

        public static java.lang.Object getScopeInstanceOfType​(java.lang.Object pageType)
      • matchesScope

        public boolean matchesScope​(java.lang.String scopeName)
      • registerInstance

        public void registerInstance​(java.lang.String typeName,
                                     java.lang.Object inst)
      • getExternalName

        public java.lang.String getExternalName()
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • isGlobal

        public boolean isGlobal()
      • isTemporary

        public boolean isTemporary()
        True for scopes like 'request' that only live for the duration of the operation.
      • getDescription

        public java.lang.String getDescription()
      • initScopes

        public static void initScopes()
        Initialize the scopes that are always available