Oracle Fusion Middleware
Oracle WebLogic Server API Reference
11g Release 1 (10.3.5)

Part Number E13941-05

weblogic.wsee.security.saml
Class SAMLAttributeStatementDataImpl

java.lang.Object
  extended by weblogic.wsee.security.saml.SAMLAttributeStatementDataImpl
All Implemented Interfaces:
SAMLAttributeStatementData

public class SAMLAttributeStatementDataImpl
extends Object
implements SAMLAttributeStatementData

This object represents the attributes in a single AttributeStatment.


Constructor Summary
SAMLAttributeStatementDataImpl()
          Default constructor.
SAMLAttributeStatementDataImpl(Collection<SAMLAttributeData> attrs)
          Constructor.
 
Method Summary
 void addAttributeInfo(Collection<SAMLAttributeData> attrs)
          Adds a collection of attributes to this instance, to the end of the existing list, in the order that the param Collection iterates through the Collection.
 void addAttributeInfo(SAMLAttributeData attr)
          Adds a single attribute to this instance, at the end of the existing list.
 Collection<SAMLAttributeData> getAttributeInfo()
          Returns a collection of attributes contained by a single AttributeStatement of a SAML Assertion.
 SAMLAttributeData getAttributeInfo(String attributeName)
          Returns the SAMLAttributeInfo object for a given attribute name.
 Collection<SAML2AttributeStatementInfo> getCollectionsForSAML2AttributeStatementInfo()
          build a collection of SAML2AttributeStatementInfo objects for SAML 2.0
 Collection<SAMLAttributeStatementInfo> getCollectionsForSAMLAttributeStatementInfo()
          build a collection of SAMLAttributeStatementInfo objects for SAML 1.1
 Map<String,String> getNameValuePair()
          Generate the Map object with name and value pair.
 boolean hasAttributeInfo(String attributeName)
          check if the SAMLAttributeInfo object exist for a given attribute name.
 boolean hasAttributeValue(String attributeName, String attributeValue)
           
 boolean isAttributeOnlyRequest()
          check if if this is a SAML Attribute only request.
 boolean isEmpty()
          check if this has empty SAML Attributes collection
 void setAttributeOnlyRequest(boolean attributeOnlyRequest)
          set this is a SAML Attribute only request.
 int size()
          return the size of the SAML Attributes collection in this object.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SAMLAttributeStatementDataImpl

public SAMLAttributeStatementDataImpl()
Default constructor. The instance represents an empty SAML assertion AttributeStatement. It is expected that SAMLAttributeInfo elements will be added to this instance.


SAMLAttributeStatementDataImpl

public SAMLAttributeStatementDataImpl(Collection<SAMLAttributeData> attrs)
Constructor. The instance represents a SAML AttributeStatement with multiple Attributes.

Parameters:
attrs - represents the attributes contained in a single AttributeStatment of a SAML assertion
Method Detail

addAttributeInfo

public void addAttributeInfo(SAMLAttributeData attr)
Adds a single attribute to this instance, at the end of the existing list.

Specified by:
addAttributeInfo in interface SAMLAttributeStatementData
Parameters:
attr - represents a single attribute to be added

addAttributeInfo

public void addAttributeInfo(Collection<SAMLAttributeData> attrs)
Adds a collection of attributes to this instance, to the end of the existing list, in the order that the param Collection iterates through the Collection.

Specified by:
addAttributeInfo in interface SAMLAttributeStatementData
Parameters:
attrs - represents multiple attributes to be added

getAttributeInfo

public Collection<SAMLAttributeData> getAttributeInfo()
Returns a collection of attributes contained by a single AttributeStatement of a SAML Assertion. The returned Collection is immutable and may be empty.

Specified by:
getAttributeInfo in interface SAMLAttributeStatementData
Returns:
all attributes to be included by a single AttributeStatement

isAttributeOnlyRequest

public boolean isAttributeOnlyRequest()
check if if this is a SAML Attribute only request. Note: this is used only for the request.

Specified by:
isAttributeOnlyRequest in interface SAMLAttributeStatementData
Returns:
true if this is a SAML Attribute only request.

setAttributeOnlyRequest

public void setAttributeOnlyRequest(boolean attributeOnlyRequest)
set this is a SAML Attribute only request.

Specified by:
setAttributeOnlyRequest in interface SAMLAttributeStatementData
Parameters:
attributeOnlyRequest - set true if this is a SAML Attribute only request

isEmpty

public boolean isEmpty()
check if this has empty SAML Attributes collection

Specified by:
isEmpty in interface SAMLAttributeStatementData
Returns:
true if this is an empty, false otherwise

size

public int size()
return the size of the SAML Attributes collection in this object. 0 will be return for empty attributes.

Specified by:
size in interface SAMLAttributeStatementData
Returns:
the size of the SAML Attributes collection

getAttributeInfo

public SAMLAttributeData getAttributeInfo(String attributeName)
Returns the SAMLAttributeInfo object for a given attribute name. null will be return, if the attribute is not found.

Specified by:
getAttributeInfo in interface SAMLAttributeStatementData
Parameters:
attributeName - name of the attribute to be searched
Returns:
attribute in SAMLAttributeInfo object in this AttributeStatement, null if the attribute is not found

hasAttributeInfo

public boolean hasAttributeInfo(String attributeName)
check if the SAMLAttributeInfo object exist for a given attribute name.

Specified by:
hasAttributeInfo in interface SAMLAttributeStatementData
Parameters:
attributeName - name of the attribute to be checked
Returns:
true if the given attribute name exists in this AttributeStatement, false otherwise

hasAttributeValue

public boolean hasAttributeValue(String attributeName,
                                 String attributeValue)
Specified by:
hasAttributeValue in interface SAMLAttributeStatementData
Parameters:
attributeName - name of the attribute to be searched
attributeValue - name of the attribute value to be search
Returns:

getCollectionsForSAML2AttributeStatementInfo

public Collection<SAML2AttributeStatementInfo> getCollectionsForSAML2AttributeStatementInfo()
build a collection of SAML2AttributeStatementInfo objects for SAML 2.0

Specified by:
getCollectionsForSAML2AttributeStatementInfo in interface SAMLAttributeStatementData
Returns:
collection of SAML2AttributeStatementInfo objects

getCollectionsForSAMLAttributeStatementInfo

public Collection<SAMLAttributeStatementInfo> getCollectionsForSAMLAttributeStatementInfo()
build a collection of SAMLAttributeStatementInfo objects for SAML 1.1

Specified by:
getCollectionsForSAMLAttributeStatementInfo in interface SAMLAttributeStatementData
Returns:
collection of SAMLAttributeStatementInfo objects

getNameValuePair

public Map<String,String> getNameValuePair()
Generate the Map object with name and value pair. The name will be the attribute name, and the value will be the String value of the attribute value.

Returns:
Map of attribute name and value pair. null if the object is empty.

toString

public String toString()
Overrides:
toString in class Object

Copyright 1996, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Oracle WebLogic Server API Reference
11g Release 1 (10.3.5)

Part Number E13941-05