source: fedd/abac-src/rbtm/access/AckPolicy.java @ d5e3b8e

axis_examplecompt_changesinfo-opsversion-1.30version-2.00version-3.01version-3.02
Last change on this file since d5e3b8e was 8780cbec, checked in by Jay Jacobs <Jay.Jacobs@…>, 15 years ago

ABAC sources from Cobham

  • Property mode set to 100644
File size: 674 bytes
RevLine 
[8780cbec]1package com.nailabs.abac.access;
2
3import java.util.*;
4import edu.stanford.peer.rbtm.credential.*;
5
6public class AckPolicy implements edu.stanford.peer.rbtm.RBTMConstants {
7
8    public HashMap factMap = new HashMap(FACT_MAP_SIZE);
9   
10    public void addAckFact(String base, String roleName, String expr) {
11        try {
12            factMap.put(new Role(base, roleName), 
13                        StaticCredential.getEntityExpression(expr));
14        }
15        catch(Exception ex) {
16            if(DEBUG)ex.printStackTrace();
17        }
18    }
19
20    public void addAckFact(Role role, EntityExpression req) {
21        factMap.put(role, req);
22    }
23
24    public EntityExpression requires(Role key) {
25        return (EntityExpression)factMap.get(key);
26    }
27
28}
Note: See TracBrowser for help on using the repository browser.