Create copier for a policy line

Procedure

  1. Create a line-specific copier that extends the gw.api.copy.CompositeCopier class. In Studio, create a gw.lob.cp.CPPolicyLineCopier class.

    The signature for CompositeCopier is:

    CompositeCopier<T extends KeyableBean, S extends KeyableBean>

    T is the target and S is the source.

  2. In your class, define the signature where the target is PolicyPeriod, and the source is the policy line.
      uses gw.api.copy.CompositeCopier
    
       class CPPolicyLineCopier extends CompositeCopier<PolicyPeriod, CommercialPropertyLine> {
    
         construct() {
    
         }
    
       }
  3. In gw.lob.cp.CPPolicyLineMethods, override the get Copier property to return your new line copier class.
      override property get Copier() : CompositeCopier<PolicyPeriod, CommercialPropertyLine> {
        return new CPPolicyLineCopier(_line)
      }
  4. In configuration > config > Page Configuration > pcf > job > common > copydata, create a CopyPolicyDV.CPLine PCF file. Using CopyPolicyDV.PersonalAutoLine as an example, design the user interface for copying data.
  5. Create copiers and composite copiers for the entities and other data that you want to copy.

    Decide which coverables to copy, such as locations and buildings for commercial property. Create copiers for these coverables.

    For example, the personal auto line has the following copiers in the gw.lob.pa package:

    • AddlInterestDetailsCopier extends Copier
    • AllAddlInterestDetailsCopier extends GroupingCompositeCopier
    • ModifierCopier extends Copier
    • PAPolicyLineCopier extends CompositeCopier
    • PersonalVehicleCopier extends CompositeCopier
    • PolicyDriverCopier extends Copier
  6. Optional – In the line Copier class, add methods to retrieve the child copiers of the line. In gw.lob.pa.PAPolicyLineCopier, personal auto has an example that gets the personal vehicle copier:
    property get PersonalVehicleCopiers() {...}