Project Aristotle - ArisID Attribute Services

org.openliberty.arisid
Interface IDigitalSubject

All Known Implementing Classes:
DigitalSubject

public interface IDigitalSubject

A DigitalSubject is the basic holder of attributes, predicates, and roles representing an Identity. A DigitalSubject is provided as retrieved Subject entity from an Attribute Authority. A DigitalSubject may be ANY addressable entity in an network. Some examples are: persons, servers, applications.


Method Summary
 boolean compare(IDigitalSubject subj)
          Compares the digital subjects to see if the contents are a match.
 IAttributeValue getAttributeValue(java.lang.String name)
          Returns the IAttributeValue containing the values for the request Attribute as identified by its name identifier.
 java.util.Map<java.lang.String,IAttributeValue> getAttrVals()
          A Map containing any requested IAttributeValue objects.
 java.lang.Exception getError()
          Returns an Exception or null depending on whether there was an error returning the subject.
 IMultiContextIdentifier getMultiContextIdentifier()
          If the subject is made from multiple attribute authorities, it will have a IMultiContextIdentifier.
 java.util.Map<java.lang.String,PredicateValue> getPredicateValues()
           
 IPrincipalIdentifier getPrincipalIdentifier()
          Returns the IPrincipalIdentifier (a subclass of java.security.Principal) for the subject.
 java.util.Set<java.lang.String> getRoles()
           
 java.lang.String getSubjectName()
          Returns a String representation of the subject identifier.
 boolean hasRole(java.lang.String role)
           
 boolean isError()
          Returns whether there was an error returning this subject.
 boolean isMultiContext()
          Returns whether this IDigitalSubject is based on multiple contexts.
 java.lang.Boolean isPredicateTrue(java.lang.String name)
          Returns whether a particular predicate condition is true.
 

Method Detail

getAttrVals

java.util.Map<java.lang.String,IAttributeValue> getAttrVals()
A Map containing any requested IAttributeValue objects. Note an AttributeValue may contain a value or an error.

Returns:
A Map where each IAttributeValue is indexed by its name identifier.

getAttributeValue

IAttributeValue getAttributeValue(java.lang.String name)
Returns the IAttributeValue containing the values for the request Attribute as identified by its name identifier.

Parameters:
name - The name identifier for the attribute request.
Returns:
An IAttributeValue containing the values for the requested attribute name identifier.

getSubjectName

java.lang.String getSubjectName()
Returns a String representation of the subject identifier. This method equivalent to IPrincipalIdentifier.getName().

Returns:
String subject key identifier.

getPrincipalIdentifier

IPrincipalIdentifier getPrincipalIdentifier()
Returns the IPrincipalIdentifier (a subclass of java.security.Principal) for the subject. This is the same identifier used for add, compare, delete, modify, read operations.

Returns:
A IPrincipalIdentifier

getMultiContextIdentifier

IMultiContextIdentifier getMultiContextIdentifier()
If the subject is made from multiple attribute authorities, it will have a IMultiContextIdentifier. This identifier can be used to locate the subject keys and context identifiers for each contributing authority.

Returns:
the IMulticontextIdentifier identifier if present or null

isMultiContext

boolean isMultiContext()
Returns whether this IDigitalSubject is based on multiple contexts.

Returns:
true if the Principal Identifier is an instance of IMultiContextIdentifier and multiple contexts are present.

isError

boolean isError()
Returns whether there was an error returning this subject.

Returns:
true if an error exists.

getError

java.lang.Exception getError()
Returns an Exception or null depending on whether there was an error returning the subject.

Returns:
an Exception that occurred returning this subject.

isPredicateTrue

java.lang.Boolean isPredicateTrue(java.lang.String name)
Returns whether a particular predicate condition is true.

Parameters:
name - The name id of a predicate.
Returns:
whether a particular predicate condition is present.

getPredicateValues

java.util.Map<java.lang.String,PredicateValue> getPredicateValues()
Returns:
A Map containing the results of all predicates requested.

hasRole

boolean hasRole(java.lang.String role)
Parameters:
role - The name id of the role to be returned.
Returns:
true if the role is present for the subject.

getRoles

java.util.Set<java.lang.String> getRoles()
Returns:
A set of String values representing the roles held by the Subject.

compare

boolean compare(IDigitalSubject subj)
Compares the digital subjects to see if the contents are a match. The name and principalintifier are not used in the compare.

Parameters:
subj - The DigitalSubject to be compared.
Returns:
True if all attributes, roles, and predicates are matched.

OpenLiberty.org - Licensed under Apache APL 2.0