Interface PrimaryAsset

All Known Implementing Classes:
CategoryAsset, ProductAsset

public interface PrimaryAsset
An interface for any relationship between the asset and the entity that can be primary. This is used by the AbstractPrimaryAssetCollisionService service to remove the entity's previous primary assets if a new one has been assigned.
Author:
Dima Myroniuk (dmyroniuk)
  • Method Summary

    Modifier and Type
    Method
    Description
    The context ID of the relationship.
    The context ID of the parent entity associated with this asset.
    boolean
    Determines whether this asset should be considered the primary asset for the entity.
    void
    setPrimary(boolean primary)
    Determines whether this asset should be considered the primary asset for the entity.
  • Method Details

    • getId

      String getId()
      The context ID of the relationship.
      Returns:
      the context ID of the relationship
    • isPrimary

      boolean isPrimary()
      Determines whether this asset should be considered the primary asset for the entity.

      For any parentId, there can only be one asset with this value set to true.

      Returns:
      true if this asset should be the primary asset for the entity, false otherwise
    • setPrimary

      void setPrimary(boolean primary)
      Determines whether this asset should be considered the primary asset for the entity.

      For any parentId, there can only be one asset with this value set to true.

      Parameters:
      primary - true if this asset should be the primary asset, false otherwise
    • getParentId

      String getParentId()
      The context ID of the parent entity associated with this asset.
      Returns:
      the context ID of the parent entity in the relationship