psdi.app.inventory.unittest

Class ItemLibrary

  • java.lang.Object
    • psdi.app.inventory.unittest.ItemLibrary


  • public class ItemLibrary
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor and Description
      ItemLibrary() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void addItemToStoreroom(Item item, java.lang.String siteid, java.lang.String storeroom, double unitcost, double initialBalance) 
      static void addItemToStoreroom(Item item, java.lang.String siteid, java.lang.String storeroom, java.lang.String costType, double unitcost, java.lang.String defaultBin, double initialBalance, java.lang.String issueUnit, java.lang.String orderUnit, boolean consignment)
      Takes a non-rotating item passed in and adds the item to the storeroom.
      static Item changeStatusToActive(Item item, boolean rollToOrgandInventory)
      Use this method to change the status of an item to active
      static Item createBasicItem()
      Use this method to create a Item with the following options: Lot Type: No Lot Non-rotating non-capitalized Use this method only for a an item that is only needed for one JUnit
      static Item createBasicItem(java.lang.String name)
      Use this method to create a workorder that will spawn over multiple unittest.
      static void setAutoInvUseMaxVars(java.lang.String autoinvuse, java.lang.String orgid) 
      static void setCostTypeMaxVars(java.lang.String costAsset, java.lang.String issueCost, java.lang.String siteid) 
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ItemLibrary

        public ItemLibrary()
    • Method Detail

      • createBasicItem

        public static Item createBasicItem()
        Use this method to create a Item with the following options: Lot Type: No Lot Non-rotating non-capitalized Use this method only for a an item that is only needed for one JUnit
        Returns:
      • createBasicItem

        public static Item createBasicItem(java.lang.String name)
        Use this method to create a workorder that will spawn over multiple unittest.
        Parameters:
        name - The name you want to give the mbo
        Returns:
        Either the created WO or a saved WO, if one exists.
      • changeStatusToActive

        public static Item changeStatusToActive(Item item,
                                                boolean rollToOrgandInventory)
                                         throws java.rmi.RemoteException,
                                                MXException
        Use this method to change the status of an item to active
        Parameters:
        item - The item to change the status of
        rollToOrgandInventory - True if the status should roll down to item/org details or not.
        Returns:
        The saved item
        Throws:
        java.rmi.RemoteException
        MXException
      • addItemToStoreroom

        public static void addItemToStoreroom(Item item,
                                              java.lang.String siteid,
                                              java.lang.String storeroom,
                                              double unitcost,
                                              double initialBalance)
                                       throws java.rmi.RemoteException,
                                              MXException
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        adddItemToStoreroom
      • addItemToStoreroom

        public static void addItemToStoreroom(Item item,
                                              java.lang.String siteid,
                                              java.lang.String storeroom,
                                              java.lang.String costType,
                                              double unitcost,
                                              java.lang.String defaultBin,
                                              double initialBalance,
                                              java.lang.String issueUnit,
                                              java.lang.String orderUnit,
                                              boolean consignment)
                                       throws java.rmi.RemoteException,
                                              MXException
        Takes a non-rotating item passed in and adds the item to the storeroom. When done, the inventory record will be available via the inventory relationship.
        Parameters:
        item - The item to be added to the storeroom
        siteid - What site to use
        storeroom - What storeroom to add it to
        The - cost type. Will default to average.
        unitcost - The cost for the unit
        defaultBin - The default bin to use. Can be null.
        initialBalance - The initial balance in the storeroom
        issueUnit - The issue unit to use. Will default to EACH.
        orderUnit - The order unit to use. Will default to EACH.
        consignment - If this is consignment or not. Should normally be false.
        Throws:
        java.rmi.RemoteException
        MXException
      • setAutoInvUseMaxVars

        public static void setAutoInvUseMaxVars(java.lang.String autoinvuse,
                                                java.lang.String orgid)
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setCostTypeMaxVars

        public static void setCostTypeMaxVars(java.lang.String costAsset,
                                              java.lang.String issueCost,
                                              java.lang.String siteid)
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception