Class RuntimeProject
java.lang.Object
com.inductiveautomation.ignition.common.project.AbstractProject
com.inductiveautomation.ignition.common.project.RuntimeProject
- All Implemented Interfaces:
- Project,- Serializable
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classstatic classAn EffectiveProjectSnapshot is aProjectSnapshotof a project and its effective resource set plus additional information about what its hierarchy was at the time the snapshot was made.static classstatic class
- 
Field SummaryFields inherited from interface com.inductiveautomation.ignition.common.project.ProjectGLOBAL_PROJECT_NAME, PIPELINE_PROJECT_NAME, PROJECT_NAME_PATTERN, SFC_PROJECT_NAME
- 
Constructor SummaryConstructorsConstructorDescriptionRuntimeProject(List<NamedManifest> projects, Map<ProjectResourceId, ProjectResource> resources) 
- 
Method SummaryModifier and TypeMethodDescriptionapplyChange(List<ProjectDiff.AbsoluteDiff> diffs) browse(ResourcePath path) static RuntimeProjectcreateAndValidate(List<NamedManifest> projects, Map<ProjectResourceId, ProjectResource> resources) diff(RuntimeProject.EffectiveProjectSnapshot effectiveSnapshot) Get aProjectDiffgenerated by diffing anRuntimeProject.EffectiveProjectSnapshotfromgetEffectiveSnapshot()with the current *effective* state of the project.Get a List of all resources in this project and all parent projects.Get theProjectManifestfor this Project.getName()Gets the snapshots from the effective project, in order of project inheritance (leaf project last)getResource(ResourcePath path) Finds the resource at the given path, using an effective view of the resources in this project chain.validate()Validate thisRuntimeProjectby following inheritable project projects until a root is found.Validate thisRuntimeProjectby following inheritable parent projects until a root is found.Methods inherited from class com.inductiveautomation.ignition.common.project.AbstractProjectaddProjectResourceListener, getEffectiveResources, getListeners, getResources, getResourcesOfType, hasResourcesOfType, removeProjectResourceListener, updateEffectiveStateMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.inductiveautomation.ignition.common.project.ProjectgetDescription, getParent, getResource, getSingletonResource, getTitle, isEnabled, isInheritable, isRunnable
- 
Constructor Details- 
RuntimeProjectpublic RuntimeProject(@Nonnull List<NamedManifest> projects, @Nonnull Map<ProjectResourceId, ProjectResource> resources) 
 
- 
- 
Method Details- 
createAndValidatepublic static RuntimeProject createAndValidate(@Nonnull List<NamedManifest> projects, @Nonnull Map<ProjectResourceId, ProjectResource> resources) throws ProjectInvalidException- Parameters:
- projects- the list of- NamedManifests that comprise the project hierarchy.
- resources- the- ProjectResources for this project.
- Returns:
- a validated RuntimeProject.
- Throws:
- ProjectInvalidException- if validation fails.
- See Also:
 
- 
validateValidate thisRuntimeProjectby following inheritable project projects until a root is found.- Returns:
- an Optionalcontaining thisRuntimeProjectinstance if it was validated.
 
- 
validateOrThrowValidate thisRuntimeProjectby following inheritable parent projects until a root is found.- Returns:
- this RuntimeProjectinstance.
- Throws:
- ProjectInvalidException- if the project hierarchy is invalid.
 
- 
getName- Returns:
- the name of this Project.
 
- 
getManifestDescription copied from interface:ProjectGet theProjectManifestfor this Project.- Returns:
- the ProjectManifestfor this Project.
 
- 
getProjectInheritanceStructure- Returns:
- A list of all of the projects and their manifests that comprise the inheritance chain of this project. This list is ordered in ascending inheritance order, from leaf project first to super-most project last.
 
- 
getAllResourcesDescription copied from interface:ProjectGet a List of all resources in this project and all parent projects.This includes resources belonging to parent projects in the inheritance chain if this is a "stack" of projects. This means that there may be multiple resources for any given ResourcePath.This project instance may not contain all resources that exist for the project on disk, depending on the ResourceFilterused to load it.- Returns:
- all the resources belonging to this project instance, including resources from parent projects.
 
- 
getResourceDescription copied from interface:ProjectFinds the resource at the given path, using an effective view of the resources in this project chain.- Parameters:
- path- Not null
- Returns:
- The matching project resource or empty if not found.
 
- 
browse- Parameters:
- path- the resourcePath of the folder to browse
- Returns:
- an empty optional if the given path was not found or is not browseable, otherwise its direct children
 
- 
getProjectSnapshotsDescription copied from interface:ProjectGets the snapshots from the effective project, in order of project inheritance (leaf project last)- Returns:
- A list of ProjectSnapshots, one per project represented in the effective project.
 
- 
applyChange
- 
getEffectiveSnapshotGet anRuntimeProject.EffectiveProjectSnapshot.This snapshot can be used with diff(EffectiveProjectSnapshot)at some later time to obtain aProjectDiffdescribing what has changed.- Returns:
- an effective RuntimeProject.EffectiveProjectSnapshot.
 
- 
diffpublic ProjectDiff.EffectiveDiff diff(RuntimeProject.EffectiveProjectSnapshot effectiveSnapshot) throws RuntimeProject.DiffException Get aProjectDiffgenerated by diffing anRuntimeProject.EffectiveProjectSnapshotfromgetEffectiveSnapshot()with the current *effective* state of the project.- Parameters:
- effectiveSnapshot- an- RuntimeProject.EffectiveProjectSnapshotfrom- getEffectiveSnapshot().
- Returns:
- a ProjectDiff.
- Throws:
- RuntimeProject.DiffException- if the diff cannot be completed because the project hierarchy changed since the snapshot was taken.
 
 
-