Package rife.bld.operations
Class AbstractOperation<T extends AbstractOperation<T>>
java.lang.Object
rife.bld.operations.AbstractOperation<T>
- Direct Known Subclasses:
AbstractCreateOperation
,AbstractProcessOperation
,CleanOperation
,CompileOperation
,DependencyTreeOperation
,DownloadOperation
,JarOperation
,JavadocOperation
,PrecompileOperation
,PublishOperation
,PurgeOperation
,UberJarOperation
,UpdatesOperation
,UpgradeOperation
,VersionOperation
,WarOperation
Provides common features across all operations
- Since:
- 1.5.2
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
execute()
Performs the operation execution that can be wrapped by the#executeOnce
call.void
Ensures that this operation instance is executed once and only once.void
executeOnce
(Runnable setup) Ensures that this operation instance is executed once and only once.boolean
silent()
Indicates whether the operation should be silent or not.silent
(boolean silent) Changes whether the operation should be silent or not.
-
Constructor Details
-
AbstractOperation
public AbstractOperation()
-
-
Method Details
-
silent
Changes whether the operation should be silent or not.Defaults to not silent.
- Parameters:
silent
-true
if the operation should be silent;false
otherwise- Returns:
- this operation instance
- Since:
- 1.5.2
-
silent
public boolean silent()Indicates whether the operation should be silent or not.- Returns:
true
if the operation should be silent;false
otherwise- Since:
- 1.5.2
-
executeOnce
Ensures that this operation instance is executed once and only once. -
executeOnce
Ensures that this operation instance is executed once and only once.A setup lambda can be provided that is called when the only execution takes place.
-
execute
Performs the operation execution that can be wrapped by the#executeOnce
call.- Throws:
Exception
- when an exception occurs during the execution- Since:
- 1.5.10
-