Package com.clover.sdk.v3.inventory
Class InventoryContract
- java.lang.Object
-
- com.clover.sdk.v3.inventory.InventoryContract
-
public final class InventoryContract extends Object
The contract between the inventory provider and apps. For more detailed information about inventory please readIInventoryService
. The content provider for inventory may be used directly by apps wishing to use aCursor
to navigate a large inventory database. Read Content provider basics for an overview of how to interact with a content provider. In this case only methods which read data such asContentResolver.query(Uri, String[], Bundle, CancellationSignal)
will work. Methods which write data will be rejected. Using this contract requires the client app havePermission.INVENTORY_R
permission. Note that there are frequently multiple content URIs which join multiple tables such asInventoryContract.ItemModifierGroup.CONTENT_WITH_NAME_URI
. These join tables are very helpful when a client app needs to display filtered results. In this particular example an app can retrieveModifierGroup
details for a particularItem
by querying the above content URI and selecting byInventoryContract.ItemModifierGroupColumns.ITEM_ID
. To insert/update/delete inventory use theIInventoryService
via binding to the AIDL service, or through the wrapper classInventoryConnector
. The inventory database is typically kept up to date using push notifications from the Clover server to the client, so in most cases any changes made through the web or through another device will be immediately reflected on all devices belonging to a particular merchant. When network connections are available but unreliable, the inventory service will attempt to synchronize its local database (i.e. the backing store for this content provider) with the server on a regular basis, usually on an interval no greater than 3 hours.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InventoryContract.Attribute
Contract for accessingAttribute
instances via content provider.static interface
InventoryContract.AttributeColumns
These columns correspond to fields of anAttribute
.static class
InventoryContract.Category
Contract for accessingCategory
instances via content provider.static interface
InventoryContract.CategoryColumns
These columns correspond to fields of anCategory
.static class
InventoryContract.Discount
Contract for accessingDiscount
instances via content provider.static interface
InventoryContract.DiscountColumns
These columns correspond to fields of anDiscount
.static class
InventoryContract.Group
Contract for accessingModifierGroup
instances via content provider.static interface
InventoryContract.GroupColumns
These columns correspond to fields of anModifierGroup
.static class
InventoryContract.Item
Contract for accessingItem
instances via content provider.static interface
InventoryContract.ItemColumns
These columns correspond to fields of anItem
.static class
InventoryContract.ItemGroup
Contract for accessingItemGroup
instances via content provider.static interface
InventoryContract.ItemGroupColumns
These columns correspond to fields of anItemGroup
.static interface
InventoryContract.ItemGroupsAndItemsColumns
These column names are used to access fields ofItemGroup
which have names identical toItem
or which are computed when querying via theInventoryContract.ItemGroup.CONTENT_URI_AND_ITEMS
URI.static class
InventoryContract.ItemModifierGroup
Contract for accessingItemModifierGroup
instances via content provider.static interface
InventoryContract.ItemModifierGroupColumns
These columns correspond to fields of anItemModifierGroup
.static class
InventoryContract.ItemOption
Contract for accessingOptionItem
instances via content provider.static interface
InventoryContract.ItemOptionColumns
These columns correspond to fields of anOptionItem
.static class
InventoryContract.ItemStock
Contract for accessingItemStock
instances via content provider.static interface
InventoryContract.ItemStockColumns
These columns correspond to fields of anItemStock
.static class
InventoryContract.ItemTag
Contract for accessingTagItem
instances via content provider.static interface
InventoryContract.ItemTagColumns
These columns correspond to fields of anTagItem
.static class
InventoryContract.ItemTaxRate
Contract for accessingTaxRateItem
instances via content provider.static interface
InventoryContract.ItemTaxRateColumns
These columns correspond to fields of anTaxRateItem
.static class
InventoryContract.MenuItem
Contract for accessingMenuItem
instances via content provider.static interface
InventoryContract.MenuItemColumns
These columns correspond to fields of anMenuItem
.static class
InventoryContract.MenuModifier
Contract for accessingMenuModifier
instances via content provider.static interface
InventoryContract.MenuModifierColumns
These columns correspond to fields of anMenuModifier
.static class
InventoryContract.MenuModifierGroup
Contract for accessingMenuModifierGroup
instances via content provider.static interface
InventoryContract.MenuModifierGroupColumns
These columns correspond to fields of anMenuModifierGroup
.static class
InventoryContract.MenuSection
Contract for accessingMenuSection
instances via content provider.static interface
InventoryContract.MenuSectionColumns
These columns correspond to fields of anMenuSection
.static class
InventoryContract.Modifier
Contract for accessingModifier
instances via content provider.static interface
InventoryContract.ModifierColumns
These columns correspond to fields of anModifier
.static class
InventoryContract.Option
Contract for accessingOption
instances via content provider.static interface
InventoryContract.OptionColumns
These columns correspond to fields of anOption
.static class
InventoryContract.OrderFee
Contract for accessingOrderFee
instances via content provider.static interface
InventoryContract.OrderFeeColumns
These columns correspond to fields of anOrderFee
.static class
InventoryContract.PrinterTag
Contract for accessingTagPrinter
instances via content provider.static interface
InventoryContract.PrinterTagColumns
These columns correspond to fields of anTagPrinter
.static class
InventoryContract.Tag
Contract for accessingTag
instances via content provider.static interface
InventoryContract.TagColumns
These columns correspond to fields of anTag
.static class
InventoryContract.TaxRate
Contract for accessingTaxRate
instances via content provider.static interface
InventoryContract.TaxRateColumns
These columns correspond to fields of anTaxRate
.static class
InventoryContract.TaxRule
Contract for accessing tax rule information.static interface
InventoryContract.TaxRuleColumns
Columns containing data for tax rules.static class
InventoryContract.TaxRuleItem
Contract for accessing tax rule andItem
associations via content provider.static interface
InventoryContract.TaxRuleItemColumns
Columns for rows of data mapping UUIDs of tax rules to items.static class
InventoryContract.TaxRuleTaxRate
Contract for accessing tax rule andTaxRate
association data.static interface
InventoryContract.TaxRuleTaxRateColumns
Columns for rows of data mapping UUIDs of tax rule toTaxRate
.
-
Field Summary
Fields Modifier and Type Field Description static String
ACCOUNT_NAME_PARAM
Clover use only.static String
ACCOUNT_TYPE_PARAM
Clover use only.static String
AUTH_TOKEN_PARAM
Clover use only.static String
AUTHORITY
The authority for the inventory providerstatic Uri
AUTHORITY_URI
A content:// style uri to the authority for the modifiers providerstatic String
COUNT_KEY
Integer result returned by call count methods.static String
GET_COUNT_METHOD
Call method to get the inventory item count.static String
GET_ITEM_MOD_OR_VAR_COUNT_METHOD
Call method to get the inventory item count.static String
GET_ITEMS_WITH_MODIFIERS_METHOD
Call method to get the inventory item count with modifiers.static String
GET_ITEMS_WITH_VARIANTS_METHOD
Call method to get the inventory item count with variants.static String
IS_SYNC_PARAM
Clover use only.
-
Constructor Summary
Constructors Constructor Description InventoryContract()
-
-
-
Field Detail
-
GET_COUNT_METHOD
public static final String GET_COUNT_METHOD
Call method to get the inventory item count.- See Also:
- Constant Field Values
-
GET_ITEM_MOD_OR_VAR_COUNT_METHOD
public static final String GET_ITEM_MOD_OR_VAR_COUNT_METHOD
Call method to get the inventory item count.- See Also:
- Constant Field Values
-
GET_ITEMS_WITH_VARIANTS_METHOD
public static final String GET_ITEMS_WITH_VARIANTS_METHOD
Call method to get the inventory item count with variants.- See Also:
- Constant Field Values
-
GET_ITEMS_WITH_MODIFIERS_METHOD
public static final String GET_ITEMS_WITH_MODIFIERS_METHOD
Call method to get the inventory item count with modifiers.- See Also:
- Constant Field Values
-
COUNT_KEY
public static final String COUNT_KEY
Integer result returned by call count methods.- See Also:
- Constant Field Values
-
AUTHORITY
public static final String AUTHORITY
The authority for the inventory provider- See Also:
- Constant Field Values
-
AUTHORITY_URI
public static final Uri AUTHORITY_URI
A content:// style uri to the authority for the modifiers provider
-
AUTH_TOKEN_PARAM
public static final String AUTH_TOKEN_PARAM
Clover use only.- See Also:
- Constant Field Values
-
ACCOUNT_NAME_PARAM
public static final String ACCOUNT_NAME_PARAM
Clover use only.- See Also:
- Constant Field Values
-
ACCOUNT_TYPE_PARAM
public static final String ACCOUNT_TYPE_PARAM
Clover use only.- See Also:
- Constant Field Values
-
IS_SYNC_PARAM
public static final String IS_SYNC_PARAM
Clover use only.- See Also:
- Constant Field Values
-
-