public class NameAttributeHandler extends ReadOnlyAttributeHandler
| Constructor and Description |
|---|
NameAttributeHandler(Map classMap)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHandle(AttributeHandlerContext context)
Always returns
true as all objects have a name attribute
(though the value could be null). |
String |
getName(LibraryObject reposObject)
Helper method called as an optimization from the AttributeHelper.
|
Object |
getValue(AttributeHandlerContext context)
Returns the value of an attribute.
|
canUpdate, setValuepublic NameAttributeHandler(Map classMap)
classMap - List of exceptions for classes that need to map a
special attribute to the name attribute. The map key
if the .class and the value is the uppercase name of the
repository attribute.public final boolean canHandle(AttributeHandlerContext context)
true as all objects have a name attribute
(though the value could be null).context - The context when this handler is called.public final Object getValue(AttributeHandlerContext context) throws IfsException
AttributeHandlerRuntimeException if canHandle() returns
false and this method is still being called.
Note that implementations which handle read-only attributes should
subclass ReadOnlyAttributeHandler for convenience as they
would need to provide the read side methods only.
context - The context when this handler is called.IfsException - If a repository exception occurs.public final String getName(LibraryObject reposObject) throws IfsException
IfsExceptionCopyright © 2025. All rights reserved.