Package com.liferay.asset.auto.tagger
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
-
Method Details
-
getTagNames
Returns the tag names for a given model. To avoid a runtime error, the model's type must match that of themodel.class.name
property setting. For example, anAssetAutoTagProvider
withmodel.class.name
set toDLFileEntry
would implement this method as:public List<String> getTagNames(DLFileEntry dlFileEntry)
- Parameters:
model
- the model- Returns:
- the tag names for the model
-