Class FinalProduct


  • public class FinalProduct
    extends java.lang.Object
    Helper class to manage products involved in an xjdf document.
    • Constructor Summary

      Constructors 
      Constructor Description
      FinalProduct()
      Default constructor.
      FinalProduct​(java.lang.Integer amount, java.lang.String descriptiveName)
      Custom constructor.
      FinalProduct​(Product rootProductPart, java.util.List<Product> allProductParts)
      Custom constructor creating a final product from the root product part and the list of all product parts.
    • Constructor Detail

      • FinalProduct

        public FinalProduct()
        Default constructor.
      • FinalProduct

        public FinalProduct​(java.lang.Integer amount,
                            java.lang.String descriptiveName)
        Custom constructor. Accepting multiple parameters for initializing.
      • FinalProduct

        public FinalProduct​(Product rootProductPart,
                            java.util.List<Product> allProductParts)
        Custom constructor creating a final product from the root product part and the list of all product parts.
        Parameters:
        rootProductPart - The root product part.
        allProductParts - The list of all product parts in the XJDF.
    • Method Detail

      • getProduct

        public Product getProduct()
        Return the root product part.
        Returns:
        The root product part
      • getDescriptiveName

        public java.lang.String getDescriptiveName()
        Returns the (root) product's descriptive name.
        Returns:
        The (root) product's descriptive name
      • setDescriptiveName

        public void setDescriptiveName​(java.lang.String descriptiveName)
        Set's the (root) product's descriptive name.
        Parameters:
        descriptiveName - The descriptive name to be set.
      • getAmount

        public java.lang.Integer getAmount()
        Returns the (root) product's amount.
        Returns:
        The (root) product's amount
      • setAmount

        public void setAmount​(java.lang.Integer amount)
        Set's the (root) product's amount.
        Parameters:
        amount - The amount value to be set.
      • getId

        public java.lang.String getId()
        Returns the (root) product's id.
        Returns:
        The (root) product's id
      • setId

        public void setId​(java.lang.String id)
        Set's the (root) product's id.
        Parameters:
        id - The id to be set.
      • addIntents

        public void addIntents​(ProductIntent... productIntents)
        Add intents to the product.
        Parameters:
        productIntents - The intents to be added.
      • addIntent

        public Intent addIntent​(ProductIntent productIntent)
        Add an intent to the product.
        Parameters:
        productIntent - The intent to be added.
        Returns:
        The generic intent object for customization.
      • getIntent

        public <T extends ProductIntentIntent getIntent​(java.lang.Class<T> productIntentType)
        Returns a product intent's intent element.
        Parameters:
        productIntentType - The type of the product intent.
        Returns:
        The generic intent element.
      • getIntents

        public java.util.List<Intent> getIntents()
        Return list of all intents.
        Returns:
        the list of intents.
      • getProductIntent

        public <T extends ProductIntent> T getProductIntent​(java.lang.Class<T> productIntentType)
        Returns a specific product intent.
        Parameters:
        productIntentType - The type of the product intent.
        Returns:
        The specific product intent.
      • getProductIntentTypes

        public java.util.List<java.lang.Class<?>> getProductIntentTypes()
      • getProductParts

        public java.util.List<Product> getProductParts()
        Return all product parts of the final product.
        Returns:
        All product parts of the final product.