@Entity public class ClusterEntity extends SetupFileEntity
GENIE_ID_TAG_NAMESPACE, GENIE_NAME_TAG_NAMESPACE, GENIE_TAG_NAMESPACE, TAG_DELIMITER, TAG_DELIMITER_REGEX
Constructor and Description |
---|
ClusterEntity()
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addCommand(CommandEntity command)
Add a new command to this cluster.
|
Cluster |
getDTO()
Get a DTO from the contents of this entity.
|
protected void |
onCreateOrUpdateCluster()
Check to make sure everything is OK before persisting.
|
void |
removeAllCommands()
Remove all the commands from this application.
|
void |
removeCommand(CommandEntity command)
Remove a command from this cluster.
|
void |
setCommands(java.util.List<CommandEntity> commands)
Sets the commands for this cluster.
|
void |
setConfigs(java.util.Set<java.lang.String> configs)
Sets the configurations for this cluster.
|
void |
setDependencies(java.util.Set<java.lang.String> dependencies)
Sets the dependencies needed for this cluster.
|
getSetupFile
getDescription, getFinalTags, getTags, setTags
getCreated, getEntityVersion, getId, getUpdated, onCreateBaseEntity, onUpdateBaseEntity, setCreated, setEntityVersion, setId, setUpdated
protected void onCreateOrUpdateCluster() throws GenieException
GenieException
- If any precondition isn't met.public void setConfigs(java.util.Set<java.lang.String> configs)
configs
- The configuration files that this cluster needs. Not
null/empty.public void setCommands(java.util.List<CommandEntity> commands) throws GeniePreconditionException
commands
- The commands that this cluster supportsGeniePreconditionException
- If the commands are already added to the listpublic void addCommand(@NotNull CommandEntity command) throws GeniePreconditionException
command
- The command to add. Not null.GeniePreconditionException
- If the command is a duplicate of an existing commandpublic void removeCommand(@NotNull CommandEntity command)
command
- The command to remove. Not null.public void removeAllCommands()
public void setDependencies(java.util.Set<java.lang.String> dependencies)
dependencies
- All dependencies needed for execution in this clusterpublic Cluster getDTO()