Expiration Notifier

For the most up-to-date documentation, please visit docs.brix.ch

This plugin sends notification E-Mails about expiring assets.

More specifically spoken it searches for assets which fulfill a certain date-based condition and then determines a list of notification recipients for each asset found.

The primary use case is to send warnings about expiring usage rights to users who downloaded the expiring asset in the past.

Properties

To be configured in {home}/appserver/conf/custom.properties

You can define several expiration notifiers by incrementing the counter after expirationNotifier:

  • expirationNotifier.1.someProperty=...
  • expirationNotifier.2.someProperty=...

In the following documentation, 1 will be used as an example.

To apply a property to all notifiers, simply use default instead of the number, e.g. expirationNotifier.default.someProperty=.... Numbered properties will still override the default value if defined.

expirationNotifier.license

type: String, required: yes, default: -

license key (delivered by brix IT Solutions)

expirationNotifier.1.warnAheadPeriodInDays

type: int, required: yes

How many days before reaching the expiration date should the notification be sent?

expirationNotifier.1.assetFinders

type: list of bean names, required: yes

A comma-separated list of bean names of type ExpiringAssetsFinder. By default the following asset finder beans are available:

  • availabilityExpiringAssetsFinder - Finds assets based on the Valid to date of the general Asset Availability.
  • dateInfofieldExpiringAssetsFinder - Finds assets based on a configured information field of type Date. See dateInfofieldExpiringAssetsFinder.informationFieldId.

You can also define your own custom asset finder by implementing the ExpiringAssetsFinder interface.

public interface ExpiringAssetsFinder {
    Iterable<ExpiringAsset> getExpiringAssets(Date fromDate, Date toDate);
}
expirationNotifier.1.dateInfofieldExpiringAssetsFinder.informationFieldId

type: long, required: yes (if dateInfofieldExpiringAssetsFinder is used)

The ID of the Date information field to use for dateInfofieldExpiringAssetsFinder.

expirationNotifier.1.recipientFinders

type: list of bean names, required: yes, default: -

A comma-separated list of bean names of type NotificationRecipientFinder. Each NotificationRecipientFinder returns a set of notification recipients for each asset. By default the following recipient finder beans are available:

You can also define your own custom recipient finder by implementing the NotificationRecipientFinder interface.

public interface NotificationRecipientFinder {
    Set<Recipient> findRecipientsForExpiredAsset(Asset asset);
}
expirationNotifier.1.globalStorageNotificationRecipientFinder.globalStorageKey

type: string, required: if globalStorageNotificationRecipientFinder is used

The Global Storage Key to use in globalStorageNotificationRecipientFinder.

Known values:

  • DownloadMail
expirationNotifier.1.staticNotificationRecipientFinder.staticEmails

type: list of strings (comma-separated), required: if staticNotificationRecipientFinder is used

Static list of e-mail addresses to notify, regardless of their involvement, e.g. application owner or the marketing department.

expirationNotifier.1.staticUsersNotificationRecipientFinder.userIds

type: list of IDs (comma-separated), required: no

A list of IDs of CELUM users to notify.

expirationNotifier.1.staticUsersNotificationRecipientFinder.userGroupIds

type: list of IDs (comma-separated), required: no

A list of IDs of CELUM user groups to notify. Users will be determined recursively.

expirationNotifier.1.subjectMessageKey

type: string, required: no, default: expirationNotifier.mail.subject

The Spring message key to use to generate the mail subject. It is possible to use placeholders in the form $[propertyName] in your localized message. These will automatically be replaced with the corresponding configuration value, e.g. $[warnAheadPeriodInDays] will be replaced with the number value configured for the current notifier.

expirationNotifier.1.mailTemplatePath

type: string, required: no, default: ch.brix.expirationNotifier.default

The path to the velocity mail template.

expirationNotifier.1.deleteExpiringAssets

type: boolean, required: no, default: false

Whether to delete all assets matched by the configured assetFinders. Use with caution!

Example

Basic example:

expirationNotifier.1.warnAheadPeriodInDays=30
expirationNotifier.1.assetFinders=availabilityExpiringAssetsFinder
expirationNotifier.1.recipientFinders=statisticsNotificationRecipientFinder

Advanced example with multiple finders:

expirationNotifier.1.warnAheadPeriodInDays=60
expirationNotifier.1.assetFinders=availabilityExpiringAssetsFinder,dateInfofieldExpiringAssetsFinder
expirationNotifier.1.dateInfofieldExpiringAssetsFinder.informationFieldId=130
expirationNotifier.1.recipientFinders=statisticsNotificationRecipientFinder,staticNotificationRecipientFinder
expirationNotifier.1.staticNotificationRecipientFinder.staticEmails=dam-owner@company.com

Compatibility Matrix

expirationNotifier CELUM
1.0-5.12.4 to 1.5.0-5.12.4 5.12.4
1.6.1-5.13.3 5.13.3
1.6.2-5.13.4 5.13.4
1.6.2-6.4.0 6.4.0 (tested up to 6.5.2)

Release Notes

1.0

Released 2017-10-26

  • Initial Version

1.4.1

Released 2018-04-12

  • License check added

1.4.2

Released 2018-04-12

  • Code optimizations

1.5.0

Released 2019-01-07

  • Added "Delete expiring assets" feature
  • Optimized license handling

1.6.0

Released 2019-06-24

  • Added possibility to notify users by user or user group ID via staticUsersNotificationRecipientFinder