java.lang.Object
de.hybris.platform.integrationservices.util.files.TestItemsXml
All Implemented Interfaces:
ItemsXml

public class TestItemsXml extends Object implements ItemsXml
Representation of items types in an items.xml file for the test purposes.
  • Method Details

    • getContextTypeCodes

      public Collection<String> getContextTypeCodes()
      Description copied from interface: ItemsXml
      Retrieves all type codes, which directly or indirectly present in this item XML file
      Specified by:
      getContextTypeCodes in interface ItemsXml
      Returns:
      type codes for complex type, enums, map types, etc., which are defined in this item XML and also all type codes for the types extended by the items in this items XML. If this file is empty, then an empty collection is returned;
    • getCreatedTypeCodes

      public Collection<String> getCreatedTypeCodes()
      Description copied from interface: ItemsXml
      Retrieves all type codes, which explicitly present and created in this file. If a type is present but simply adds more attributes to a type that was created in a different file, then it's excluded from the type codes returned by this method.
      Specified by:
      getCreatedTypeCodes in interface ItemsXml
      Returns:
      a collection of item type codes defined in this items.xml file or an empty collection, if this file is empty.
    • getItemTypes

      public Collection<ItemType> getItemTypes()
      Description copied from interface: ItemsXml
      Retrieves item types defined in this file.
      Specified by:
      getItemTypes in interface ItemsXml
      Returns:
      all item types contained in this items.xml or an empty collection, if this file does not contain complex item types.
    • containsAttribute

      public boolean containsAttribute(String itemType, String attributeName)
      Description copied from interface: ItemsXml
      Checks whether the specified item type attribute is present in the context of this items.xml file.
      Specified by:
      containsAttribute in interface ItemsXml
      Parameters:
      itemType - type code of the item that should contain the specified attribute. It may be not only item type explicitly defined in this file but also an item type inherited by an item definition in this file or an item type from referenced in a relation in this file, etc.
      attributeName - name of the attribute to check for the existence in the specified item type. The attribute may be defined in this file or used in a relation or in an inherited item type, etc.
      Returns:
      true, if the specified item contains the attribute; false, if either the item is not found for the specified itemType or the item does not contain the specified attribute.