Clover Coverage Report
Coverage timestamp: Sun Mar 23 2008 08:24:39 GMT
0   106   1   -
0   7   -   0
0     -  
1    
 
 
  Credentials       Line # 58 0 1 - -1.0
 
No Tests
 
1    /*
2    * Copyright (c) 2000-2005, University of Salford
3    * All rights reserved.
4    *
5    * Redistribution and use in source and binary forms, with or without
6    * modification, are permitted provided that the following conditions are met:
7    *
8    * Redistributions of source code must retain the above copyright notice, this
9    * list of conditions and the following disclaimer.
10    *
11    * Redistributions in binary form must reproduce the above copyright notice,
12    * this list of conditions and the following disclaimer in the documentation
13    * and/or other materials provided with the distribution.
14    *
15    * Neither the name of the University of Salford nor the names of its
16    * contributors may be used to endorse or promote products derived from this
17    * software without specific prior written permission.
18    *
19    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20    * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21    * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22    * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23    * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24    * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25    * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26    * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27    * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28    * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29    * POSSIBILITY OF SUCH DAMAGE.
30    */
31   
32    package issrg.pba;
33   
34    /**
35    * This class implements the Credentials: the initiator's Access Decision
36    * Information (ADI) in terms of the ISO 10181-3 access control
37    * (authorisation) framework.
38    *
39    * <p>Note that the standard does not restrict what the initiator's ADI
40    * should be. We suggest it could be the initiator-bound data that specifies
41    * certain access privileges, like security labels, user group inclusion
42    * statements, role assignments, etc. Note that we do not limit the ADI
43    * to the stated examples.
44    *
45    * <p>The ADI is represented as a set of values, this allows verification
46    * against the policy ( via set comparison) that the initiator has not done
47    * more than is allowed.
48    *
49    * <p>The caller should know if the object is a superset
50    * of another object (ie. the object contains another credential). This is
51    * sufficient for decision-making and delegation. Since the Credentials are a set,
52    * the two other methods intersection and union help optimise the operations.
53    *
54    * @author A Otenko
55    * @version 1.0
56    */
57   
 
58    public interface Credentials extends Cloneable {
59    /**
60    * This method tells if the Credentials contain the given subset of
61    * Credentials.
62    *
63    * @param subSet is the set to test against this
64    *
65    * @return true, if this set contains the given subset, or is equal to
66    * it; returns false if the subset is not wholly contained or is not equal
67    */
68    public boolean contains(Credentials subSet);
69   
70    /**
71    * This method returns the intersection of this set with the given set.
72    * It is supposed the operands are replaceable: <code>this.intersection(set)</code>
73    * should be equal to <code>set.intersection(this)</code> - it may
74    * produce an internally different object, but it should behave in the same way
75    * and equals method should return true when comparing such results.
76    *
77    * @param set is the set to intersect with
78    *
79    * @return the intersection Credentials; the resulting set is contained within
80    * both this Credentials and the given set
81    */
82    public Credentials intersection(Credentials set);
83   
84    /**
85    * This method returns the union of this set with the given set.
86    * It is supposed the operands are replaceable: <code>this.union(set)</code>
87    * should be equal to <code>set.union(this)</code> - it may
88    * produce an internally different object, but it should behave in the same way
89    * and equals method should return true when comparing such results.
90    *
91    * @param set is the set to join with
92    *
93    * @return the union Credentials; the resulting set contains both this
94    * Credentials and the given set
95    */
96    public Credentials union(Credentials set);
97   
98    /**
99    * This method creates a copy of the Credentials. It is essential
100    * for computing intermediate results.
101    *
102    * @return a copy of the credentials object
103    */
104    public Object clone();
105   
106    }