Class StringParseableValue.Factory<AV extends AttributeValue>
- java.lang.Object
-
- org.ow2.authzforce.core.pdp.api.value.BaseAttributeValueFactory<AV>
-
- org.ow2.authzforce.core.pdp.api.value.SimpleValue.BaseFactory<AV>
-
- org.ow2.authzforce.core.pdp.api.value.StringParseableValue.Factory<AV>
-
- Type Parameters:
AV
- type of attribute values created by this factory
- All Implemented Interfaces:
PdpExtension
,AttributeValueFactory<AV>
- Direct Known Subclasses:
StringContentOnlyValueFactory
- Enclosing class:
- StringParseableValue<V>
public abstract static class StringParseableValue.Factory<AV extends AttributeValue> extends SimpleValue.BaseFactory<AV>
Datatype-specific Attribute Value Factory that supports values based on string and possibly other type ofSerializable
content without any extra XML attributes.
-
-
Field Summary
-
Fields inherited from class org.ow2.authzforce.core.pdp.api.value.BaseAttributeValueFactory
instanceDatatype
-
Fields inherited from interface org.ow2.authzforce.core.pdp.api.PdpExtension
AUTHZFORCE_EXTENSION_PREFIX
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Factory(AttributeDatatype<AV> datatype)
Creates a datatype factory from the Java datatype implementation class and datatype identifier
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract AV
getInstance(Serializable value)
Creates attribute value from a singleton value and possibly extra XML attributesAV
getInstance(Serializable content, Map<QName,String> otherXmlAttributes, Optional<XPathCompilerProxy> xPathCompiler)
Creates attribute value from a singleton value and possibly extra XML attributesabstract AV
parse(String val)
Creates attribute value from string representation-
Methods inherited from class org.ow2.authzforce.core.pdp.api.value.SimpleValue.BaseFactory
getInstance, getSupportedInputTypes, newInvalidInputTypeException
-
Methods inherited from class org.ow2.authzforce.core.pdp.api.value.BaseAttributeValueFactory
equals, getDatatype, getId, hashCode, toString
-
-
-
-
Constructor Detail
-
Factory
protected Factory(AttributeDatatype<AV> datatype)
Creates a datatype factory from the Java datatype implementation class and datatype identifier
-
-
Method Detail
-
parse
public abstract AV parse(String val) throws IllegalArgumentException
Creates attribute value from string representation- Parameters:
val
- string representation- Returns:
- instance of
SCOF_AV
- Throws:
IllegalArgumentException
- val not valid for this factory
-
getInstance
public abstract AV getInstance(Serializable value) throws IllegalArgumentException
Creates attribute value from a singleton value and possibly extra XML attributes- Parameters:
value
- attribute value, null if original content is empty (e.g. list of JAXB (mixed) content elements is empty)- Returns:
- instance of
F_AV
- Throws:
IllegalArgumentException
- if value is not valid/parseable for this factory
-
getInstance
public final AV getInstance(Serializable content, Map<QName,String> otherXmlAttributes, Optional<XPathCompilerProxy> xPathCompiler) throws IllegalArgumentException
Description copied from class:SimpleValue.BaseFactory
Creates attribute value from a singleton value and possibly extra XML attributes- Specified by:
getInstance
in classSimpleValue.BaseFactory<AV extends AttributeValue>
- Parameters:
content
- input raw value, null if original content is empty (e.g. list of JAXB (mixed) content elements is empty)otherXmlAttributes
- other XML attributes (mandatory); if always empty, useStringContentOnlyValueFactory
insteadxPathCompiler
- (optional) XPath compiler for compiling any XPath expression in the value, e.g. xpathExpression datatype- Returns:
- instance of
F_AV
- Throws:
IllegalArgumentException
-
-