public final class Inventory
extends java.lang.Object
| Constructor and Description | 
|---|
| Inventory()Default constructor. | 
| Inventory(int id,
         java.util.List<java.lang.String> tagsAdded,
         java.util.List<java.lang.String> tagsPresent,
         java.util.List<java.lang.String> tagsRemoved,
         java.lang.String initiatingUser,
         AccessType accessType,
         byte doorNumber,
         java.util.Date createdAt)Deprecated. 
 Internal usage - Should not be used. | 
| Inventory(Inventory copyInventory)Copy constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| static Inventory | deserialize(java.lang.String serializedInventory)Create a new Inventory instance from a serialized one. | 
| static Inventory | generateLastInventory(Inventory previousInventory,
                     java.util.List<java.lang.String> tagsList)Create a new Inventory with the previous inventory Instance and a list of tag UIDs (generated during the last scan). | 
| AccessType | getAccessType() | 
| java.util.Date | getCreationDate() | 
| byte | getDoorNumber()Get the number of the door which was closed before the inventory started | 
| int | getId()Deprecated. 
 Internal usage - Should not be used. | 
| int | getNumberAdded()Quick way to get number of tags added, instead of getting a copied list to check its size(). | 
| int | getNumberPresent()Quick way to get number of tags present, instead of getting a copied list to check its size(). | 
| int | getNumberRemoved()Quick way to get number of tags removed, instead of getting a copied list to check its size(). | 
| int | getNumberTotal()Quick way to get number of tags total, instead of getting a copied list to check its size(). | 
| java.util.List<java.lang.String> | getTagsAdded() | 
| java.util.List<java.lang.String> | getTagsAll() | 
| java.util.List<java.lang.String> | getTagsPresent() | 
| java.util.List<java.lang.String> | getTagsRemoved() | 
| java.lang.String | getUsername() | 
| java.lang.String | serialize()Serialize the current instance as XML and encode it with base64. | 
| void | setAccessType(AccessType accessType)Save the last type of access (fingerprint, badge reader...) if the last scan was not manually started. | 
| void | setDoorNumber(byte doorNumber)Set the number of the door which was closed before the inventory started | 
| void | setInitiatingUserName(java.lang.String userName)Save the last granted user's name (user who opened one device door). | 
public Inventory(Inventory copyInventory)
copyInventory - "current inventory" to be copied.public Inventory()
@Deprecated
public Inventory(int id,
                    java.util.List<java.lang.String> tagsAdded,
                    java.util.List<java.lang.String> tagsPresent,
                    java.util.List<java.lang.String> tagsRemoved,
                    java.lang.String initiatingUser,
                    AccessType accessType,
                    byte doorNumber,
                    java.util.Date createdAt)
tagsAdded - List of UID's for tags "added".tagsPresent - List of UID's for tags "present".tagsRemoved - List of UID's for tags "removed".initiatingUser - Initiating user's name (empty if none [manual scan]).accessType - Access type used by initiating user (if any). Value of AccessType enum.createdAt - Creation date of the inventory.@Deprecated public int getId()
public java.util.List<java.lang.String> getTagsAll()
public java.util.List<java.lang.String> getTagsPresent()
public java.util.List<java.lang.String> getTagsAdded()
public java.util.List<java.lang.String> getTagsRemoved()
public java.util.Date getCreationDate()
public static Inventory generateLastInventory(Inventory previousInventory, java.util.List<java.lang.String> tagsList)
previousInventory - Device previous inventory (which was the "last inventory" before a new scan completed).tagsList - List of tags UID scanned during this last scan operation.public int getNumberTotal()
public int getNumberAdded()
public int getNumberRemoved()
public int getNumberPresent()
public void setInitiatingUserName(java.lang.String userName)
userName - Granted user's name.public java.lang.String getUsername()
public AccessType getAccessType()
public void setAccessType(AccessType accessType)
accessType - Value of AccessType enum.public byte getDoorNumber()
public void setDoorNumber(byte doorNumber)
doorNumber - Number of the door.public java.lang.String serialize()
public static Inventory deserialize(java.lang.String serializedInventory)
serializedInventory - Serialized Inventory.