Package org.forgerock.opendj.server.core
Interface AttachmentHolder
-
- All Known Subinterfaces:
BindRequestContext,Operation
public interface AttachmentHolderInterface declares common functionality for objects, which can storeAttachments.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectgetAttachment(String name)Retrieves the attachment with the specified name.Set<String>getAttachmentNames()Retrieves the set of attachment names defined for this holder, as a mapping between the attachment name and the associated object.ObjectremoveAttachment(String name)Removes the attachment with the specified name.ObjectsetAttachment(String name, Object value)Sets the value of the specified attachment.
-
-
-
Method Detail
-
getAttachment
Object getAttachment(String name)
Retrieves the attachment with the specified name.- Parameters:
name- The name for the attachment to retrieve. It will be treated in a case-sensitive manner.- Returns:
- The requested attachment object, or
nullif it does not exist.
-
getAttachmentNames
Set<String> getAttachmentNames()
Retrieves the set of attachment names defined for this holder, as a mapping between the attachment name and the associated object.- Returns:
- The set of attachments defined for this operation.
-
removeAttachment
Object removeAttachment(String name)
Removes the attachment with the specified name.- Parameters:
name- The name for the attachment to remove. It will be treated in a case-sensitive manner.- Returns:
- The attachment that was removed, or
nullif it does not exist.
-
setAttachment
Object setAttachment(String name, Object value)
Sets the value of the specified attachment. If an attachment already exists with the same name, it will be replaced. Otherwise, a new attachment will be added.- Parameters:
name- The name to use for the attachment.value- The value to use for the attachment.- Returns:
- The former value held by the attachment with the given name, or
nullif there was previously no such attachment.
-
-