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 Summary
ConstructorDescriptionDefault 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 Summary
Modifier and TypeMethodDescriptionint
void
fillMessage
(NXCPMessage msg) Fill NXCP message with image data (metadata only)byte[]
getGuid()
Get image MIME type.getName()
boolean
boolean
void
setBinaryData
(byte[] binaryData, String mimeType) Set image binary data.void
setCategory
(String category) void
void
setMimeType
(String mimeType) void
toString()
-
Constructor Details
-
LibraryImage
public LibraryImage()Default constructor -
LibraryImage
Create new library image- Parameters:
guid
- GUIDname
- namecategory
- image category namemimeType
- image MIME type
-
LibraryImage
Create library image object from NXCP message- Parameters:
msg
- NXCP messagebaseId
- base field ID
-
LibraryImage
Create library image object from NXCP message and image file- Parameters:
msg
- Message containing object's dataimageFile
- image file
-
-
Method Details
-
fillMessage
Fill 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
-
getBinaryData
public byte[] getBinaryData()- Returns:
- the binaryData
-
setBinaryData
Set image binary data.- Parameters:
binaryData
- image binary datamimeType
- image MIME type (will be set to "image/unknown" if mimeType is null)
-
isProtected
public boolean isProtected()- Returns:
- is image protected?
-
isComplete
public boolean isComplete()- Returns:
- is complete (contains binary data)?
-
getMimeType
Get image MIME type.- Returns:
- image MIME type
-
setMimeType
- Parameters:
mimeType
- the mimeType to set
-
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<LibraryImage>
-