X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cadi%2Fcore%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fcadi%2Fprincipal%2FCachedBasicPrincipal.java;h=1a733e04b48d0047126fff045af08b41cb0f5c21;hb=1296352d8eafee57f982a4342ad79ada4aa56d28;hp=f81e160d32d19965724611abce7c8fb920eafe26;hpb=4b5a7d721d994a49057e9bfb403c7bff1b376660;p=aaf%2Fauthz.git diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/principal/CachedBasicPrincipal.java b/cadi/core/src/main/java/org/onap/aaf/cadi/principal/CachedBasicPrincipal.java index f81e160d..1a733e04 100644 --- a/cadi/core/src/main/java/org/onap/aaf/cadi/principal/CachedBasicPrincipal.java +++ b/cadi/core/src/main/java/org/onap/aaf/cadi/principal/CachedBasicPrincipal.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -29,7 +29,7 @@ import org.onap.aaf.cadi.taf.HttpTaf; /** * Cached Principals need to be able to revalidate in the Background - * + * * @author Jonathan * */ @@ -44,7 +44,7 @@ public class CachedBasicPrincipal extends BasicPrincipal implements CachedPrinci this.timeToLive = timeToLive; expires = System.currentTimeMillis()+timeToLive; } - + public CachedBasicPrincipal(HttpTaf creator, String content, String domain, long timeToLive) throws IOException { super(content, domain); this.creator = creator; @@ -54,7 +54,7 @@ public class CachedBasicPrincipal extends BasicPrincipal implements CachedPrinci public CachedPrincipal.Resp revalidate(Object state) { Resp resp = creator.revalidate(this, state); - if(resp.equals(Resp.REVALIDATED))expires = System.currentTimeMillis()+timeToLive; + if (resp.equals(Resp.REVALIDATED))expires = System.currentTimeMillis()+timeToLive; return resp; }