Class ProjectLifecycle
- java.lang.Object
-
- com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
-
- com.inductiveautomation.ignition.gateway.project.ProjectLifecycle
-
public abstract class ProjectLifecycle extends AbstractLifecycle
-
-
Constructor Summary
Constructors Constructor Description ProjectLifecycle(RuntimeProject project)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description RuntimeProjectgetProject()protected voidonAfterChanges()Called after a series of calls to the resource modification methods is complete.protected voidonBeforeChanges()Called before a series of calls to the resource modification methods begins.protected voidonManifestChanged(ProjectManifest manifest)TheProjectManifestfor the Project managed by this lifecycle has changed.protected abstract voidonResourcesCreated(java.util.List<ProjectResource> resources)Resources matching the interests of this lifecycle were created.protected abstract voidonResourcesDeleted(java.util.List<ProjectResourceId> resourceIds)Resources matching the interests of this lifecycle were deleted.protected abstract voidonResourcesModified(java.util.List<ProjectResource> resources)Resources matching the interests of this lifecycle were modified.protected voidonShutdown()protected abstract voidonShutdown(java.util.List<ProjectResourceId> resourceIds)Shut down thisProjectLifecycle.protected voidonStartup()protected abstract voidonStartup(java.util.List<ProjectResource> resources)Start thisProjectLifecycle.-
Methods inherited from class com.inductiveautomation.ignition.common.lifecycle.AbstractLifecycle
isRunning, shutdown, startup
-
-
-
-
Constructor Detail
-
ProjectLifecycle
public ProjectLifecycle(RuntimeProject project)
-
-
Method Detail
-
onStartup
protected final void onStartup()
- Specified by:
onStartupin classAbstractLifecycle
-
onShutdown
protected final void onShutdown()
- Specified by:
onShutdownin classAbstractLifecycle
-
getProject
public final RuntimeProject getProject()
-
onStartup
protected abstract void onStartup(java.util.List<ProjectResource> resources)
Start thisProjectLifecycle.- Parameters:
resources- initial list of resources that match the scope and type interests of this lifecycle.
-
onShutdown
protected abstract void onShutdown(java.util.List<ProjectResourceId> resourceIds)
Shut down thisProjectLifecycle.- Parameters:
resourceIds- list ofProjectResourceIds that match the scope and type interests of this lifecycle.
-
onBeforeChanges
protected void onBeforeChanges()
Called before a series of calls to the resource modification methods begins.
-
onAfterChanges
protected void onAfterChanges()
Called after a series of calls to the resource modification methods is complete.
-
onManifestChanged
protected void onManifestChanged(ProjectManifest manifest)
TheProjectManifestfor the Project managed by this lifecycle has changed.- Parameters:
manifest- the updatedProjectManifest.
-
onResourcesCreated
protected abstract void onResourcesCreated(java.util.List<ProjectResource> resources)
Resources matching the interests of this lifecycle were created.This is a chance for subclasses to do something of interest with these new resources, e.g. "run" them.
- Parameters:
resources-ProjectResources matching the interests of this lifecycle.
-
onResourcesModified
protected abstract void onResourcesModified(java.util.List<ProjectResource> resources)
Resources matching the interests of this lifecycle were modified.This is a chance for subclasses to do something of interest with these modified resources, e.g. stop "running" something based on the old resource and start "running" something based on the newly modified resource.
- Parameters:
resources-ProjectResources matching the interests of this lifecycle.
-
onResourcesDeleted
protected abstract void onResourcesDeleted(java.util.List<ProjectResourceId> resourceIds)
Resources matching the interests of this lifecycle were deleted.This is a chance for subclasses to do something of interest with these deleted resources, e.g. stop "running" something based on the resource.
- Parameters:
resourceIds-ProjectResourceIds matching the interests of this lifecycle.
-
-