|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.silverpeas.viewer.ViewerContext
public class ViewerContext
This class permits to handled a context during the conversion processes.
Constructor Summary | |
---|---|
protected |
ViewerContext(String originalFileName,
File originalSourceFile)
|
Method Summary | |
---|---|
protected ViewerContext |
clone()
|
static ViewerContext |
from(SimpleDocument document)
Initializes a context from an instance of SimpleDocument . |
String |
getOriginalFileName()
Gets the name of the original file. |
File |
getOriginalSourceFile()
Gets the original file. |
String |
getViewId()
Gets the identifier associated to the current conversion processes for viewing. |
TemporaryWorkspaceTranslation |
getWorkspace()
Gets the workspace into which the processes will write the results. |
boolean |
isCacheRequired()
Indicates if cache is required. |
boolean |
isProcessingCache()
Indicates if the current process is the one which is in charge of performing the conversion tasks. |
void |
processingCache()
Sets into context that the current process is in charge of the conversion tasks. |
ViewerContext |
withUniqueDocumentId(String uniqueDocumentId)
Sets a unique identifier associated to the current document to convert. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ViewerContext(String originalFileName, File originalSourceFile)
Method Detail |
---|
public static ViewerContext from(SimpleDocument document)
SimpleDocument
.
document
- the SimpleDocument
for which the file must be converted.
ViewerContext
initialized from the given SimpleDocument
.public String getOriginalFileName()
public File getOriginalSourceFile()
File
that represents the original file.public TemporaryWorkspaceTranslation getWorkspace()
File
that represents the workspace.public String getViewId()
public ViewerContext withUniqueDocumentId(String uniqueDocumentId)
getViewId()
in order to compute the final unique identifier.
uniqueDocumentId
- a unique document identifier (please be careful about 'unique' word).
public boolean isCacheRequired()
public boolean isProcessingCache()
public void processingCache()
protected ViewerContext clone()
clone
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |