Upgrade to latest oparent
[aaf/authz.git] / authz-batch / src / main / java / com / att / authz / actions / URPrint.java
1 /*******************************************************************************
2  * Copyright (c) 2016 AT&T Intellectual Property. All rights reserved.
3  *******************************************************************************/
4 package com.att.authz.actions;
5
6 import com.att.authz.env.AuthzTrans;
7 import com.att.authz.helpers.UserRole;
8 import com.att.authz.layer.Result;
9 import org.onap.aaf.inno.env.util.Chrono;
10
11 public class URPrint implements Action<UserRole,Void> {
12         private String text;
13
14         public URPrint(String text) {
15                 this.text = text;
16         }
17
18         @Override
19         public Result<Void> exec(AuthzTrans trans, UserRole ur) {
20                 trans.info().log(text,ur.user,"to",ur.role,"expiring on",Chrono.dateOnlyStamp(ur.expires));
21                 return Result.ok();
22         }
23
24 }