|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.server.io.AbstractExportContext
org.apache.jackrabbit.server.io.ExportContextImpl
public class ExportContextImpl
ExportContextImpl
implements an ExportContext
that
wraps around the specified OutputContext as it was passed to
DavResource.spool(OutputContext)
. If a stream is provided a temporary
file is created, which is deleted as soon as informCompleted(boolean)
is called on this context. Note however, that the properties and the stream
are written to the OutputContext
but upon successful completion.
informCompleted(boolean)
Field Summary |
---|
Fields inherited from class org.apache.jackrabbit.server.io.AbstractExportContext |
---|
completed |
Constructor Summary | |
---|---|
ExportContextImpl(Item exportRoot,
OutputContext outputCtx)
|
|
ExportContextImpl(Item exportRoot,
OutputContext outputCtx,
MimeResolver mimeResolver)
|
Method Summary | |
---|---|
OutputStream |
getOutputStream()
Returns a new OutputStream to the temporary file or
null if this context provides no stream. |
void |
informCompleted(boolean success)
If success is true, the properties set before an the output stream are written to the wrapped OutputContext . |
void |
setContentLanguage(String contentLanguage)
Sets the content language. |
void |
setContentLength(long contentLength)
Sets the length of the data. |
void |
setContentType(String mimeType,
String encoding)
Set the content type for the resource content |
void |
setCreationTime(long creationTime)
Does nothing since the wrapped output context does not understand creation time |
void |
setETag(String etag)
Sets the ETag of the resource. |
void |
setModificationTime(long modificationTime)
Sets the modification time of the resource |
void |
setProperty(Object propertyName,
Object propertyValue)
Sets an arbitrary property to this export context. |
Methods inherited from class org.apache.jackrabbit.server.io.AbstractExportContext |
---|
checkCompleted, getExportRoot, getIOListener, getMimeResolver, hasStream, isCompleted |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExportContextImpl(Item exportRoot, OutputContext outputCtx) throws IOException
IOException
public ExportContextImpl(Item exportRoot, OutputContext outputCtx, MimeResolver mimeResolver) throws IOException
IOException
Method Detail |
---|
public OutputStream getOutputStream()
OutputStream
to the temporary file or
null
if this context provides no stream.
null
ExportContext.getOutputStream()
,
informCompleted(boolean)
public void setContentLanguage(String contentLanguage)
ExportContext
ExportContext.setContentLanguage(String)
public void setContentLength(long contentLength)
ExportContext
contentLength
- the content lengthExportContext.setContentLength(long)
public void setContentType(String mimeType, String encoding)
ExportContext
ExportContext.setContentType(String,String)
public void setCreationTime(long creationTime)
creationTime
- ExportContext.setCreationTime(long)
public void setModificationTime(long modificationTime)
ExportContext
modificationTime
- the modification timeExportContext.setModificationTime(long)
public void setETag(String etag)
ExportContext
etag
- the ETagExportContext.setETag(String)
public void setProperty(Object propertyName, Object propertyValue)
ExportContext
ExportContext.setProperty(Object, Object)
public void informCompleted(boolean success)
OutputContext
.
informCompleted
in interface IOContext
informCompleted
in class AbstractExportContext
success
- IOContext.informCompleted(boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |