Package org.netxms.client
Class LibraryImage
- java.lang.Object
-
- org.netxms.client.LibraryImage
-
- All Implemented Interfaces:
Comparable<LibraryImage>
public class LibraryImage extends Object implements Comparable<LibraryImage>
This class represents image in image library
-
-
Constructor Summary
Constructors Constructor Description LibraryImage()Default constructorLibraryImage(UUID guid, String name, String category, String mimeType)Create new library imageLibraryImage(org.netxms.base.NXCPMessage msg, long baseId)Create library image object from NXCP messageLibraryImage(org.netxms.base.NXCPMessage msg, File imageFile)Create library image object from NXCP message and image file
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(LibraryImage o)voidfillMessage(org.netxms.base.NXCPMessage msg)Fill NXCP message with image data (metadata only)byte[]getBinaryData()StringgetCategory()UUIDgetGuid()StringgetMimeType()StringgetName()booleanisComplete()booleanisProtected()voidsetBinaryData(byte[] binaryData, String mimeType)voidsetCategory(String category)voidsetGuid(UUID guid)voidsetMimeType(String mimeType)voidsetName(String name)StringtoString()
-
-
-
Constructor Detail
-
LibraryImage
public LibraryImage()
Default constructor
-
LibraryImage
public LibraryImage(UUID guid, String name, String category, String mimeType)
Create new library image- Parameters:
guid- GUIDname- namecategory- image category namemimeType- image MIME type
-
LibraryImage
public LibraryImage(org.netxms.base.NXCPMessage msg, long baseId)Create library image object from NXCP message- Parameters:
msg-baseId-
-
LibraryImage
public LibraryImage(org.netxms.base.NXCPMessage msg, File imageFile)Create library image object from NXCP message and image file- Parameters:
msg- Message containing object's dataimageFile- image file
-
-
Method Detail
-
fillMessage
public void fillMessage(org.netxms.base.NXCPMessage msg)
Fill NXCP message with image data (metadata only)- Parameters:
msg- NXCP message
-
getGuid
public UUID getGuid()
- Returns:
- the guid
-
setGuid
public void setGuid(UUID guid)
- Parameters:
guid- the guid to set
-
getName
public String getName()
- Returns:
- the name
-
setName
public void setName(String name)
- Parameters:
name- the name to set
-
getCategory
public String getCategory()
- Returns:
- the category
-
setCategory
public void setCategory(String category)
- Parameters:
category- the category to set
-
getBinaryData
public byte[] getBinaryData()
- Returns:
- the binaryData
-
setBinaryData
public void setBinaryData(byte[] binaryData, String mimeType)- Parameters:
binaryData- the binaryData to set
-
isProtected
public boolean isProtected()
- Returns:
- is image protected?
-
isComplete
public boolean isComplete()
- Returns:
- is complete (contains binary data)?
-
getMimeType
public String getMimeType()
- Returns:
- the mimeType
-
setMimeType
public void setMimeType(String mimeType)
- Parameters:
mimeType- the mimeType to set
-
compareTo
public int compareTo(LibraryImage o)
- Specified by:
compareToin interfaceComparable<LibraryImage>
-
-