Class ViewModel

    • Constructor Detail

      • ViewModel

        public ViewModel​(@Nonnull
                         PageModel page,
                         ViewInstanceId id,
                         ViewConfig config,
                         com.inductiveautomation.ignition.common.gson.JsonObject inputParams)
    • Method Detail

      • getBirthDate

        public long getBirthDate()
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface PerspectiveElement
        Returns:
        The name of the element. If this is a component, it will be the name of the component. If this is a View, the name will be "view". If this is a Page, the name will be "page". If this is the session, the name will be "session".
      • getQualifiedPath

        public java.lang.String getQualifiedPath()
        Specified by:
        getQualifiedPath in interface PerspectiveElement
        Returns:
        The qualified name of the element. If session or page, this is just the name. If a view or component, is the logical path starting at the view id.
      • getViewEventBus

        public com.google.common.eventbus.EventBus getViewEventBus()
        Specified by:
        getViewEventBus in interface View
      • newActionHandler

        protected com.inductiveautomation.perspective.gateway.model.ActionCollection newActionHandler​(EventConfig config)
      • setAbandonedViewTimeout

        public void setAbandonedViewTimeout​(java.util.concurrent.ScheduledFuture<?> newTimeout)
      • setBirthDate

        public void setBirthDate​(long birthDate)
      • hasAbandonedViewTimeout

        public boolean hasAbandonedViewTimeout()
      • restart

        public void restart​(com.inductiveautomation.ignition.common.gson.JsonObject params)
      • refreshBinding

        public void refreshBinding​(PropertyKey property)
      • onEventFired

        public void onEventFired​(EventFiredMsg message)
      • getView

        public ViewModel getView()
        Specified by:
        getView in interface PerspectiveElement
        Returns:
        The view within which this element exists, or null if this is a Page or Session
      • getPage

        public Page getPage()
        Specified by:
        getPage in interface PerspectiveElement
        Returns:
        The Page that this element is part of. Will return null if this is the Session
      • mdcTeardown

        public void mdcTeardown()
        Description copied from interface: LoggingContext
        Tear down the MDC keys that are added in #mdcSetup
        Specified by:
        mdcTeardown in interface LoggingContext
      • findChildByIndexLocation

        public java.util.Optional<PerspectiveElement> findChildByIndexLocation​(java.lang.String indexLocation)
        Description copied from interface: View
        Tries to look up a component by its index location. Some examples:
      • "": returns the view
      • "0": returns the root container
      • "0:4" returns a child of the root container at index 4
Specified by:
findChildByIndexLocation in interface View
Specified by:
findChildByPath in interface View