com.craftar
Class CraftAROnDeviceCollection
- java.lang.Object
-
- com.craftar.CraftARCollection
-
- com.craftar.CraftAROnDeviceCollection
public class CraftAROnDeviceCollection extends CraftARCollection
A CraftAROnDeviceCollection represents the set of Items from a given collection in the CraftAR database.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description CraftARItem
getItem(java.lang.String itemUUID)
Create a CraftARItem given the item UUID if the item exists.java.lang.String
getName()
java.util.ArrayList<java.lang.String>
getTokens()
java.util.ArrayList<java.lang.String>
listItems()
Get a list of the uuids of the items in this collectionvoid
sync(CraftAROnDeviceCollectionManager.SyncCollectionListener listener)
Synchronizes a collection from the CraftAR Service.void
sync(CraftAROnDeviceCollectionManager.SyncCollectionListener listener, java.lang.String token)
Synchronizes a collection from the CraftAR Service, using a specific token.-
Methods inherited from class com.craftar.CraftARCollection
getImageFieldTemplate, getPublicKey, getUUID
-
-
-
-
Method Detail
-
getTokens
public java.util.ArrayList<java.lang.String> getTokens()
- Returns:
- A list with the tokens of this
CraftARCollection
-
getName
public java.lang.String getName()
- Returns:
- The name of this
CraftARCollection
-
listItems
public java.util.ArrayList<java.lang.String> listItems()
Get a list of the uuids of the items in this collection- Returns:
- List containing strings with the uuids of the items in this collection
-
sync
public void sync(CraftAROnDeviceCollectionManager.SyncCollectionListener listener)
Synchronizes a collection from the CraftAR Service.- Parameters:
listener
- for the sync callbacks
-
sync
public void sync(CraftAROnDeviceCollectionManager.SyncCollectionListener listener, java.lang.String token)
Synchronizes a collection from the CraftAR Service, using a specific token.- Parameters:
listener
- for the sync callbackstoken
- Force the sync call to use this specific token (Could be useful if you want to revoke the token at some point, so an app does not longer sync).
-
getItem
public CraftARItem getItem(java.lang.String itemUUID)
Create a CraftARItem given the item UUID if the item exists. To see which item's are available in this collection, use the method#getItemUUIDS()
- Parameters:
uuid
- from the CraftAR service of the item to get from this collection.
-
-