Class AbstractTaskType
- java.lang.Object
-
- com.inductiveautomation.ignition.gateway.tasks.AbstractTaskType
-
- All Implemented Interfaces:
TaskType
,java.io.Serializable
public abstract class AbstractTaskType extends java.lang.Object implements TaskType
An abstract implementation of TaskType that handles the storage of the basic traits defined by the interface.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractTaskType(java.lang.String ownerId, java.lang.String typeId, java.lang.String bundleKey, boolean canCancel, boolean canSuspend)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canCancel()
Returns whether or not the task can be canceled.boolean
canSuspend()
Returns whether or not the task supports suspending and resuming.protected <T> T
findProfileSettingsRecord(GatewayContext context, PersistentRecord taskRecord)
Convenience function for looking up the task's type-specific settings.java.lang.String
getBaseBundleKey()
Returns a base Bundle key for this type.LocalizedString
getOwnerName()
Shortcut for baseBundleKey.OwnerLocalizedString
getTypeName()
Shortcut for baseBundleKey.typeId.Namejava.lang.String
ownerId()
Tasks are organized by owner, and can be displayed for selection based on owner.java.lang.String
typeId()
A name/id for the task type that identifies it relative to the owner.-
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.gateway.tasks.TaskType
buildWizardModel, createInstance, fullId, getSettingsRecordForeignKey, getSettingsRecordType, isPrivate
-
-
-
-
Method Detail
-
ownerId
public java.lang.String ownerId()
Description copied from interface:TaskType
Tasks are organized by owner, and can be displayed for selection based on owner. This string is a constant that is used to group tasks from the same owner.
-
typeId
public java.lang.String typeId()
Description copied from interface:TaskType
A name/id for the task type that identifies it relative to the owner. The combination of "ownerid" and "typeid" are used to identify particular tasks.
-
getBaseBundleKey
public java.lang.String getBaseBundleKey()
Description copied from interface:TaskType
Returns a base Bundle key for this type. "Base" means that the task specific keys are under "base.typeid". Overall, the following keys are expected: Owner - Owner description typeid.Name - the name of the task. typeid.Desc - the description of the task typeid.Category - the category for the task- Specified by:
getBaseBundleKey
in interfaceTaskType
-
getOwnerName
public LocalizedString getOwnerName()
Description copied from interface:TaskType
Shortcut for baseBundleKey.Owner- Specified by:
getOwnerName
in interfaceTaskType
-
getTypeName
public LocalizedString getTypeName()
Description copied from interface:TaskType
Shortcut for baseBundleKey.typeId.Name- Specified by:
getTypeName
in interfaceTaskType
-
canCancel
public boolean canCancel()
Description copied from interface:TaskType
Returns whether or not the task can be canceled.
-
canSuspend
public boolean canSuspend()
Description copied from interface:TaskType
Returns whether or not the task supports suspending and resuming.- Specified by:
canSuspend
in interfaceTaskType
-
findProfileSettingsRecord
protected <T> T findProfileSettingsRecord(GatewayContext context, PersistentRecord taskRecord)
Convenience function for looking up the task's type-specific settings. Relies on getSettingsRecordForeignKey() to get the reference field for the settings record.
-
-