Class PerspectiveDesignSession

    • Method Detail

      • newPage

        @Nonnull
        protected DesignerPageModel newPage​(@Nonnull
                                            java.lang.String pageId)
        Overrides:
        newPage in class AbstractSession<com.inductiveautomation.perspective.gateway.session.PerspectiveDesignSession.SessionKernelImpl>
      • maybeScheduleReaper

        protected void maybeScheduleReaper()
        Description copied from class: AbstractSession
        Call this when it's possible the last page has been closed. The session will then schedule the reaper to close the session itself (runtime sessions only, designer sessions don't reap in this way)
        Specified by:
        maybeScheduleReaper in class AbstractSession<com.inductiveautomation.perspective.gateway.session.PerspectiveDesignSession.SessionKernelImpl>
      • logout

        @Nonnull
        public java.util.Optional<java.lang.String> logout()
        Always throws UnsupportedOperationException - it is a mistake if a code path reaches this method
        Returns:
        a logout token or hint for the IdP if one is available
      • onLoginResponse

        public void onLoginResponse​(@Nonnull
                                    WebAuthResponseContext webAuthResponseContext)
        Always throws UnsupportedOperationException - it is a mistake if a code path reaches this method
        Parameters:
        webAuthResponseContext - the login response object
      • onLogoutResponse

        public void onLogoutResponse​(@Nonnull
                                     WebAuthResponseContext webAuthResponseContext)
        Always throws UnsupportedOperationException - it is a mistake if a code path reaches this method
        Parameters:
        webAuthResponseContext - the logout response object
      • findViewConfig

        public java.util.concurrent.CompletableFuture<java.util.Optional<ViewConfig>> findViewConfig​(java.lang.String viewResourcePath)
        Description copied from interface: Session
        Returns a CompletableFuture that completes to present an Optional<ViewConfig> for the specified path. The use of the future is to allow for the asynch collection of configs for views which are retrieved via asynchronous processes, as is the case when a view is being edited/altered in the designer.
        Parameters:
        viewResourcePath - path to the view's project resource within the project being run.
      • getTagManager

        public TagManager getTagManager()
      • getScriptManager

        @Nonnull
        public ScriptManager getScriptManager()
      • onDesignerNamedQueriesChange

        public void onDesignerNamedQueriesChange​(java.util.Map<java.lang.String,​NamedQuery> namedQueryMap)
      • close

        public void close​(@Nullable
                          java.lang.String message)
        Description copied from interface: Session
        Destroys this session and moves clients to a terminal state of closed
        Parameters:
        message - the message displayed to the client on the terminal state page
      • closePage

        public void closePage​(java.lang.String pageId,
                              @Nullable
                              java.lang.String message)
        Description copied from interface: InternalSession
        Shuts down and removes the page associated with the given page ID which will disconnect the associated message channel (if one is connected). Moves the client to a terminal state page of closed with the given message.
        Specified by:
        closePage in interface InternalSession
        Overrides:
        closePage in class AbstractSession<com.inductiveautomation.perspective.gateway.session.PerspectiveDesignSession.SessionKernelImpl>
        Parameters:
        pageId - the page ID associated with the target page
        message - the message displayed to the client on the terminal state page
      • sendErrorToDesigner

        public void sendErrorToDesigner​(java.lang.String message,
                                        java.lang.Throwable throwable)
        Description copied from interface: Session
        Pipes the error message down to the designer (or no-op if this is a client)