Package com.piketec.tpt.api
Interface Attachment
-
- All Superinterfaces:
IdentifiableRemote
,java.rmi.Remote
,TptRemote
public interface Attachment extends IdentifiableRemote
A attachment is nothing more than a file name and some content.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
getContent()
Get the attachment content as a byte array.java.lang.String
getFileName()
Get the file name of the attachment.void
setContent(byte[] content)
Set the content of the attachment.void
setFileName(java.lang.String fileName)
Set the file name of the attachment.-
Methods inherited from interface com.piketec.tpt.api.IdentifiableRemote
getIdentifier
-
-
-
-
Method Detail
-
getFileName
java.lang.String getFileName() throws java.rmi.RemoteException
Get the file name of the attachment.- Returns:
- The file name
- Throws:
java.rmi.RemoteException
- remote communication problem
-
setFileName
void setFileName(java.lang.String fileName) throws ApiException, java.rmi.RemoteException
Set the file name of the attachment. The file name is used to create temporary files when viewing the attachment and will be shown as tooltip in TPT.- Parameters:
fileName
- The new file name.- Throws:
java.rmi.RemoteException
- remote communication problemApiException
- If the new name is empty or null.
-
getContent
byte[] getContent() throws java.rmi.RemoteException
Get the attachment content as a byte array.- Returns:
- The attachment content.
- Throws:
java.rmi.RemoteException
- remote communication problem
-
setContent
void setContent(byte[] content) throws ApiException, java.rmi.RemoteException
Set the content of the attachment.- Parameters:
content
- The new content of the attachment as byte array- Throws:
java.rmi.RemoteException
- remote communication problemApiException
- If the new content isnull
.
-
-