Package com.isode.dsapi.config
Class PeerEntry
java.lang.Object
com.isode.dsapi.config.ManagedObject
com.isode.dsapi.config.PeerEntry
PeerEntry represents a peer DSA configuration entry.
- Since:
- 15.0
- Author:
- dsm
-
Field Summary
Fields inherited from class com.isode.dsapi.config.ManagedObject
logger
-
Method Summary
Modifier and TypeMethodDescriptionstatic PeerEntry
create
(IsodeDirectorySession ds, DN dsaDN, PresentationAddress pa, PeerAuthData dspAuthData, PeerAuthData dispAuthData) Create a peer configuration entry and update DB.getAuthData
(Protocol prot) Get the auth data for the given protocol.getDSADN()
Get the DN of the represented DSA.Get the presentation address of the DSA.void
Load values from an entry.void
setAuthInfo
(Protocol prot, PeerAuthData authData) Set protocol specific authentication data.void
setPA
(PresentationAddress newPa) Set the presentation address.toString()
String representation of the object to be used for display.Methods inherited from class com.isode.dsapi.config.ManagedObject
addAttribute, addAttribute, addAttribute, addAttributeValue, addAttributeValue, addEntry, addOC, checkMandatory, checkMandatory, checkMandatory, checkMandatory, commit, commitNoRefresh, createAP, createAttributeType, createDN, createPA, createRDN, createRDN, getAttribute, getAttributeDefaultWhenNull, getDN, getIsodeDirectorySession, getMultiValueBer, getMultiValuedInteger, getMultiValuedInteger, getMultiValuedString, getMultiValuedString, getPA, getValue, getValueAttrTypeFromOID, getValueBer, getValueBoolean, getValueDate, getValueDate, getValueDN, getValueInteger, getValueInteger, getValueString, getValueString, getValueStringFromAttribute, hasAttributeChanged, hasChanges, remove, removeAttr, removeStringValue, reset, reset, updateAttr, updateAttr, updateAttr, updateBoolean, updateDN, updateInteger, updateMultiValuedBER, updateMultiValuedInteger, updateMultiValuedString, updatePA, updatePA, updateString
-
Method Details
-
load
Description copied from class:ManagedObject
Load values from an entry. No directory operation should be done in this method.Mandatory variables are assigned only after everything is ok. This is done so during re-loading, if there are exceptions and even then the object is used, there is no crash by using mandatory variables that are assumed to have non-null values.
- Specified by:
load
in classManagedObject
- Parameters:
entry
- Entry representing the object, could be null if the existing entry has to be reloaded- Throws:
ConfigOpFailedException
- if mandatory attributes are not loaded
-
create
public static PeerEntry create(IsodeDirectorySession ds, DN dsaDN, PresentationAddress pa, PeerAuthData dspAuthData, PeerAuthData dispAuthData) throws ConfigOpFailedException, ReadFailedException Create a peer configuration entry and update DB.- Parameters:
ds
- Isode directory session, must not be nulldsaDN
- DSA DN, must not be nullpa
- Presentation address, must not be nulldspAuthData
- authentication data to be used for DSP messages, must not be nulldispAuthData
- authentication data to be used for DISP messages, must not be null- Returns:
- The created peer entry, will not be null
- Throws:
ReadFailedException
- if there is a problem on reading the committed entry back.ConfigOpFailedException
- if there is any other problem on applying the changes
-
getDSADN
Get the DN of the represented DSA.- Returns:
- DSA DN, will not be null
-
getPresentationAddress
Get the presentation address of the DSA.- Returns:
- presentation address, will not be null
-
setPA
Set the presentation address.- Parameters:
newPa
- Presentation address, must not be null
-
setAuthInfo
Set protocol specific authentication data.- Parameters:
prot
- Protocol, must not be null. Currently only DISP & DSP supportedauthData
- authentication data to be set, must not be null
-
getAuthData
Get the auth data for the given protocol.- Parameters:
prot
- Protocol, must not be null. Currently only DISP & DSP supported- Returns:
- auth data, will not be null for DISP & DSP. Will be null for others
-
toString
String representation of the object to be used for display. It contains the DN of the peer.
-