package gw.api.history uses java.util.concurrent.Callable uses java.util.Date uses gw.api.util.LocaleUtil class AccountCustomHistoryImpl extends AbstractCustomHistoryImpl { var account : Account construct(owner : Account) { super() account = owner } override function createCustomHistoryEvent(type : CustomHistoryType, description : Callable) : History { var history = new History(account) history.Account = account history.User = User.util.CurrentUser history.EventTimestamp = Date.CurrentDate history.Type = HistoryType.TC_CUSTOM history.CustomType = type if (description != null) { LocaleUtil.runAsCurrentLanguage(LocaleUtil.toLanguage(account.PrimaryLanguage), \ -> { history.Description = description.call() }) } return history } }