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 class org.apache.directory.api.ldap.model.message.AbstractExtendedResponse
responseName
-
Fields inherited from class org.apache.directory.api.ldap.model.message.AbstractResultResponse
ldapResult
-
Fields inherited from class org.apache.directory.api.ldap.model.message.AbstractMessage
controls
-
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[]StringgetAuthzIdString()Get the authzid as String.DngetDn()Get the DN authzid.StringgetUserId()Get the UserIdbooleanisDnAuthzId()booleanisUserAuthzId()voidsetAuthzId(byte[] authzId)Set the authzId valuevoidsetDn(Dn dn)Set the DNvoidsetUserId(String userId)Set the userIdStringtoString()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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
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:
getAuthzIdin 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:
isDnAuthzIdin interfaceWhoAmIResponse- Returns:
- true if the response contains a DN authz (dn:XXX)
-
isUserAuthzId
public boolean isUserAuthzId()
- Specified by:
isUserAuthzIdin 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:
getAuthzIdStringin interfaceWhoAmIResponse- Returns:
- The authzid or null
-
getUserId
public String getUserId()
Get the UserId- Specified by:
getUserIdin interfaceWhoAmIResponse- Returns:
- The userId or null
-
setUserId
public void setUserId(String userId)
Set the userId- Parameters:
userId- The User ID
-
getDn
public Dn getDn()
Get the DN authzid.- Specified by:
getDnin interfaceWhoAmIResponse- Returns:
- The DN or null
-
setDn
public void setDn(Dn dn)
Set the DN- Parameters:
dn- The DN to set
-
toString
public String toString()
Description copied from class:AbstractExtendedResponseGet a String representation of an ExtendedResponse- Overrides:
toStringin classAbstractExtendedResponse- Returns:
- An ExtendedResponse String
- See Also:
Object.toString()
-
-