source: java/net/deterlab/abac/CredentialFactorySpecialization.java @ ea38d81

abac0-leak
Last change on this file since ea38d81 was a1a9a47, checked in by Ted Faber <faber@…>, 11 years ago

Bump version

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