|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.esdihumboldt.hale.common.headless.transform.TransformationWorkspace
public class TransformationWorkspace
A transformation workspace based on WorkspaceService
and
EnvironmentService
.
Constructor Summary | |
---|---|
|
TransformationWorkspace()
Create a new transformation workspace with a lease duration of one day. |
|
TransformationWorkspace(org.joda.time.ReadableDuration leaseDuration)
Create a new transformation workspace with a custom lease duration. |
|
TransformationWorkspace(String workspaceId)
Create a representation of an existing transformation workspace. |
protected |
TransformationWorkspace(String workspaceId,
org.joda.time.ReadableDuration leaseDuration)
Create a new workspace or use an existing one. |
Method Summary | |
---|---|
void |
delete()
Delete the workspace |
String |
getId()
|
File |
getReportFile()
Get the report file. |
File |
getSourceFolder()
Get the source folder. |
File |
getTargetFolder()
Get the target folder. |
File |
getWorkspace()
|
boolean |
isTransformationFinished()
Determines if a previously with transform(String, List, IOConfiguration) started transformation
process is finished. |
boolean |
isTransformationSuccessful()
Determines if a previously with transform(String, List, IOConfiguration) started transformation
process was complete successfully. |
protected void |
setTransformationSuccess(boolean success)
Set if the transformation was successfully completed. |
com.google.common.util.concurrent.ListenableFuture<Boolean> |
transform(String envId,
List<InstanceReader> sources,
IOConfiguration target)
Transform the instances provided through the given instance readers and store the result in the getTargetFolder() . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransformationWorkspace()
IllegalStateException
- if the WorkspaceService
is not
availablepublic TransformationWorkspace(org.joda.time.ReadableDuration leaseDuration)
leaseDuration
- the lease duration of the workspace
IllegalStateException
- if the WorkspaceService
is not
availablepublic TransformationWorkspace(String workspaceId)
workspaceId
- the workspace identifier
IllegalStateException
- if the WorkspaceService
is not
available or the workspace with the given identifier does not
existprotected TransformationWorkspace(String workspaceId, org.joda.time.ReadableDuration leaseDuration)
workspaceId
- the workspace identifier if this object should
represent an existing workspace, may be null
if
leaseDuration is set.leaseDuration
- the lease duration of a new workspace to create, may
be null
if workspaceId is set
IllegalStateException
- if the WorkspaceService
is not
available or the workspace with the given identifier does not
existMethod Detail |
---|
public com.google.common.util.concurrent.ListenableFuture<Boolean> transform(String envId, List<InstanceReader> sources, IOConfiguration target) throws Exception
getTargetFolder()
.
envId
- the environment IDsources
- the instance readerstarget
- the configuration of the target instance writer
Exception
- if launching the transformation failspublic boolean isTransformationFinished()
transform(String, List, IOConfiguration)
started transformation
process is finished. Regardless of the success or failure.
true
if the transformation is finished,
false
if the transformation is still running, no
transformation was started or the workspace no longer existspublic boolean isTransformationSuccessful() throws IllegalStateException
transform(String, List, IOConfiguration)
started transformation
process was complete successfully. Note that a successful completion
doesn't necessary mean there weren't any internal transformation errors.
The getReportFile()
holds more detailed information.IllegalStateException
will be thrown.
IllegalStateException
- if the transformation is not finishedisTransformationFinished()
protected void setTransformationSuccess(boolean success) throws FileNotFoundException, IOException
success
- if the transformation was completed successfully
FileNotFoundException
- if the workspace does not exist
IOException
- if the workspace configuration file cannot be read or
writtenpublic String getId()
public File getWorkspace()
public File getTargetFolder()
isTransformationFinished()
,
isTransformationSuccessful()
public File getSourceFolder()
public File getReportFile()
isTransformationFinished()
public void delete()
|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |