Class AbstractDefinition<T extends AbstractDefinition<T>>
java.lang.Object
com.inet.taskplanner.server.api.common.AbstractDefinition<T>
- Type Parameters:
T- type of the definition
- Direct Known Subclasses:
JobDefinition, ResultActionDefinition, SeriesDefinition, TriggerDefinition
A definition is a POJO describing a component used by
TaskPlanner, see subclasses for details.- Since:
- taskplanner 3.0
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractDefinition(@Nonnull String extensionName) Creates a new definition instance.AbstractDefinition(@Nonnull String extensionName, @Nullable Map<String, String> properties) Creates a new definition instance. -
Method Summary
Modifier and TypeMethodDescriptionabstract @Nonnull TMakes a deep copy of this definition.static <T extends AbstractDefinition<T>>
List<T> copyDefinitions(List<T> definitions) Returns new list containing copies of the specified definitions which will be created using methodcopyDefinition().booleanfinal @Nonnull StringGets the unique extension name of the component this definition represents.Gets the properties object of this definition.getProperty(String key) Searches for the property with the specified key in this property list.com.inet.id.GUIDgetUid()Returns the unique identifier of this definition.inthashCode()removeProperty(String key) Removes a property of this definitionvoidsetProperty(@Nullable String key, @Nullable String value) Sets a property to the internal properties table.voidsetUid(com.inet.id.GUID uid) Sets the unique identifier of this definition.
-
Constructor Details
-
AbstractDefinition
Creates a new definition instance.- Parameters:
extensionName- the unique type name for this definition. The corresponding factory must have that same extensionName.- Throws:
IllegalArgumentException- if the given extensionName is null- Since:
- taskplanner 3.0
-
AbstractDefinition
Creates a new definition instance.- Parameters:
extensionName- the unique type name for this definition. The corresponding factory must have that same extensionName.properties- the initial properties to set- Throws:
IllegalArgumentException- if the given extensionName is null- Since:
- taskplanner 3.0
-
-
Method Details
-
getExtensionName
Gets the unique extension name of the component this definition represents.- Returns:
- the unique extension name
- Since:
- taskplanner 3.0
-
setUid
public void setUid(com.inet.id.GUID uid) Sets the unique identifier of this definition.- Parameters:
uid- the unique identifier of this definition.- Since:
- taskplanner 3.0
-
getUid
public com.inet.id.GUID getUid()Returns the unique identifier of this definition.- Returns:
- the unique identifier of this definition.
- Since:
- taskplanner 3.0
-
getProperties
Gets the properties object of this definition. Implementation-specific properties for a job, trigger, or result action are stored here.
NOTE: The returned instance is not a copy. All changes to the returned map will affect this definition directly!- Returns:
- properties for this definition.
- Since:
- taskplanner 3.0
-
getProperty
-
setProperty
-
removeProperty
-
copyDefinition
Makes a deep copy of this definition.- Returns:
- a deep copy of this definition.
- Since:
- taskplanner 3.0
-
copyDefinitions
Returns new list containing copies of the specified definitions which will be created using methodcopyDefinition().- Parameters:
definitions- list of definitions to be copied.- Returns:
- new list containing copies of the specified definitions.
- Since:
- taskplanner 3.0
-
hashCode
-
equals
-