Package com.axemble.vdoc.sdk.impl
Class SnapshotAttachment
java.lang.Object
com.axemble.vdoc.sdk.impl.AbstractElement
com.axemble.vdoc.sdk.impl.PortalElement
com.axemble.vdoc.sdk.impl.SnapshotAttachment
- All Implemented Interfaces:
IAttachment,IElement,IProtocolSupport,IUriSupport,Serializable
- Author:
- vlygeros
- See Also:
-
Field Summary
Fields inherited from class com.axemble.vdoc.sdk.impl.PortalElement
path, storageKeyFields inherited from class com.axemble.vdoc.sdk.impl.AbstractElement
module -
Constructor Summary
ConstructorsConstructorDescriptionSnapshotAttachment(IModule module, com.axemble.webdrive.om.ContentSnapshot contentSnapshot) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]voidgetContent(File file) Retrieves the attachment content as a file object.voidgetContent(OutputStream outputStream) Retrieves the attachment content as a stream .Get the stream to read the content Look out to close the stream when finishedgetName()Gets the native object underneath.Get the stream to writte the content Look out to close the stream when finishedlonggetSize()getURI()Gets the URI of the object supporting this interfacebooleanvoidsetContent(byte[] content) Allow to set the content of the attachment by passing an array of bytes.voidsetContent(File file) Allow to set the content of the attachment by passing aFileobject.voidsetContent(InputStream inputStream) Allow to set the content of the attachment by passing aInputStreamobject.voidAllow to set the system name of the attachmentMethods inherited from class com.axemble.vdoc.sdk.impl.PortalElement
equals, getId, getPath, getProtocolURI, getProtocolURI, hashCode, replaceBackSlash, replaceSlash, save, setIdMethods inherited from class com.axemble.vdoc.sdk.impl.AbstractElement
getModuleMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.axemble.vdoc.sdk.interfaces.IElement
getId, getModule, getPath, saveMethods inherited from interface com.axemble.vdoc.sdk.supports.IProtocolSupport
getProtocolURI, getProtocolURI
-
Constructor Details
-
SnapshotAttachment
- Parameters:
module-
-
-
Method Details
-
getContent
Description copied from interface:IAttachmentRetrieves the attachment content as a file object.- Specified by:
getContentin interfaceIAttachment- Parameters:
file- The file object to write to.
-
getContent
Description copied from interface:IAttachmentRetrieves the attachment content as a stream .- Specified by:
getContentin interfaceIAttachment- Parameters:
outputStream- The output stream to write to.
-
getContent
public byte[] getContent()- Specified by:
getContentin interfaceIAttachment
-
getCreatedDate
- Specified by:
getCreatedDatein interfaceIAttachment- Returns:
- The created date
-
getModifiedDate
- Specified by:
getModifiedDatein interfaceIAttachment- Returns:
- The last modified date
-
getName
- Specified by:
getNamein interfaceIAttachment- Returns:
- The system name of the attachment
-
getShortName
- Specified by:
getShortNamein interfaceIAttachment- Returns:
- The short name of the attachment
-
getSize
public long getSize()- Specified by:
getSizein interfaceIAttachment- Returns:
- The size of the attachment
-
setContent
Description copied from interface:IAttachmentAllow to set the content of the attachment by passing aFileobject.- Specified by:
setContentin interfaceIAttachment- Parameters:
file- The file object
-
setContent
Description copied from interface:IAttachmentAllow to set the content of the attachment by passing aInputStreamobject.- Specified by:
setContentin interfaceIAttachment- Parameters:
inputStream- The input stream.
-
setContent
public void setContent(byte[] content) Description copied from interface:IAttachmentAllow to set the content of the attachment by passing an array of bytes.- Specified by:
setContentin interfaceIAttachment- Parameters:
content- The array of bytes.
-
setName
Description copied from interface:IAttachmentAllow to set the system name of the attachment- Specified by:
setNamein interfaceIAttachment- Parameters:
name- The name to set
-
getNativeObject
Description copied from interface:IElementGets the native object underneath.- Specified by:
getNativeObjectin interfaceIElement- Returns:
- an object.
-
getURI
Description copied from interface:IUriSupportGets the URI of the object supporting this interface- Specified by:
getURIin interfaceIUriSupport- Returns:
- A String object.
-
getInputStream
Description copied from interface:IAttachmentGet the stream to read the content Look out to close the stream when finished- Specified by:
getInputStreamin interfaceIAttachment- Returns:
- InputStream the stream to read
- Throws:
IOException
-
getOutputStream
Description copied from interface:IAttachmentGet the stream to writte the content Look out to close the stream when finished- Specified by:
getOutputStreamin interfaceIAttachment- Returns:
- OutputStream the stream to writte
- Throws:
IOException
-
isReadable
public boolean isReadable()- Specified by:
isReadablein interfaceIAttachment
-