|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.balana.ctx.Attribute
public class Attribute
Represents the AttributeType XML type found in the context schema.
Constructor Summary | |
---|---|
Attribute(URI id,
String issuer,
DateTimeAttribute issueInstant,
AttributeValue value,
boolean includeInResult,
int version)
Creates a new Attribute of the type specified in the given
AttributeValue .for XACML 3 with one AttributeValue |
|
Attribute(URI id,
String issuer,
DateTimeAttribute issueInstant,
AttributeValue value,
int version)
Creates a new Attribute for XACML 2 and XACML 1.X with one AttributeValue |
|
Attribute(URI id,
URI type,
String issuer,
DateTimeAttribute issueInstant,
List<AttributeValue> attributeValues,
boolean includeInResult,
int xacmlVersion)
Creates a new Attribute |
Method Summary | |
---|---|
String |
encode()
Encodes this Attribute into its XML form |
void |
encode(StringBuilder builder)
Encodes this Attribute into its XML form and writes this out to the provided
StringBuilder |
URI |
getId()
Returns the id of this attribute |
static Attribute |
getInstance(Node root,
int version)
Creates an instance of an Attribute based on the root DOM node of the XML data. |
DateTimeAttribute |
getIssueInstant()
Returns the moment at which the attribute was issued, or null if no issue time was provided |
String |
getIssuer()
Returns the issuer of this attribute, or null if no issuer was named |
URI |
getType()
Returns the data type of this attribute |
AttributeValue |
getValue()
a AttributeValue of this attribute,
or null if no value was included |
List<AttributeValue> |
getValues()
List of AttributeValue of this attribute,
or null if no value was included |
boolean |
isIncludeInResult()
Returns whether attribute must be present in response or not |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Attribute(URI id, String issuer, DateTimeAttribute issueInstant, AttributeValue value, boolean includeInResult, int version)
Attribute
of the type specified in the given
AttributeValue
.for XACML 3 with one AttributeValue
id
- the id of the attributeissuer
- the attribute's issuer or null if there is noneissueInstant
- the moment when the attribute was issued, or null if it's unspecifiedvalue
- the actual value associated with the attribute meta-dataincludeInResult
- whether to include this attribute in the result.version
- XACML versionpublic Attribute(URI id, String issuer, DateTimeAttribute issueInstant, AttributeValue value, int version)
Attribute
for XACML 2 and XACML 1.X with one AttributeValue
id
- the id of the attributeissuer
- the attribute's issuer or null if there is noneissueInstant
- the moment when the attribute was issued, or null if it's unspecifiedvalue
- actual List
of AttributeValue
associated withversion
- XACML versionpublic Attribute(URI id, URI type, String issuer, DateTimeAttribute issueInstant, List<AttributeValue> attributeValues, boolean includeInResult, int xacmlVersion)
Attribute
id
- the id of the attributetype
- the type of the attributeissuer
- the attribute's issuer or null if there is noneissueInstant
- the moment when the attribute was issued, or null if it's unspecifiedattributeValues
- actual List
of AttributeValue
associated withincludeInResult
- whether to include this attribute in the result.xacmlVersion
- xacml versionMethod Detail |
---|
public static Attribute getInstance(Node root, int version) throws ParsingException
Attribute
based on the root DOM node of the XML data.
root
- the DOM root of the AttributeType XML typeversion
- XACML version
ParsingException
- throws ParsingException if the data is invalidpublic URI getId()
public URI getType()
public String getIssuer()
public DateTimeAttribute getIssueInstant()
public boolean isIncludeInResult()
public List<AttributeValue> getValues()
List
of AttributeValue
of this attribute,
or null if no value was included
public AttributeValue getValue()
AttributeValue
of this attribute,
or null if no value was included
public String encode()
Attribute
into its XML form
String
public void encode(StringBuilder builder)
Attribute
into its XML form and writes this out to the provided
StringBuilder
- Parameters:
builder
- string stream into which the XML-encoded data is written
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |