Class AbstractProject
- java.lang.Object
-
- com.inductiveautomation.ignition.common.project.AbstractProject
-
- All Implemented Interfaces:
Project
,java.io.Serializable
- Direct Known Subclasses:
DesignerProjectTreeImpl
,RuntimeProject
public abstract class AbstractProject extends java.lang.Object implements Project
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.inductiveautomation.ignition.common.project.Project
EDGE_PROJECT_NAME, GLOBAL_PROJECT_NAME, PIPELINE_PROJECT_NAME, PROJECT_NAME_PATTERN, SFC_PROJECT_NAME
-
-
Constructor Summary
Constructors Constructor Description AbstractProject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProjectResourceListener(ProjectResourceListener listener)
Adds a listener for specific types of project resource changes.java.lang.String
getDescription()
protected java.util.Map<ResourcePath,ProjectResource>
getEffectiveResources()
protected java.util.concurrent.CopyOnWriteArrayList<ProjectResourceListener>
getListeners()
java.util.Optional<java.lang.String>
getParent()
java.util.List<ProjectResource>
getResources()
Get the effectiveProjectResource
s for this project.java.util.List<ProjectResource>
getResourcesOfType(ResourceType type)
java.lang.String
getTitle()
boolean
isEnabled()
boolean
isInheritable()
boolean
isRunnable()
void
removeProjectResourceListener(ProjectResourceListener listener)
Removes an existing listener.protected ProjectDiff
updateEffectiveState()
Call this after one or more resources or manifests have been changed.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.inductiveautomation.ignition.common.project.Project
browse, getAllResources, getManifest, getName, getProjectInheritanceStructure, getProjectSnapshots, getResource, getResource, getSingletonResource
-
-
-
-
Method Detail
-
getListeners
protected java.util.concurrent.CopyOnWriteArrayList<ProjectResourceListener> getListeners()
-
getEffectiveResources
protected java.util.Map<ResourcePath,ProjectResource> getEffectiveResources()
-
getResources
public java.util.List<ProjectResource> getResources()
Description copied from interface:Project
Get the effectiveProjectResource
s 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
ResourceFilter
used to load this project instance, this may not include all resource types that are actually part of this project.- Specified by:
getResources
in interfaceProject
- Returns:
- the effective
ProjectResource
s for this project.
-
updateEffectiveState
protected ProjectDiff updateEffectiveState()
Call this after one or more resources or manifests have been changed. This will calculate the effective change to the resources and notify listeners.
-
getResourcesOfType
public java.util.List<ProjectResource> getResourcesOfType(ResourceType type)
Description copied from interface:Project
Get all non-folderProjectResource
s of typetype
belonging to the module identified bymoduleId
.Resource types belonging to the Ignition platform are identified by module id "ignition".
- Specified by:
getResourcesOfType
in interfaceProject
- Parameters:
type
- the resource type.- Returns:
- all non-folder
ProjectResource
s of typetype
belonging to the module identified bymoduleId
. - See Also:
Project.getResources()
,ProjectResource.PLATFORM_MODULE_ID
-
addProjectResourceListener
public void addProjectResourceListener(ProjectResourceListener listener)
Description copied from interface:Project
Adds a listener for specific types of project resource changes.- Specified by:
addProjectResourceListener
in interfaceProject
- Parameters:
listener
- theProjectResourceListener
to add.
-
removeProjectResourceListener
public void removeProjectResourceListener(ProjectResourceListener listener)
Description copied from interface:Project
Removes an existing listener. If not added, no-op.- Specified by:
removeProjectResourceListener
in interfaceProject
- Parameters:
listener
- theProjectResourceListener
to remove.
-
getTitle
public java.lang.String getTitle()
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescription
in interfaceProject
- Returns:
- the description of this Project.
-
getParent
public java.util.Optional<java.lang.String> getParent()
-
isEnabled
public boolean isEnabled()
-
isInheritable
public boolean isInheritable()
- Specified by:
isInheritable
in interfaceProject
- Returns:
true
if this Project is inheritable.
-
isRunnable
public boolean isRunnable()
- Specified by:
isRunnable
in interfaceProject
- Returns:
true
if this Project is "runnable", i.e. it's enabled and not inheritable (abstract).
-
-