Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## SpaceTime.DataModel.VendorOrders
Interface VendorsManager

    public interface VendorsManager

The controller class for managing vendors indormation. Provides lookup and modification functionality. Passed by reference.

Method Summary
`void` | `AddResourceFunction(ResourceFunction fn)` Add new resource function
`void` | `AddVendor(java.lang.String id, java.lang.String label, java.lang.String[] resources, java.lang.String[] costs)` Add new vendor
`java.lang.String[]` | `GetAllResourceItemIds()` All items in the system
`java.lang.String[]` | `GetAllVendorIds()` All vendors in the system
`java.lang.String` | `GetCost(java.lang.String vendorId, java.lang.String itemId)` Return cost/Unknown price/Doesn't sell/Unknown if they sell or not
`CertainPlf` | `GetCostFunction()` Returns cost function
`double` | `GetCostFunctionWeight()` Cost function weight
`java.lang.String[]` | `GetItemsForService(java.lang.String service)` Get all real items that correspond to the service name
`java.lang.String` | `GetLowestCost(java.lang.String itemId)` Get lowest cost for item with specified ID
`ResourceItem` | `GetResourceItem(java.lang.String id)` Find item specification by item ID
`Vendor` | `GetVendor(java.lang.String id)` Find vendor by ID
`boolean` | `IsVendorListComplete()` Complete flag for vendors list
`void` | `RemoveVendorById(java.lang.String id)` Removes vendor with specified ID
`void` | `RemoveVendorByLabel(java.lang.String label)` Removes vendor with specified label
`ResourceFunction` | `ResourceFunctionAt(long index)` Resource function at specified index
`long` | `ResourceFunctionCount()` The count of resource functions

Method Detail

### GetAllVendorIds

    java.lang.String[] GetAllVendorIds()

  All vendors in the system

  Returns:

### GetAllResourceItemIds

    java.lang.String[] GetAllResourceItemIds()

  All items in the system

  Returns:

### GetCostFunction

    CertainPlf GetCostFunction()

  Returns cost function

### GetCostFunctionWeight

    double GetCostFunctionWeight()

  Cost function weight

### IsVendorListComplete

    boolean IsVendorListComplete()

  Complete flag for vendors list

### AddVendor

    void AddVendor(java.lang.String id,
                   java.lang.String label,
                   java.lang.String[] resources,
                   java.lang.String[] costs)

  Add new vendor

  Parameters:
    `id` -
    `label` -
    `resources` - - all items sold by the vendor
    `costs` - - the costs of sold items, should be alligned with "resources" param

### GetVendor

    Vendor GetVendor(java.lang.String id)

  Find vendor by ID

### RemoveVendorById

    void RemoveVendorById(java.lang.String id)

  Removes vendor with specified ID

### RemoveVendorByLabel

    void RemoveVendorByLabel(java.lang.String label)

  Removes vendor with specified label

### GetResourceItem

    ResourceItem GetResourceItem(java.lang.String id)

  Find item specification by item ID

### GetLowestCost

    java.lang.String GetLowestCost(java.lang.String itemId)

  Get lowest cost for item with specified ID

### ResourceFunctionCount

    long ResourceFunctionCount()

  The count of resource functions

### AddResourceFunction

    void AddResourceFunction(ResourceFunction fn)

  Add new resource function

  Parameters:
    `fn` -

### ResourceFunctionAt

    ResourceFunction ResourceFunctionAt(long index)

  Resource function at specified index

### GetItemsForService

    java.lang.String[] GetItemsForService(java.lang.String service)

  Get all real items that correspond to the service name

  Parameters:
    `service` -
  Returns:
    The list of ids

### GetCost

    java.lang.String GetCost(java.lang.String vendorId,
                             java.lang.String itemId)

  Return cost/Unknown price/Doesn't sell/Unknown if they sell or not

  Parameters:
    `vendorId` -
    `itemId` -
  Returns:

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD