Class PerspectiveDesignSession
- java.lang.Object
- 
- com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
- 
- com.inductiveautomation.perspective.gateway.session.SessionKernelWrapper<T>
- 
- com.inductiveautomation.perspective.gateway.session.AbstractSession<com.inductiveautomation.perspective.gateway.session.PerspectiveDesignSession.SessionKernelImpl>
- 
- com.inductiveautomation.perspective.gateway.session.PerspectiveDesignSession
 
 
 
 
- 
- All Implemented Interfaces:
- AuditingContext,- LoggingContext,- PerspectiveElement,- PropertyTreeOwner,- Session,- InternalSession,- SessionKernel
 
 public class PerspectiveDesignSession extends AbstractSession<com.inductiveautomation.perspective.gateway.session.PerspectiveDesignSession.SessionKernelImpl> Implementation ofAbstractSessionwhich is used when the Ignition Designer is creating, running, and previewing Perspective Views. Created by pjones on 4/17/17.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface com.inductiveautomation.perspective.gateway.session.InternalSessionInternalSession.PageVisitor
 - 
Nested classes/interfaces inherited from interface com.inductiveautomation.perspective.gateway.api.SessionSession.WebAuthStatusChangeEvent
 
- 
 - 
Field Summary- 
Fields inherited from class com.inductiveautomation.perspective.gateway.session.AbstractSessionbindings, changeScripts, handlers, pages, props
 - 
Fields inherited from interface com.inductiveautomation.perspective.gateway.session.InternalSessionSESSION
 
- 
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidalter(PropertyConfigChange change)voidclose(java.lang.String message)Destroys this session and moves clients to a terminal state of closedvoidclosePage(java.lang.String pageId, java.lang.String message)Shuts down and removes the page associated with the given page ID which will disconnect the associated message channel (if one is connected).protected PropertyTreePermissionModelcreatePermissionModel(PropertyType scope, PropertyConfigCollection config)DesignerPropertyReferencecreatePropertyReference(java.lang.String referencePath, java.util.function.Consumer<PropertyTreeChangeEvent> subscriber, java.util.Set<Origin> acceptableOrigins)Create aPropertyReferencewith thisPerspectiveElementas the target.ViewModelcreateViewModel(PageModel group, ViewInstanceId id, ViewConfig config, com.inductiveautomation.ignition.common.gson.JsonObject params)java.util.concurrent.CompletableFuture<java.util.Optional<ViewConfig>>findViewConfig(java.lang.String viewResourcePath)Returns aCompletableFuturethat completes to present anOptional<ViewConfig> for the specified path.AuditContext.BuildergetAuditSnapshot()NamedQueryManagergetNamedQueryManager()ScriptManagergetScriptManager()TagHistoryManagergetTagHistoryManager()TagManagergetTagManager()WebAuthStatusgetWebAuthStatus()java.util.Optional<java.lang.String>logout(java.lang.String message)Always throwsUnsupportedOperationException- it is a mistake if a code path reaches this methodprotected voidmaybeScheduleReaper()Call this when it's possible the last page has been closed.protected DesignerPageModelnewPage(java.lang.String pageId)voidonDesignerNamedQueriesChange(java.util.Map<java.lang.String,NamedQuery> namedQueryMap)voidonLoginResponse(WebAuthResponseContext webAuthResponseContext)Always throwsUnsupportedOperationException- it is a mistake if a code path reaches this methodvoidonLogoutResponse(WebAuthResponseContext webAuthResponseContext)Always throwsUnsupportedOperationException- it is a mistake if a code path reaches this methodvoidsendErrorToDesigner(java.lang.String message, java.lang.Throwable throwable)Pipes the error message down to the designer (or no-op if this is a client)- 
Methods inherited from class com.inductiveautomation.perspective.gateway.session.AbstractSessionbroadcast, closePage, findPage, findPropConfig, getBindingCount, getComponentCount, getLocale, getOrCreatePage, getPageCount, getPageReport, getPages, getPropertyTreeOf, getTimeZoneId, getViewCount, initProperties, notifyConnected, notifyDisconnected, onKeepaliveReceived, onSessionInit, receive, refreshBinding, sendSessionKeepalive, updateSessionProps, visitPage
 - 
Methods inherited from class com.inductiveautomation.perspective.gateway.session.SessionKernelWrapperclaimToken, createToken, getEventBus, getEventManager, getGson, getLastComm, getLastMessageTime, getLogger, getLogoutMessage, getPageClosedMessage, getProjectName, getSessionClosedMessage, getSessionCollection, getSessionId, getSessionInfo, getSessionStats, getStartupTime, getUptime, onHello, onShutdown, onStartup, queue, touch
 - 
Methods inherited from class com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycleisRunning, shutdown, startup
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface com.inductiveautomation.perspective.gateway.api.AuditingContextaudit
 - 
Methods inherited from interface com.inductiveautomation.perspective.gateway.session.InternalSessiondestroySession, getPerspectiveContext, getProject, getTimeZone, isRunning, scope, shutdown, startup
 - 
Methods inherited from interface com.inductiveautomation.perspective.gateway.api.LoggingContextmdc, mdcSetupTree, mdcTeardownTree, mdcWrap
 - 
Methods inherited from interface com.inductiveautomation.perspective.gateway.api.PerspectiveElementgetAuditProfile, getQualifiedPath
 - 
Methods inherited from interface com.inductiveautomation.perspective.gateway.api.SessiongetGatewayContext, getMdcParent, getName, getPage, getPageTimeout, getSession, getView, mdcSetup, mdcTeardown
 - 
Methods inherited from interface com.inductiveautomation.perspective.gateway.session.SessionKernelshutdown, startup
 
- 
 
- 
- 
- 
Method Detail- 
alterpublic void alter(PropertyConfigChange change) 
 - 
newPage@Nonnull protected DesignerPageModel newPage(@Nonnull java.lang.String pageId) - Overrides:
- newPagein class- AbstractSession<com.inductiveautomation.perspective.gateway.session.PerspectiveDesignSession.SessionKernelImpl>
 
 - 
createPermissionModelprotected PropertyTreePermissionModel createPermissionModel(PropertyType scope, PropertyConfigCollection config) - Overrides:
- createPermissionModelin class- AbstractSession<com.inductiveautomation.perspective.gateway.session.PerspectiveDesignSession.SessionKernelImpl>
 
 - 
maybeScheduleReaperprotected void maybeScheduleReaper() Description copied from class:AbstractSessionCall 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:
- maybeScheduleReaperin class- AbstractSession<com.inductiveautomation.perspective.gateway.session.PerspectiveDesignSession.SessionKernelImpl>
 
 - 
getWebAuthStatus@Nonnull public WebAuthStatus getWebAuthStatus() - Returns:
- the WebAuthStatusfor thisSession
 
 - 
logout@Nonnull public java.util.Optional<java.lang.String> logout(@Nullable java.lang.String message)Always throwsUnsupportedOperationException- it is a mistake if a code path reaches this method- Parameters:
- message- the message to display to the user after they are logged out of this session
- Returns:
- a logout token or hint for the IdP if one is available
 
 - 
onLoginResponsepublic void onLoginResponse(@Nonnull WebAuthResponseContext webAuthResponseContext)Always throwsUnsupportedOperationException- it is a mistake if a code path reaches this method- Parameters:
- webAuthResponseContext- the login response object
 
 - 
onLogoutResponsepublic void onLogoutResponse(@Nonnull WebAuthResponseContext webAuthResponseContext)Always throwsUnsupportedOperationException- it is a mistake if a code path reaches this method- Parameters:
- webAuthResponseContext- the logout response object
 
 - 
createViewModelpublic ViewModel createViewModel(PageModel group, ViewInstanceId id, ViewConfig config, com.inductiveautomation.ignition.common.gson.JsonObject params) 
 - 
findViewConfigpublic java.util.concurrent.CompletableFuture<java.util.Optional<ViewConfig>> findViewConfig(java.lang.String viewResourcePath) Description copied from interface:SessionReturns aCompletableFuturethat completes to present anOptional<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.
 
 - 
getTagManagerpublic TagManager getTagManager() 
 - 
getTagHistoryManagerpublic TagHistoryManager getTagHistoryManager() 
 - 
getScriptManager@Nonnull public ScriptManager getScriptManager() 
 - 
getNamedQueryManagerpublic NamedQueryManager getNamedQueryManager() 
 - 
createPropertyReference@Nonnull public DesignerPropertyReference createPropertyReference(java.lang.String referencePath, java.util.function.Consumer<PropertyTreeChangeEvent> subscriber, java.util.Set<Origin> acceptableOrigins) Description copied from interface:PerspectiveElementCreate aPropertyReferencewith thisPerspectiveElementas the target.- Parameters:
- referencePath- the path to the property
- subscriber- the subscriber - a- Consumerof- PropertyTreeChangeEvents
- acceptableOrigins- the- Setof- Origins in which the subscriber is interested
- Returns:
- the PropertyReference
 
 - 
onDesignerNamedQueriesChangepublic void onDesignerNamedQueriesChange(java.util.Map<java.lang.String,NamedQuery> namedQueryMap) 
 - 
closepublic void close(@Nullable java.lang.String message)Description copied from interface:SessionDestroys this session and moves clients to a terminal state of closed- Parameters:
- message- the message displayed to the client on the terminal state page
 
 - 
closePagepublic void closePage(java.lang.String pageId, @Nullable java.lang.String message)Description copied from interface:InternalSessionShuts 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:
- closePagein interface- InternalSession
- Overrides:
- closePagein 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
 
 - 
sendErrorToDesignerpublic void sendErrorToDesigner(java.lang.String message, java.lang.Throwable throwable)Description copied from interface:SessionPipes the error message down to the designer (or no-op if this is a client)
 - 
getAuditSnapshot@Nonnull public AuditContext.Builder getAuditSnapshot() - Specified by:
- getAuditSnapshotin interface- AuditingContext
- Overrides:
- getAuditSnapshotin class- SessionKernelWrapper<com.inductiveautomation.perspective.gateway.session.PerspectiveDesignSession.SessionKernelImpl>
- Returns:
- A new, or extended, AuditContext.Builder, with qualified information about the current scope.
 
 
- 
 
-