<implementsInterface>

The <implementsInterface> subelement specifies that an entity implements the specified interface. This element defines two attributes: an interface (iface) attribute and an implementation (impl) attribute.

For example, the PolicyCenter base configuration defines the BACost entity with the following <implementsInterface> subelement:

<entity ... entity="BACost" ...>
  ...
  <implementsInterface 
          iface="gw.lob.ba.financials.BACostMethods"
          impl="gw.lob.ba.financials.BACostMethodsImpl"/>
</entity>

The BACostMethods interface has getter methods that any class that implements this interface must provide. The getter methods are coverage, state, and vehicle. By including the <implementsInterface> subelement, the BACost entity lets you use getter methods on instances of the BACost entity in Gosu code.

var cost : BACost
var cov     = cost.Coverage
var state   = cost.State
var vehicle = cost.Vehicle

Attributes of <implementsInterface>

The <implementsInterface> element contains the following attributes.

<implementsInterface>  attribute

Description

iface

Required. The name of the interface that this data object must implement.

impl

The name of the class or subclass that implements the specified interface, if any. Valid only when declared on abstract entities or delegates.

Subelements on <implementsInterface>

There are no subelements on the <implementsInterface> subelement.