public abstract class TriggerInfo extends Object implements IMigratable
Constructor and Description |
---|
TriggerInfo(File sourceCodeFile,
IConfigSource config) |
TriggerInfo(File sourceCodeFile,
IConfigSource config,
String triggerName) |
Modifier and Type | Method and Description |
---|---|
static TriggerInfo |
defaultInfo(File sourceCodeFile,
IConfigSource config)
Trigger info with default behavior: it is a valid TriggerInfo if the `sourceCodeFile` passes
isTriggerFile(File) |
void |
delete()
Default behavior is delete one file associated with the trigger.
|
boolean |
equals(Object o) |
static String |
extractName(File file)
extract file name without the extension
|
IConfigSource |
getConfig() |
File |
getSourceCodeFile() |
String |
getTriggerName() |
int |
hashCode() |
boolean |
isMigrationNeeded() |
static boolean |
isTriggerFile(File file)
Check if the file has valid extension (.trg) or no extension.
|
abstract boolean |
isValid()
Check whether this TriggerInfo is valid or not so that it may can be used to instantiate the Trigger instance.
|
void |
migrate(IMigrationHelper migrationHelper) |
void |
reloadConfig() |
String |
toString() |
public TriggerInfo(File sourceCodeFile, IConfigSource config)
public TriggerInfo(File sourceCodeFile, IConfigSource config, String triggerName)
public boolean isMigrationNeeded()
isMigrationNeeded
in interface IMigratable
public void migrate(IMigrationHelper migrationHelper)
migrate
in interface IMigratable
public File getSourceCodeFile()
public IConfigSource getConfig()
public void reloadConfig()
public String getTriggerName()
public abstract boolean isValid()
public void delete()
public static boolean isTriggerFile(File file)
file
- the source code file to checkpublic static String extractName(File file)
file
- public static TriggerInfo defaultInfo(File sourceCodeFile, IConfigSource config)
isTriggerFile(File)