Class ProjectConfig
java.lang.Object
com.inductiveautomation.perspective.gateway.config.ProjectConfig
- Direct Known Subclasses:
ProjectDiff
The ProjectConfig class is
Gson serializable model used by the gateway to represent a
saveable Perspective client state for a given Perspective module Project.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCustom Gson serializer for ProjectConfig that properly handles the componentResources field. -
Field Summary
FieldsModifier and TypeFieldDescriptionlongAll the view config objects associated with this project. -
Constructor Summary
ConstructorsConstructorDescriptionProjectConfig(ResourceCollection project, Map<String, ViewConfig> views, PermissionsConfig permissions, PerspectiveProjectProps projectProps, PagesConfig pageConfig, SessionPropsConfig sessionProps, IdleTimeoutProps idleProps, SymbolPropConfig symbolProps, Map<String, KeyEvent> keyEvents, ComponentRegistry componentRegistry, OfflineModeConfig offlineModeConfig) ProjectConfig(String projectName, String projectTitle, String projectDescription, Map<String, ViewConfig> views, PermissionsConfig permissions, PerspectiveProjectProps projectProps, PagesConfig pageConfig, SessionPropsConfig sessionProps, IdleTimeoutProps idleProps, SymbolPropConfig symbolProps, Map<String, KeyEvent> keyEvents, ComponentRegistry componentRegistry, LastModification lastModification, OfflineModeConfig offlineModeConfig) -
Method Summary
Modifier and TypeMethodDescriptionReturns the list of browser resources required by all components used in this project's views.static Optional<LastModification>getLastModification(ResourceCollection project)
-
Field Details
-
name
-
title
-
description
-
lastModified
public long lastModified -
lastModifiedBy
-
views
All the view config objects associated with this project. This is a complete list at the time of startup, and includes configuration objects for views that may not be currently active/instantiated on the client side. -
permissions
-
props
-
pageConfig
-
sessionProps
-
idleProps
-
symbolProps
-
keyEvents
-
offlineModeConfig
-
-
Constructor Details
-
ProjectConfig
public ProjectConfig() -
ProjectConfig
public ProjectConfig(ResourceCollection project, Map<String, ViewConfig> views, PermissionsConfig permissions, PerspectiveProjectProps projectProps, PagesConfig pageConfig, SessionPropsConfig sessionProps, IdleTimeoutProps idleProps, SymbolPropConfig symbolProps, Map<String, KeyEvent> keyEvents, ComponentRegistry componentRegistry, OfflineModeConfig offlineModeConfig) -
ProjectConfig
public ProjectConfig(String projectName, String projectTitle, String projectDescription, Map<String, ViewConfig> views, PermissionsConfig permissions, PerspectiveProjectProps projectProps, PagesConfig pageConfig, SessionPropsConfig sessionProps, IdleTimeoutProps idleProps, SymbolPropConfig symbolProps, Map<String, KeyEvent> keyEvents, ComponentRegistry componentRegistry, LastModification lastModification, OfflineModeConfig offlineModeConfig)
-
-
Method Details
-
findView
-
getLastModification
@Nonnull public static Optional<LastModification> getLastModification(@Nonnull ResourceCollection project) -
getComponentResources
Returns the list of browser resources required by all components used in this project's views.Resource building is lazily computed and memoized using
Suppliers.memoize(com.google.common.base.Supplier<T>)to ensure all modules have completed their startup phase and registered their components with the ComponentRegistry. Building resources eagerly in the constructor can result in missing component descriptors if custom modules haven't finished initialization yet.- Returns:
- ordered list of browser resources with dependencies topologically sorted
-