Class RequestedCertificateAttribute
java.lang.Object
se.idsec.signservice.integration.core.AbstractIdentityAttribute
se.idsec.signservice.integration.certificate.RequestedCertificateAttribute
- All Implemented Interfaces:
Serializable
Represents a requested certificate attribute. The sign requester states that a given principal attribute should be
mapped into a certificate attribute. This class represents how the requirements for certificate attributes are
represented.
This Java implementation uses one class for this purpose even though there are three different attribute types. The reason is that we want to be JSON processor libary agnostic, and working with interfaces and subclasses is hard then.
- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder forRequestedCertificateAttribute
objects. -
Field Summary
Fields inherited from class se.idsec.signservice.integration.core.AbstractIdentityAttribute
name, type
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.Constructor creating the object with the given type. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Returns a builder forRequestedCertificateAttribute
objects.Gets the default value to use if no mapping can be found.Gets the friendly name of attribute.Gets whether this attribute must be provided.void
setDefaultValue
(String defaultValue) Assigns te default value to use if no mapping can be found.void
setFriendlyName
(String friendlyName) Assigns the friendly name of attribute.void
setRequired
(Boolean required) Assigns whether this attribute must be provided.void
Assigns the identity attribute type.void
Assigns the attribute type.Methods inherited from class se.idsec.signservice.integration.core.AbstractIdentityAttribute
getName, getType, setName
-
Constructor Details
-
RequestedCertificateAttribute
public RequestedCertificateAttribute()Default constructor. -
RequestedCertificateAttribute
Constructor creating the object with the given type.- Parameters:
type
- the type
-
-
Method Details
-
builder
Returns a builder forRequestedCertificateAttribute
objects.- Returns:
- a RequestedCertificateAttribute builder
-
setType
Assigns the identity attribute type.- Overrides:
setType
in classAbstractIdentityAttribute
- Parameters:
type
- the attribute type
-
setType
Assigns the attribute type.- Parameters:
type
- the attribute type
-
getDefaultValue
Gets the default value to use if no mapping can be found.- Returns:
- the value to use if no mapping can be found, or
null
if no default value has been assigned
-
setDefaultValue
Assigns te default value to use if no mapping can be found.- Parameters:
defaultValue
- the value to use if no mapping can be found
-
getFriendlyName
Gets the friendly name of attribute.- Returns:
- the "friendly name" of the attribute for display purposes or
null
if not present
-
setFriendlyName
Assigns the friendly name of attribute.- Parameters:
friendlyName
- the "friendly name" of the attribute for display purposes
-
getRequired
Gets whether this attribute must be provided.- Returns:
- tells whether the attribute is required
-
setRequired
Assigns whether this attribute must be provided.- Parameters:
required
- whether the attribute is required
-