Package org.netxms.client
Class LibraryImage
java.lang.Object
org.netxms.client.LibraryImage
- All Implemented Interfaces:
- Comparable<LibraryImage>
This class represents image in image library
- 
Constructor SummaryConstructorsConstructorDescriptionDefault constructorLibraryImage(UUID guid, String name, String category, String mimeType) Create new library imageLibraryImage(NXCPMessage msg, long baseId) Create library image object from NXCP messageLibraryImage(NXCPMessage msg, File imageFile) Create library image object from NXCP message and image file
- 
Method SummaryModifier and TypeMethodDescriptionintvoidfillMessage(NXCPMessage msg) Fill NXCP message with image data (metadata only)byte[]getGuid()Get image MIME type.getName()booleanbooleanvoidsetBinaryData(byte[] binaryData, String mimeType) Set image binary data.voidsetCategory(String category) voidvoidsetMimeType(String mimeType) voidtoString()
- 
Constructor Details- 
LibraryImagepublic LibraryImage()Default constructor
- 
LibraryImageCreate new library image- Parameters:
- guid- GUID
- name- name
- category- image category name
- mimeType- image MIME type
 
- 
LibraryImageCreate library image object from NXCP message- Parameters:
- msg- NXCP message
- baseId- base field ID
 
- 
LibraryImageCreate library image object from NXCP message and image file- Parameters:
- msg- Message containing object's data
- imageFile- image file
 
 
- 
- 
Method Details- 
fillMessageFill NXCP message with image data (metadata only)- Parameters:
- msg- NXCP message
 
- 
getGuid- Returns:
- the guid
 
- 
setGuid- Parameters:
- guid- the guid to set
 
- 
getName- Returns:
- the name
 
- 
setName- Parameters:
- name- the name to set
 
- 
getCategory- Returns:
- the category
 
- 
setCategory- Parameters:
- category- the category to set
 
- 
getBinaryDatapublic byte[] getBinaryData()- Returns:
- the binaryData
 
- 
setBinaryDataSet image binary data.- Parameters:
- binaryData- image binary data
- mimeType- image MIME type (will be set to "image/unknown" if mimeType is null)
 
- 
isProtectedpublic boolean isProtected()- Returns:
- is image protected?
 
- 
isCompletepublic boolean isComplete()- Returns:
- is complete (contains binary data)?
 
- 
getMimeTypeGet image MIME type.- Returns:
- image MIME type
 
- 
setMimeType- Parameters:
- mimeType- the mimeType to set
 
- 
toString
- 
compareTo- Specified by:
- compareToin interface- Comparable<LibraryImage>
 
 
-