Class WhoAmIResponseImpl
- java.lang.Object
-
- org.apache.directory.api.ldap.model.message.AbstractMessage
-
- org.apache.directory.api.ldap.model.message.AbstractResponse
-
- org.apache.directory.api.ldap.model.message.AbstractResultResponse
-
- org.apache.directory.api.ldap.model.message.AbstractExtendedResponse
-
- org.apache.directory.api.ldap.extras.extended.whoAmI.WhoAmIResponseImpl
-
- All Implemented Interfaces:
WhoAmIResponse
,ExtendedResponse
,Message
,Response
,ResultResponse
public class WhoAmIResponseImpl extends AbstractExtendedResponse implements WhoAmIResponse
The RFC 4532 WhoAmI response :authzid OCTET STRING OPTIONAL
- Author:
- Apache Directory Project
-
-
Field Summary
-
Fields inherited from interface org.apache.directory.api.ldap.extras.extended.whoAmI.WhoAmIResponse
EXTENSION_OID
-
-
Constructor Summary
Constructors Constructor Description WhoAmIResponseImpl()
Instantiates a new WhoAmI response.WhoAmIResponseImpl(int messageId)
Instantiates a new WhoAmI response.WhoAmIResponseImpl(int messageId, ResultCodeEnum rcode)
Create a new instance for the WhoAmI responseWhoAmIResponseImpl(int messageId, ResultCodeEnum rcode, String diagnosticMessage)
Create a new instance for the WhoAmI response
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getAuthzId()
Get the authzid as a byte[]String
getAuthzIdString()
Get the authzid as String.Dn
getDn()
Get the DN authzid.String
getUserId()
Get the UserIdboolean
isDnAuthzId()
boolean
isUserAuthzId()
void
setAuthzId(byte[] authzId)
Set the authzId valuevoid
setDn(Dn dn)
Set the DNvoid
setUserId(String userId)
Set the userIdString
toString()
Get a String representation of an ExtendedResponse-
Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractExtendedResponse
equals, getResponseName, hashCode, setResponseName
-
Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractResultResponse
getLdapResult
-
Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractMessage
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId, toString
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.ExtendedResponse
getResponseName, setResponseName
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Message
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.ResultResponse
getLdapResult
-
-
-
-
Constructor Detail
-
WhoAmIResponseImpl
public WhoAmIResponseImpl(int messageId, ResultCodeEnum rcode, String diagnosticMessage)
Create a new instance for the WhoAmI response- Parameters:
messageId
- The Message IDrcode
- The result codediagnosticMessage
- The diagnostic message
-
WhoAmIResponseImpl
public WhoAmIResponseImpl(int messageId, ResultCodeEnum rcode)
Create a new instance for the WhoAmI response- Parameters:
messageId
- The Message IDrcode
- The result code
-
WhoAmIResponseImpl
public WhoAmIResponseImpl(int messageId)
Instantiates a new WhoAmI response.- Parameters:
messageId
- the message id
-
WhoAmIResponseImpl
public WhoAmIResponseImpl()
Instantiates a new WhoAmI response.
-
-
Method Detail
-
getAuthzId
public byte[] getAuthzId()
Get the authzid as a byte[]- Specified by:
getAuthzId
in interfaceWhoAmIResponse
- Returns:
- The authzid or null
-
setAuthzId
public void setAuthzId(byte[] authzId)
Set the authzId value- Parameters:
authzId
- the value to store
-
isDnAuthzId
public boolean isDnAuthzId()
- Specified by:
isDnAuthzId
in interfaceWhoAmIResponse
- Returns:
- true if the response contains a DN authz (dn:XXX)
-
isUserAuthzId
public boolean isUserAuthzId()
- Specified by:
isUserAuthzId
in interfaceWhoAmIResponse
- Returns:
- true if the response contains a userID authz (u:XXX)
-
getAuthzIdString
public String getAuthzIdString()
Get the authzid as String. We will strip out the 'dn:' or 'u:' part.- Specified by:
getAuthzIdString
in interfaceWhoAmIResponse
- Returns:
- The authzid or null
-
getUserId
public String getUserId()
Get the UserId- Specified by:
getUserId
in interfaceWhoAmIResponse
- Returns:
- The userId or null
-
getDn
public Dn getDn()
Get the DN authzid.- Specified by:
getDn
in interfaceWhoAmIResponse
- Returns:
- The DN or null
-
toString
public String toString()
Description copied from class:AbstractExtendedResponse
Get a String representation of an ExtendedResponse- Overrides:
toString
in classAbstractExtendedResponse
- Returns:
- An ExtendedResponse String
- See Also:
Object.toString()
-
-