Skip navigation links
com.adobe.cq.commerce.api.collection

Interface ProductCollectionManager

    • Method Detail

      • getProductCollections

        java.util.Iterator<ProductCollection> getProductCollections(Product product)
        Returns the product collections that reference a product.
        Parameters:
        product -
        Returns:
        An Iterator over the ProductCollections referencing the product.
      • getCollection

        ProductCollection getCollection(java.lang.String path)
        Returns a product collection for the given path or an ID uniquely identifying the ProductCollection to the external commerce engine. It returns null if given path/ID is not a product collection or is not defined
        Parameters:
        path - path/ID that represents the collection
        Returns:
        The ProductCollection representing the collection.
      • createCollection

        ProductCollection createCollection(java.lang.String parentPath,
                                           java.lang.String name)
                                    throws CommerceException
        Creates a product collection with a given name under the parentPath.
        Parameters:
        parentPath - parent path where collection needs to be created.
        name - The name for collection.
        Returns:
        The ProductCollection representing the created collection.
        Throws:
        CommerceException - if the collection was not created
      • createCollection

        ProductCollection createCollection(java.lang.String parentPath,
                                           java.lang.String name,
                                           java.util.Map<java.lang.String,java.lang.Object> properties)
                                    throws CommerceException
        This method creates a product collection with a given name under the parentPath.
        Parameters:
        parentPath - parent path where collection needs to be created.
        name - The name for collection.
        properties - The additional data for product collection
        Returns:
        The ProductCollection representing the created collection.
        Throws:
        CommerceException - if the collection was not created
      • updateCollection

        void updateCollection(ProductCollection collection,
                              java.util.Map<java.lang.String,java.lang.Object> properties)
                       throws CommerceException
        Updates the ProductCollection.
        Parameters:
        collection - the collection to be updated.
        properties - The additional data for product collection
        Throws:
        CommerceException - if the collection was not updated

"Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"