@ThreadSafe public class IdPAttributePrincipalSerializer extends AbstractPrincipalSerializer<String>
IdPAttributePrincipal.| Modifier and Type | Field and Description |
|---|---|
private static String |
EMPTY_VALUE_FIELD
Field name of type code of an
EmptyAttributeValue. |
private static Pattern |
JSON_PATTERN
Pattern used to determine if input is supported.
|
private org.slf4j.Logger |
log
Class logger.
|
private javax.json.JsonBuilderFactory |
objectBuilderFactory
JSON object bulder factory.
|
private static String |
PRINCIPAL_ENTRY_FIELD
Field name of principal entry.
|
private static String |
PRINCIPAL_NAME_FIELD
Field name of principal name.
|
private static String |
SCOPED_VALUE_FIELD
Field name of type code of an
ScopedStringAttributeValue. |
private static String |
STRING_VALUE_FIELD
Field name of type code of an
StringAttributeValue. |
| Constructor and Description |
|---|
IdPAttributePrincipalSerializer()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
IdPAttributePrincipal |
deserialize(String value) |
protected IdPAttributeValue<?> |
deserializeValue(javax.json.JsonObject object)
Deserialize an attribute value from a
JsonObject. |
private javax.json.JsonArrayBuilder |
getJsonArrayBuilder()
Get a
JsonArrayBuilder in a thread-safe manner. |
private javax.json.JsonObjectBuilder |
getJsonObjectBuilder()
Get a
JsonObjectBuilder in a thread-safe manner. |
String |
serialize(Principal principal) |
protected javax.json.JsonObject |
serializeValue(IdPAttributeValue<?> value)
Serialize an attribute value and produce a
JsonObject. |
boolean |
supports(Principal principal) |
boolean |
supports(String value) |
getJsonGenerator, getJsonReaderdestroy, doDestroy, doInitialize, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitialize, isInitialized@Nonnull @NotEmpty private static final String PRINCIPAL_NAME_FIELD
@Nonnull @NotEmpty private static final String PRINCIPAL_ENTRY_FIELD
@Nonnull @NotEmpty private static final String EMPTY_VALUE_FIELD
EmptyAttributeValue.@Nonnull @NotEmpty private static final String STRING_VALUE_FIELD
StringAttributeValue.@Nonnull @NotEmpty private static final String SCOPED_VALUE_FIELD
ScopedStringAttributeValue.private static final Pattern JSON_PATTERN
@Nonnull private final org.slf4j.Logger log
@Nonnull private final javax.json.JsonBuilderFactory objectBuilderFactory
public IdPAttributePrincipalSerializer()
@Nonnull @NotEmpty public String serialize(@Nonnull Principal principal) throws IOException
IOException@Nullable public IdPAttributePrincipal deserialize(@Nonnull@NotEmpty String value) throws IOException
IOException@Nonnull protected javax.json.JsonObject serializeValue(@Nonnull IdPAttributeValue<?> value)
JsonObject.
Override this method to support additional value types.
value - the attribute value to serialize@Nullable protected IdPAttributeValue<?> deserializeValue(@Nonnull javax.json.JsonObject object)
JsonObject.
Override this method to support additional value types.
object - object to deserialize@Nonnull private javax.json.JsonObjectBuilder getJsonObjectBuilder()
JsonObjectBuilder in a thread-safe manner.@Nonnull private javax.json.JsonArrayBuilder getJsonArrayBuilder()
JsonArrayBuilder in a thread-safe manner.Copyright © 1999–2018 Shibboleth Consortium. All rights reserved.