Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.fdk.impl.ah
Class MappedValueAttributeHandler

    java.lang.Object
      oracle.ifs.fdk.impl.ah.ReadOnlyAttributeHandler
          oracle.ifs.fdk.impl.ah.MappedValueAttributeHandler

All Implemented Interfaces:
  AttributeHandler

    public class MappedValueAttributeHandler

extends ReadOnlyAttributeHandler

Attribute handler which can wrap another handler and map the return values to another value.

Constructor Summary
`MappedValueAttributeHandler(AttributeHandler ah, java.util.Map valueMap)` Constructor.

Method Summary
`boolean` | `canHandle(AttributeHandlerContext context)` Returns `true` if this handler can handle the attribute request on the given object instance.
`java.lang.Object` | `getValue(AttributeHandlerContext context)` Returns the value of an attribute.

Methods inherited from class oracle.ifs.fdk.impl.ah.ReadOnlyAttributeHandler
`canUpdate, setValue`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MappedValueAttributeHandler

    public MappedValueAttributeHandler(AttributeHandler ah,
                                       java.util.Map valueMap)

  Constructor.

  Parameters:
    `ah` - The attribute handler whose values are to be mapped.
    `valueMap` - The map of values to be mapped. All possible values that the wrapepd attribute handler can return need to be in the map otherwise `null` will be returned for the non-existent values.

Method Detail

### canHandle

    public boolean canHandle(AttributeHandlerContext context)
                      throws FdkException,
                             IfsException

  Description copied from interface: `AttributeHandler`
  Returns `true` if this handler can handle the attribute request on the given object instance. The necessary information to determine which attribute is requested and what the underlying repository object is will be packaged in the context.

  Parameters:
    `context` - The context when this handler is called.
  Throws:
    `FdkException` - If a framework error occurs.
    `IfsException` - If a repository exception occurs.

### getValue

    public java.lang.Object getValue(AttributeHandlerContext context)
                              throws FdkException,
                                     IfsException

  Description copied from interface: `AttributeHandler`
  Returns the value of an attribute. This method must throw a `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.

  Parameters:
    `context` - The context when this handler is called.
  Throws:
    `FdkException` - If a framework error occurs.
    `IfsException` - If a repository exception occurs.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD