@Entity public class CommandEntity extends SetupFileEntity
GENIE_ID_TAG_NAMESPACE, GENIE_NAME_TAG_NAMESPACE, GENIE_TAG_NAMESPACE, TAG_DELIMITER, TAG_DELIMITER_REGEX
Constructor and Description |
---|
CommandEntity()
Default Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addApplication(ApplicationEntity application)
Append an application to the list of applications this command uses.
|
Command |
getDTO()
Get a dto based on the information in this entity.
|
java.util.Optional<java.lang.Integer> |
getMemory()
Get the default memory for a job using this command.
|
protected void |
onCreateOrUpdateCommand()
Check to make sure everything is OK before persisting.
|
void |
removeApplication(ApplicationEntity application)
Remove an application from this command.
|
void |
setApplications(java.util.List<ApplicationEntity> applications)
Sets the applications for this command.
|
protected void |
setClusters(java.util.Set<ClusterEntity> clusters)
Set the clusters this command is available on.
|
void |
setConfigs(java.util.Set<java.lang.String> configs)
Sets the configurations for this command.
|
getSetupFile
getDescription, getFinalTags, getTags, setTags
getCreated, getEntityVersion, getId, getUpdated, onCreateBaseEntity, onUpdateBaseEntity, setCreated, setEntityVersion, setId, setUpdated
protected void onCreateOrUpdateCommand() throws GenieException
GenieException
- If any precondition isn't met.public java.util.Optional<java.lang.Integer> getMemory()
public void setConfigs(java.util.Set<java.lang.String> configs)
configs
- The configuration files that this command needspublic void setApplications(java.util.List<ApplicationEntity> applications) throws GeniePreconditionException
applications
- The application that this command usesGeniePreconditionException
- if the list of applications contains duplicatespublic void addApplication(@NotNull ApplicationEntity application) throws GeniePreconditionException
application
- The application to add. Not null.GeniePreconditionException
- If the application is a duplicate of an existing applicationpublic void removeApplication(@NotNull ApplicationEntity application)
application
- The application to remove. Not null.protected void setClusters(java.util.Set<ClusterEntity> clusters)
clusters
- the clusterspublic Command getDTO()