Class DirectSignerResponse
- java.lang.Object
-
- no.digipost.signature.client.direct.DirectSignerResponse
-
- All Implemented Interfaces:
WithSignerUrl
public class DirectSignerResponse extends Object implements WithSignerUrl
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface no.digipost.signature.client.direct.WithSignerUrl
WithSignerUrl.JustSignerUrl
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DirectSignerResponse
fromJaxb(no.digipost.signature.api.xml.XMLDirectSignerResponse signer)
String
getCustomIdentifier()
Get the custom identifier string for this signer.String
getPersonalIdentificationNumber()
Get the personal identification number for this signer.URI
getRedirectUrl()
URI
getSignerUrl()
boolean
hasIdentifier(String identifier)
Check if this signer is identified by the given identifier string, either as personal identification number or a custom identifier.boolean
isIdentifiedByPersonalIdentificationNumber()
Check if this signer is identified by a personal identification number.
-
-
-
Method Detail
-
fromJaxb
public static DirectSignerResponse fromJaxb(no.digipost.signature.api.xml.XMLDirectSignerResponse signer)
-
hasIdentifier
public boolean hasIdentifier(String identifier)
Check if this signer is identified by the given identifier string, either as personal identification number or a custom identifier.- Parameters:
identifier
- either a personal identification number or a custom identifier- Returns:
true
if this signer has the given identifier,false
otherwise.
-
isIdentifiedByPersonalIdentificationNumber
public boolean isIdentifiedByPersonalIdentificationNumber()
Check if this signer is identified by a personal identification number. If this method returnstrue
,getPersonalIdentificationNumber()
can safely be called. Likewise, if it returnsfalse
, thengetCustomIdentifier()
can be called.- Returns:
true
if this signer is identified by a personal identification number,false
otherwise.
-
getPersonalIdentificationNumber
public String getPersonalIdentificationNumber()
Get the personal identification number for this signer.- Returns:
- the personal identification number
- Throws:
IllegalStateException
- if this signer is not identified by personal identification number
-
getCustomIdentifier
public String getCustomIdentifier()
Get the custom identifier string for this signer.- Returns:
- the custom identifier
- Throws:
IllegalStateException
- if this signer is not identified by a custom identifier string
-
getSignerUrl
public URI getSignerUrl()
- Specified by:
getSignerUrl
in interfaceWithSignerUrl
- Returns:
- the URL for a specific signer of a signature job
-
getRedirectUrl
public URI getRedirectUrl()
-
-