Interface IProductComponent

All Superinterfaces:
IProductComponentLinkSource, IProductObject, IRuntimeObject
All Known Implementing Classes:
ProductComponent

public interface IProductComponent extends IRuntimeObject, IProductObject
Interface for all product components.
Author:
Jan Ortmann
  • Method Details

    • getRepository

      IRuntimeRepository getRepository()
      Returns the repository this product component belongs to. This method never returns null.
      Specified by:
      getRepository in interface IProductComponentLinkSource
      Returns:
      The IRuntimeRepository that was used to create this IProductComponentLinkSource
    • getId

      String getId()
      Returns the product component's id that uniquely identifies it in the repository it belongs to.
    • getKindId

      String getKindId()
      Returns the id of the product component kind that this product component belongs to.
    • getVersionId

      String getVersionId()
      Returns the version id that identifies this product component in its kind.
    • isVariant

      boolean isVariant()
      A variant is a product component that is based on another product component (hence varied base). It uses the varied base as a template and "changes" specific values.
      Returns:
      true if this is a variant of another IProductComponent, false for regular product components.
      See Also:
    • getVariedBase

      IProductComponent getVariedBase()
      Allows distinguishing variants not only by their product component type but also their varied base. isVariant() allows determining whether a product component is a variant.
      Returns:
      the IProductComponent this IProductComponent is based on. Returns null if it is a regular product component or the variedBase can not be found in the IRuntimeRepository.
      See Also:
    • getValidTo

      DateTime getValidTo()
      Returns the date when this product component expires. Returning null means no end of the validity period.
    • getGenerationBase

      IProductComponentGeneration getGenerationBase(Calendar effectiveDate)
      Returns the generation that is effective on the given date or null if no generation is effective on that date.
      Throws:
      UnsupportedOperationException - if this product component has no product component generations.
      NullPointerException - if effective date is null.
    • getLatestProductComponentGeneration

      IProductComponentGeneration getLatestProductComponentGeneration()
      Returns the latest product component generation of the provided product component or null if non available.
      Throws:
      UnsupportedOperationException - if this product component has no product component generations.
    • isChangingOverTime

      boolean isChangingOverTime()
      Returns true if this product component has product component generations.
      Since:
      3.15
    • getDescription

      String getDescription(Locale locale)
      Returns the description for this product component in the specified locale. If there is no description in the specified locale, it tries to find the description in the locale's language. If there is also no description in the locale's language it returns the empty string.
      Returns:
      the description for the given locale/language or an empty string if no description exists for the given locale