| java.lang.Object org.ofbiz.manufacturing.bom.ItemConfigurationTree
ItemConfigurationTree | public class ItemConfigurationTree (Code) | | It represents an (in-memory) bill of materials (in which each
component is an ItemConfigurationNode)
Useful for tree traversal (breakdown, explosion, implosion).
author: Jacopo Cappellato |
Constructor Summary | |
public | ItemConfigurationTree(String productId, String bomTypeId, Date inDate, GenericDelegator delegator) Creates a new instance of ItemConfigurationTree by reading downward
the productId's bill of materials (explosion).
If virtual products are found, it tries to configure them by running
the Product Configurator.
Parameters: productId - The product for which we want to get the bom. Parameters: bomTypeId - The bill of materials type (e.g. | public | ItemConfigurationTree(String productId, String bomTypeId, Date inDate, boolean explosion, GenericDelegator delegator) Creates a new instance of ItemConfigurationTree by reading
the productId's bill of materials (upward or downward).
If virtual products are found, it tries to configure them by running
the Product Configurator.
Parameters: productId - The product for which we want to get the bom. Parameters: bomTypeId - The bill of materials type (e.g. |
Method Summary | |
public ArrayList | getAllProductsId() It visits the in-memory tree that represents a bill of materials
and it collects all the productId it contains. | public String | getBomTypeId() Getter for property bomTypeId. | public Date | getInDate() Getter for property inDate. | public ItemConfigurationNode | getRoot() Getter for property root. | public float | getRootQuantity() Getter for property rootQuantity. | public boolean | isConfigured() It tells if the current (in-memory) tree representing
a product's bill of materials is completely configured
or not. | public void | print(StringBuffer sb) It visits the in-memory tree that represents a bill of materials
and it collects info of its nodes in the StringBuffer. | public void | print(ArrayList arr) It visits the in-memory tree that represents a bill of materials
and it collects info of its nodes in the ArrayList. | public void | setRootQuantity(float rootQuantity) Setter for property rootQuantity. | public void | sumQuantities(HashMap quantityPerNode) It visits the in-memory tree that represents a bill of materials
and it collects info of its nodes in the HashMap. |
rootQuantity | float rootQuantity(Code) | | |
ItemConfigurationTree | public ItemConfigurationTree(String productId, String bomTypeId, Date inDate, GenericDelegator delegator) throws GenericEntityException(Code) | | Creates a new instance of ItemConfigurationTree by reading downward
the productId's bill of materials (explosion).
If virtual products are found, it tries to configure them by running
the Product Configurator.
Parameters: productId - The product for which we want to get the bom. Parameters: bomTypeId - The bill of materials type (e.g. manufacturing, engineering, ...) Parameters: inDate - Validity date (if null, today is used). Parameters: delegator - The delegator used. throws: GenericEntityException - If a db problem occurs. |
ItemConfigurationTree | public ItemConfigurationTree(String productId, String bomTypeId, Date inDate, boolean explosion, GenericDelegator delegator) throws GenericEntityException(Code) | | Creates a new instance of ItemConfigurationTree by reading
the productId's bill of materials (upward or downward).
If virtual products are found, it tries to configure them by running
the Product Configurator.
Parameters: productId - The product for which we want to get the bom. Parameters: bomTypeId - The bill of materials type (e.g. manufacturing, engineering, ...) Parameters: inDate - Validity date (if null, today is used). Parameters: explosion - if true, a downward visit is performed (explosion);otherwise an upward visit is done (implosion). Parameters: delegator - The delegator used. throws: GenericEntityException - If a db problem occurs. |
getAllProductsId | public ArrayList getAllProductsId()(Code) | | It visits the in-memory tree that represents a bill of materials
and it collects all the productId it contains.
ArrayLsit conatining all the tree's productId. |
getBomTypeId | public String getBomTypeId()(Code) | | Getter for property bomTypeId.
Value of property bomTypeId. |
getInDate | public Date getInDate()(Code) | | Getter for property inDate.
Value of property inDate. |
getRootQuantity | public float getRootQuantity()(Code) | | Getter for property rootQuantity.
Value of property rootQuantity. |
isConfigured | public boolean isConfigured()(Code) | | It tells if the current (in-memory) tree representing
a product's bill of materials is completely configured
or not.
true if no virtual nodes (products) are present in the tree. |
print | public void print(StringBuffer sb)(Code) | | It visits the in-memory tree that represents a bill of materials
and it collects info of its nodes in the StringBuffer.
Method used for debug purposes.
Parameters: sb - The StringBuffer used to collect tree info. |
print | public void print(ArrayList arr)(Code) | | It visits the in-memory tree that represents a bill of materials
and it collects info of its nodes in the ArrayList.
Method used for bom breakdown (explosion/implosion).
Parameters: arr - The ArrayList used to collect tree info. |
setRootQuantity | public void setRootQuantity(float rootQuantity)(Code) | | Setter for property rootQuantity.
Parameters: rootQuantity - New value of property rootQuantity. |
sumQuantities | public void sumQuantities(HashMap quantityPerNode)(Code) | | It visits the in-memory tree that represents a bill of materials
and it collects info of its nodes in the HashMap.
Method used for bom summarized explosion.
Parameters: quantityPerNode - The HashMap that will contain the summarized quantities per productId. |
|
|