Interface Project
- 
- All Superinterfaces:
- java.io.Serializable
 - All Known Subinterfaces:
- DesignableProject
 - All Known Implementing Classes:
- AbstractProject,- DesignerProjectTreeImpl,- RuntimeProject
 
 public interface Project extends java.io.Serializable
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringGLOBAL_PROJECT_NAMEThe name given to the project created to hold "global" resources on upgrade to 8.0.static java.lang.StringPIPELINE_PROJECT_NAMEThe name given to the project created to hold Alarm Pipelines on upgrade to 8.0.static java.lang.StringPROJECT_NAME_PATTERNA regex representing a valid project name.static java.lang.StringSFC_PROJECT_NAMEThe name given to the project created to hold run-always SFCs on upgrade to 8.0.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddProjectResourceListener(ProjectResourceListener listener)Adds a listener for specific types of project resource changes.java.util.Optional<java.util.List<ProjectResource>>browse(ResourcePath path)java.util.Map<ProjectResourceId,ProjectResource>getAllResources()Get a List of all resources in this project and all parent projects.default java.lang.StringgetDescription()ProjectManifestgetManifest()Get theProjectManifestfor this Project.java.lang.StringgetName()default java.util.Optional<java.lang.String>getParent()java.util.List<NamedManifest>getProjectInheritanceStructure()java.util.List<ProjectSnapshot>getProjectSnapshots()Gets the snapshots from the effective project, in order of project inheritance (leaf project last)default java.util.Optional<ProjectResource>getResource(ProjectResourceId id)Finds the resource at the given id.java.util.Optional<ProjectResource>getResource(ResourcePath id)Finds the resource at the given path, using an effective view of the resources in this project chain.java.util.List<ProjectResource>getResources()Get the effectiveProjectResources for this project.java.util.List<ProjectResource>getResourcesOfType(ResourceType type)default java.util.Optional<ProjectResource>getSingletonResource(ResourceType type)Convenience method to find a "singleton" project resource, which is a project resource that has no name or path, of which there can only exist zero or one in any given project.default java.lang.StringgetTitle()booleanhasResourcesOfType(ResourceType type)Short-circuiting evaluation of whether project has any resources of given type.default booleanisEnabled()default booleanisInheritable()default booleanisRunnable()voidremoveProjectResourceListener(ProjectResourceListener listener)Removes an existing listener.
 
- 
- 
- 
Field Detail- 
PROJECT_NAME_PATTERNstatic final java.lang.String PROJECT_NAME_PATTERN A regex representing a valid project name.Note: this pattern is only used to validate project names created via UI. It does not mean projects will always have a name that matches this pattern. A project can technically have any name that is valid on the filesystem, including spaces, special characters, unicode, etc... - See Also:
- Constant Field Values
 
 - 
GLOBAL_PROJECT_NAMEstatic final java.lang.String GLOBAL_PROJECT_NAME The name given to the project created to hold "global" resources on upgrade to 8.0.- See Also:
- Constant Field Values
 
 - 
PIPELINE_PROJECT_NAMEstatic final java.lang.String PIPELINE_PROJECT_NAME The name given to the project created to hold Alarm Pipelines on upgrade to 8.0.- See Also:
- Constant Field Values
 
 - 
SFC_PROJECT_NAMEstatic final java.lang.String SFC_PROJECT_NAME The name given to the project created to hold run-always SFCs on upgrade to 8.0.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getNamejava.lang.String getName() - Returns:
- the name of this Project.
 
 - 
getManifestProjectManifest getManifest() Get theProjectManifestfor this Project.- Returns:
- the ProjectManifestfor this Project.
 
 - 
getTitledefault java.lang.String getTitle() - Returns:
- the title of this Project, or the name of the project if the title is not set.
 
 - 
getDescriptiondefault java.lang.String getDescription() - Returns:
- the description of this Project.
 
 - 
getParentdefault java.util.Optional<java.lang.String> getParent() - Returns:
- the name of the parent Project, if one exists.
 
 - 
isEnableddefault boolean isEnabled() - Returns:
- trueif this Project is enabled.
 
 - 
isInheritabledefault boolean isInheritable() - Returns:
- trueif this Project is inheritable.
 
 - 
isRunnabledefault boolean isRunnable() - Returns:
- trueif this Project is "runnable", i.e. it's enabled and not inheritable (abstract).
 
 - 
getResourcedefault java.util.Optional<ProjectResource> getResource(ProjectResourceId id) Finds the resource at the given id.- Parameters:
- id- Not null
- Returns:
- The matching project resource or empty if not found.
 
 - 
getResourcejava.util.Optional<ProjectResource> getResource(ResourcePath id) Finds the resource at the given path, using an effective view of the resources in this project chain.- Parameters:
- id- Not null
- Returns:
- The matching project resource or empty if not found.
 
 - 
getSingletonResourcedefault java.util.Optional<ProjectResource> getSingletonResource(ResourceType type) Convenience method to find a "singleton" project resource, which is a project resource that has no name or path, of which there can only exist zero or one in any given project. Shortcut for getResource(new ProjectResourceId(type, null, getName()))
 - 
getResourcesjava.util.List<ProjectResource> getResources() Get the effectiveProjectResources for this project.This includes inherited resources from parent projects, recursively, except where resources in child projects override resources by the same name from parent projects. In other words, for any given ResourcePath, only the resource "closest" to this project in the inheritance chain will be included in this list.Note that depending on the ResourceFilterused to load this project instance, this may not include all resource types that are actually part of this project.- Returns:
- the effective ProjectResources for this project.
 
 - 
getResourcesOfTypejava.util.List<ProjectResource> getResourcesOfType(ResourceType type) Get all non-folderProjectResources of typetypebelonging to the module identified bymoduleId.Resource types belonging to the Ignition platform are identified by module id "ignition". - Parameters:
- type- the resource type.
- Returns:
- all non-folder ProjectResources of typetypebelonging to the module identified bymoduleId.
- See Also:
- getResources(),- ProjectResource.PLATFORM_MODULE_ID
 
 - 
hasResourcesOfTypeboolean hasResourcesOfType(ResourceType type) Short-circuiting evaluation of whether project has any resources of given type.- Parameters:
- type- the resource type.
- Returns:
- trueif the project contains at least one resource of the given type.- See also: - ProjectLifecycleFactory#getProjectFilter()
- See Also:
- getResourcesOfType(ResourceType)
 
 - 
getAllResourcesjava.util.Map<ProjectResourceId,ProjectResource> getAllResources() Get 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.
 
 - 
getProjectInheritanceStructurejava.util.List<NamedManifest> 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.
 
 - 
getProjectSnapshotsjava.util.List<ProjectSnapshot> getProjectSnapshots() Gets 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.
 
 - 
browsejava.util.Optional<java.util.List<ProjectResource>> browse(@Nonnull ResourcePath path) - 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
 
 - 
addProjectResourceListenervoid addProjectResourceListener(ProjectResourceListener listener) Adds a listener for specific types of project resource changes.- Parameters:
- listener- the- ProjectResourceListenerto add.
 
 - 
removeProjectResourceListenervoid removeProjectResourceListener(ProjectResourceListener listener) Removes an existing listener. If not added, no-op.- Parameters:
- listener- the- ProjectResourceListenerto remove.
 
 
- 
 
-