Interface PerspectiveElement
-
- All Superinterfaces:
AuditingContext
,LoggingContext
,PropertyTreeOwner
- All Known Subinterfaces:
Component
,InternalSession
,Page
,Session
,View
- All Known Implementing Classes:
AbstractSession
,ComponentModel
,DesignerComponentModel
,DesignerPageModel
,DesignerViewModel
,PageModel
,PerspectiveDesignSession
,PerspectiveProjectSession
,SecuredPerspectiveProjectSession
,SessionKernelWrapper
,ViewModel
public interface PerspectiveElement extends PropertyTreeOwner, LoggingContext, AuditingContext
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description PropertyReference
createPropertyReference(java.lang.String referencePath, java.util.function.Consumer<PropertyTreeChangeEvent> subscriber, java.util.Set<Origin> acceptableOrigins)
Create aPropertyReference
with thisPerspectiveElement
as the target.default java.util.Optional<AuditProfile>
getAuditProfile()
java.lang.String
getName()
Page
getPage()
default java.lang.String
getQualifiedPath()
Session
getSession()
View
getView()
-
Methods inherited from interface com.inductiveautomation.perspective.gateway.api.AuditingContext
audit, getAuditSnapshot
-
Methods inherited from interface com.inductiveautomation.perspective.gateway.api.LoggingContext
getLogger, getMdcParent, mdc, mdcSetup, mdcSetupTree, mdcTeardown, mdcTeardownTree, mdcWrap
-
Methods inherited from interface com.inductiveautomation.perspective.gateway.api.PropertyTreeOwner
getPropertyTreeOf
-
-
-
-
Method Detail
-
getName
java.lang.String getName()
- 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
default java.lang.String getQualifiedPath()
- 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.
-
getView
@Nullable View getView()
- Returns:
- The view within which this element exists, or null if this is a Page or Session
-
getPage
@Nullable Page getPage()
- Returns:
- The Page that this element is part of. Will return null if this is the Session
-
getSession
@Nonnull Session getSession()
- Returns:
- The session that this element is a part of.
-
createPropertyReference
@Nonnull PropertyReference createPropertyReference(java.lang.String referencePath, java.util.function.Consumer<PropertyTreeChangeEvent> subscriber, java.util.Set<Origin> acceptableOrigins)
Create aPropertyReference
with thisPerspectiveElement
as the target.- Parameters:
referencePath
- the path to the propertysubscriber
- the subscriber - aConsumer
ofPropertyTreeChangeEvent
sacceptableOrigins
- theSet
ofOrigin
s in which the subscriber is interested- Returns:
- the
PropertyReference
-
getAuditProfile
@Nonnull default java.util.Optional<AuditProfile> getAuditProfile()
- Specified by:
getAuditProfile
in interfaceAuditingContext
- Returns:
- an
Optional
containing theAuditProfile
for this context or an emptyOptional
if no audit profile is set
-
-