axis_examplecompt_changesinfo-opsversion-2.00version-3.01version-3.02
Last change
on this file since df783c1 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
|
Rev | Line | |
---|
[8780cbec] | 1 | package com.nailabs.abac.access; |
---|
| 2 | |
---|
| 3 | import java.util.*; |
---|
| 4 | import edu.stanford.peer.rbtm.credential.*; |
---|
| 5 | |
---|
| 6 | public 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.