public class TypeAttributeHandler extends ReadOnlyAttributeHandler
Modifier and Type | Method and Description |
---|---|
boolean |
canHandle(AttributeHandlerContext context)
Always returns
true as all objects have a type attribute. |
static AttributeHandler |
getInstance()
Returns the singleton instance of this class.
|
Object |
getValue(AttributeHandlerContext context)
Returns the value of an attribute.
|
canUpdate, setValue
public static final AttributeHandler getInstance()
public boolean canHandle(AttributeHandlerContext context)
true
as all objects have a type attribute.context
- The context when this handler is called.public Object getValue(AttributeHandlerContext context) throws IfsException
AttributeHandler
RuntimeException
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.Copyright © 2023. All rights reserved.