KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > security > ActionsCache


1 package org.apache.slide.security;
2
3 import java.util.Map JavaDoc;
4
5 class ActionsCache {
6
7     Map JavaDoc aggregation; // actionNode -> Set-of-aggregated-nodes (direct aggregates)
8

9     Map JavaDoc aggregationClosure; // actionNode -> Set-of-aggregated-nodes (transitive closure)
10

11     boolean hasLoadingFailed;
12
13     ActionsCache() {
14         super();
15     }
16
17     void invalidate() {
18         hasLoadingFailed = false;
19         aggregation = null;
20         aggregationClosure = null;
21     }
22     
23     void fail() {
24         aggregation = null;
25         aggregationClosure = null;
26         hasLoadingFailed = true;
27     }
28
29     boolean hasBeenLoaded() {
30         return aggregation != null || hasLoadingFailed;
31     }
32
33     public boolean hasLoadingFailed() {
34         return hasLoadingFailed;
35     }
36
37 }
38
Popular Tags