Package org.dspace.scripts
Class Process
- java.lang.Object
-
- org.dspace.scripts.Process
-
- All Implemented Interfaces:
ReloadableEntity<Integer>
@Entity public class Process extends Object implements ReloadableEntity<Integer>
This class is the DB Entity representation of the Process object to be stored in the Database
-
-
Field Summary
Fields Modifier and Type Field Description static StringBITSTREAM_TYPE_METADATAFIELDstatic StringOUTPUT_TYPE
-
Constructor Summary
Constructors Modifier Constructor Description protectedProcess()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBitstream(Bitstream bitstream)booleanequals(Object other)Returntrueifotheris the same Process as this object,falseotherwiseList<Bitstream>getBitstreams()This method returns a list of Bitstreams that will be used or created by the Process.DategetCreationTime()This method will return the time when the Process was created.EPersongetEPerson()This method returns an EPerson object.DategetFinishedTime()This method returns the time that Process was finishedIntegergetID()This method returns the ID that the Process holds within the DatabaseStringgetName()This method returns the name of the Process.protected StringgetParameters()To get the parameters, use ProcessService.getParameters() to get a parsed list of DSpaceCommandLineParameters This String representation is the parameter in an unparsed fashion.For example "-c test"ProcessStatusgetProcessStatus()This method returns a ProcessStatus value that represents the current state of the Process.DategetStartTime()This method returns the Start time for the Process.inthashCode()voidremoveBitstream(Bitstream bitstream)voidsetBitstreams(List<Bitstream> bitstreams)voidsetCreationTime(Date creationTime)voidsetEPerson(EPerson ePerson)voidsetFinishedTime(Date finishedTime)voidsetName(String name)voidsetParameters(String parameters)voidsetProcessId(Integer processId)voidsetProcessStatus(ProcessStatus processStatus)voidsetStartTime(Date startTime)
-
-
-
Field Detail
-
BITSTREAM_TYPE_METADATAFIELD
public static final String BITSTREAM_TYPE_METADATAFIELD
- See Also:
- Constant Field Values
-
OUTPUT_TYPE
public static final String OUTPUT_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getID
public Integer getID()
This method returns the ID that the Process holds within the Database- Specified by:
getIDin interfaceReloadableEntity<Integer>- Returns:
- The ID that the process holds within the database
-
setProcessId
public void setProcessId(Integer processId)
-
getEPerson
public EPerson getEPerson()
This method returns an EPerson object. This EPerson object is the EPerson that initially created the process- Returns:
- The EPerson that created the process
-
setEPerson
public void setEPerson(EPerson ePerson)
-
getStartTime
public Date getStartTime()
This method returns the Start time for the Process. This reflects the time when the Process was actually started- Returns:
- The start time for the Process
-
setStartTime
public void setStartTime(Date startTime)
-
getFinishedTime
public Date getFinishedTime()
This method returns the time that Process was finished- Returns:
- The finished time for the Process
-
setFinishedTime
public void setFinishedTime(Date finishedTime)
-
getName
public String getName()
This method returns the name of the Process. For example filter-media- Returns:
- The name of the Process
-
setName
public void setName(String name)
-
getProcessStatus
public ProcessStatus getProcessStatus()
This method returns a ProcessStatus value that represents the current state of the Process. These values can be found within theProcessStatusenum- Returns:
- The status of the Process
-
setProcessStatus
public void setProcessStatus(ProcessStatus processStatus)
-
getParameters
protected String getParameters()
To get the parameters, use ProcessService.getParameters() to get a parsed list of DSpaceCommandLineParameters This String representation is the parameter in an unparsed fashion.For example "-c test"- Returns:
- the raw parameter string.
-
setParameters
public void setParameters(String parameters)
-
getBitstreams
public List<Bitstream> getBitstreams()
This method returns a list of Bitstreams that will be used or created by the Process. This list contains both input and output bitstreams.- Returns:
- The Bitstreams that are used or created by the process
-
removeBitstream
public void removeBitstream(Bitstream bitstream)
-
addBitstream
public void addBitstream(Bitstream bitstream)
-
setCreationTime
public void setCreationTime(Date creationTime)
-
getCreationTime
public Date getCreationTime()
This method will return the time when the Process was created. Note that this is potentially different from the StartTime (for example if the Process was queued)- Returns:
- The creation time of the Process
-
equals
public boolean equals(Object other)
Returntrueifotheris the same Process as this object,falseotherwise
-
-