axis_examplecompt_changesinfo-opsversion-1.30version-2.00version-3.01version-3.02
Last change
on this file since 15100e9 was
8780cbec,
checked in by Jay Jacobs <Jay.Jacobs@…>, 15 years ago
|
ABAC sources from Cobham
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | package edu.stanford.rt; |
---|
2 | |
---|
3 | import java.io.FileInputStream; |
---|
4 | import java.io.File; |
---|
5 | |
---|
6 | import edu.stanford.rt.credential.RTContext; |
---|
7 | import edu.stanford.rt.credential.CredentialStore; |
---|
8 | import edu.stanford.rt.credential.DomainSpecification; |
---|
9 | import edu.stanford.rt.parser.RTParser; |
---|
10 | import edu.stanford.rt.util.*; |
---|
11 | |
---|
12 | /** |
---|
13 | * @author Ninghui Li, Sandra Qiu <br> |
---|
14 | * |
---|
15 | */ |
---|
16 | public class Test1 |
---|
17 | { |
---|
18 | |
---|
19 | public static void main(String argv[]) |
---|
20 | { |
---|
21 | if (argv.length != 1) |
---|
22 | { |
---|
23 | System.out.println("java edu.stanford.rt.Main file_name"); |
---|
24 | System.exit(1); |
---|
25 | } |
---|
26 | |
---|
27 | try |
---|
28 | { |
---|
29 | RTParser rt = new RTParser(); |
---|
30 | // System domain is created here. |
---|
31 | RTContext context = new RTContext(rt); |
---|
32 | CredentialStore store = new CredentialStore(rt); |
---|
33 | |
---|
34 | rt.parseCredentialStore( |
---|
35 | new FileInputStream(new File(argv[0])), |
---|
36 | context, |
---|
37 | store); |
---|
38 | |
---|
39 | System.out.println(context.toString(" ")); |
---|
40 | System.out.println(store.toString(" ")); |
---|
41 | } |
---|
42 | catch (Exception ex) |
---|
43 | { |
---|
44 | ex.printStackTrace(); |
---|
45 | } |
---|
46 | |
---|
47 | } |
---|
48 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.