source: java/net/deterlab/abac/CredentialFactorySpecialization.java @ 0100d7b

abac0-leakabac0-meimei-idmei-rt0-nmei_rt0tvf-new-xml
Last change on this file since 0100d7b was a7f73b5, checked in by Ted Faber <faber@…>, 12 years ago

Document cleanup. Change a few visibilities.

  • Property mode set to 100644
File size: 1.4 KB
RevLine 
[aaadefd]1package net.deterlab.abac;
2
3import java.io.*;
4import java.util.*;
5import java.lang.reflect.*;
6
7
8/**
9 * This class parses or generates credentials.  The parser produces one or more
[a7f73b5]10 * Credentials.  The generator produces exactly one credential. Each class that
[aaadefd]11 * wants to be parsed and generated needs to export a static method that
12 * returns one of these.  For credentials that parse 1 credential to 1 input it
13 * will be a wrapper around a constructor.
14 * @author <a href="http://abac.deterlab.net">ISI ABAC team</a>
15 * @version 1.4
16 */
17public abstract class CredentialFactorySpecialization {
18    /**
19     * Parse one or more Credentials from the given input and IDs.  The
20     * sub-type of Credential returned is up to this class.
21     * @param is an InputStream to be parsed
22     * @param ids a Collection of Identity s to use in validating credentials.
23     * @return an array of Credentials
24     * @throws ABACException on parsing problems
25     */
26    public abstract Credential[] parseCredential(InputStream is, 
27            Collection<Identity> ids) throws ABACException;
28
29    /**
30     * Return an object derived from a credential with the given roles.
31     * @param head a Role, the head of the encoded ABAC statement
32     * @param tail a Role, the tail of the decoded ABAC statement
33     * @return a Credential encoding that ABAC statement
34     */
35    public abstract Credential generateCredential(Role head, Role tail);
36}
Note: See TracBrowser for help on using the repository browser.