Package com.sun.identity.saml.assertion
Class AuthorizationDecisionStatementBase
java.lang.Object
com.sun.identity.saml.assertion.Statement
com.sun.identity.saml.assertion.SubjectStatement
com.sun.identity.saml.assertion.AuthorizationDecisionStatementBase
- Direct Known Subclasses:
AuthorizationDecisionStatement
The
AuthorizationDecisionStatement element supplies a statement
by the issuer that the request for access by the specified subject to the
specified resource has resulted in the specified decision on the basis of
some optionally specified evidence.
This class is an abstract base class for all AuthorizationDecisionStatement
implementations and encapsulates common functionality.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTheDecisionTypeis an inner class defining constants for the type of Decisions than can be conveyed by anAuthorizationDecisionStatement. -
Field Summary
FieldsFields inherited from class com.sun.identity.saml.assertion.SubjectStatement
_subjectFields inherited from class com.sun.identity.saml.assertion.Statement
ATTRIBUTE_STATEMENT, AUTHENTICATION_STATEMENT, AUTHORIZATION_DECISION_STATEMENT, NOT_SUPPORTED -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructorAuthorizationDecisionStatementBase(Subject subject, String resource, int decision, List action) Constructs aAuthorizationDecisionStatementinstance.AuthorizationDecisionStatementBase(Subject subject, String resource, int decision, List action, EvidenceBase evidence) Constructs an instance ofAuthorizationDecisionStatement.Constructs anAuthorizationStatementelement from an existing XML block. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ActioncreateAction(Element actionElement) Creates appropriate Action Instanceprotected abstract EvidenceBasecreateEvidence(Element evidenceElement) Creates appropriate Evidence Instanceprotected abstract SubjectcreateSubject(Element subjectElement) Creates appropriate Subject InstanceReturns the action(s) fromAuthorizationStatement.intReturns the decision forAuthorizationStatement.Returns the resource fromAuthorizationStatementintReturns the real type of statement.toString()Returns a String representation of theAuthorizationStatement.toString(boolean includeNS, boolean declareNS) Returns a String representation of theAuthorizationStatement.Methods inherited from class com.sun.identity.saml.assertion.SubjectStatement
getSubject, setSubject
-
Field Details
-
_evidence
-
-
Constructor Details
-
AuthorizationDecisionStatementBase
protected AuthorizationDecisionStatementBase()Default constructor -
AuthorizationDecisionStatementBase
Constructs anAuthorizationStatementelement from an existing XML block.- Parameters:
element- representing a DOM tree element- Throws:
SAMLException- if there is an error in the sender or in the element definition.
-
AuthorizationDecisionStatementBase
public AuthorizationDecisionStatementBase(Subject subject, String resource, int decision, List action, EvidenceBase evidence) throws SAMLException Constructs an instance ofAuthorizationDecisionStatement.- Parameters:
subject- (required) A Subject objectresource- (required) A String identifying the resource to which access authorization is sought.decision- (required) The decision rendered by the issuer with respect to the specified resource. The value is of theDecisionTypesimple type.action- (required) A List of Action objects specifying the set of actions authorized to be performed on the specified resource.evidence- (optional) An Evidence object representing a set of assertions that the issuer replied on in making decisions.- Throws:
SAMLException- if there is an error in the sender.
-
AuthorizationDecisionStatementBase
public AuthorizationDecisionStatementBase(Subject subject, String resource, int decision, List action) throws SAMLException Constructs aAuthorizationDecisionStatementinstance.- Parameters:
subject- (required) A Subject objectresource- (required) A String identifying the resource to which access authorization is sought.decision- (required) The decision rendered by the issuer with respect to the specified resource. The value is of theDecisionTypesimple type.action- (required) A List of Action objects specifying the set of actions authorized to be performed on the specified resource.- Throws:
SAMLException- if there is an error in the sender.
-
-
Method Details
-
createEvidence
Creates appropriate Evidence Instance- Parameters:
evidenceElement- the Evidence Element- Returns:
- the Evidence Object
- Throws:
SAMLException
-
createSubject
Creates appropriate Subject Instance- Parameters:
subjectElement- the Subject Element- Returns:
- the Subject Object
- Throws:
SAMLException
-
createAction
Creates appropriate Action Instance- Parameters:
actionElement- the Action Element- Returns:
- the Action Object
- Throws:
SAMLException
-
getAction
Returns the action(s) fromAuthorizationStatement.- Returns:
- A List of Action object(s) specifying the set of actions authorized to be performed on the specified resource.
-
getResource
Returns the resource fromAuthorizationStatement- Returns:
- A String identifying the resource to which access authorization is sought.
-
getDecision
public int getDecision()Returns the decision forAuthorizationStatement.- Returns:
- The decision string such as
permitdenyindetereminate
-
getStatementType
public int getStatementType()Returns the real type of statement. This method returnsStatement.AUTHORIZATION_DECISION_STATEMENT.- Specified by:
getStatementTypein classStatement- Returns:
Statement.AUTHORIZATION_DECISION_STATEMENT.
-
toString
Returns a String representation of theAuthorizationStatement. -
toString
Returns a String representation of theAuthorizationStatement.- Specified by:
toStringin classSubjectStatement- Parameters:
includeNS- Determines whether or not the namespace qualifier is prepended to the Element when converteddeclareNS- Determines whether or not the namespace is declared within the Element.- Returns:
- A String representation of the
<AuthorizationDecisionStatement>element.
-