Interface AssetAutoTagProvider<T>


public interface AssetAutoTagProvider<T>
Tags assets in conjunction with AssetAutoTagger. Implementations of this interface are called from AssetAutoTagger.tag(AssetEntry) to automatically tag assets.

Implementations must specify a value for the OSGi property model.class.name so they can be called only for the models they can handle. For example, an AssetAutoTagProvider that can analyze images from the Document Library and generate tags according to the image's content would have this OSGi property setting:

model.class.name=com.liferay.document.library.kernel.model.DLFileEntry

  • Method Summary

    Modifier and Type
    Method
    Description
    getTagNames(T model)
    Returns the tag names for a given model.
  • Method Details

    • getTagNames

      Collection<String> getTagNames(T model)
      Returns the tag names for a given model. To avoid a runtime error, the model's type must match that of the model.class.name property setting. For example, an AssetAutoTagProvider with model.class.name set to DLFileEntry would implement this method as:

      public List<String> getTagNames(DLFileEntry dlFileEntry)

      Parameters:
      model - the model
      Returns:
      the tag names for the model