Participant Evidence Interface

The Participant Evidence Interface and its associated methods are shown below with the appropriate javadoc comments:

/*
 * Copyright 2007 Curam Software Ltd.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of Curam Software, Ltd. ("Confidential Information").  You 
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement 
 * you entered into with Curam Software.
 */
package curam.core.sl.infrastructure.impl;

import java.util.ArrayList;

import curam.core.sl.infrastructure.struct.EIEvidenceKey;
import curam.core.sl.infrastructure.struct.EIEvidenceKeyList;
import curam.core.sl.struct.ConcernRoleIDKey;
import curam.util.exception.AppException;
import curam.util.exception.InformationalException;

/**
 * This interface extends the StandardEvidenceInterface therefore 
 * any class that implements ParticipantEvidenceInterface must 
 * provide its own implementations of the methods defined in the 
 * standard interface. Any methods specific to participant 
 * evidence be defined in this interface.
 */
public interface ParticipantEvidenceInterface 
  extends StandardEvidenceInterface {

  // ____________________________________________________________
  /**
   * Method to check if the attributes that changed during a 
   * modify require reassessment to be run when they are applied.
   * 
   * @param attributesChanged
   *          - A list of Strings. Each represents the name of an
   *            attribute that changed
   * 
   * @return true if Reassessment required
   */
  boolean checkForReassessment(ArrayList attributesChanged)
    throws AppException, InformationalException;

  // ____________________________________________________________
  /**
   * Method for creating the snapshot record related to a 
   * participant evidence record.
   * 
   * @param key
   *         Contains an evidenceID / evidenceType pairing
   * 
   * @return The uniqueID and the evidence type of the Snapshot 
   *         record.
   */
  EIEvidenceKey createSnapshot(EIEvidenceKey key) 
    throws AppException, InformationalException;

  // ____________________________________________________________
  /**
   * Method to compare attributes on two records of the same 
   * entity type. It then returns an ArrayList of strings with 
   * the names of each attribute that was different between them.
   * 
   * @param key
   *          - Contains an evidenceID / evidenceType pairing
   * @param dtls
   *          - a struct of the same type as the key containing 
   *            the attributes to be compared against
   * 
   * @return A list of Strings. Each represents an attribute name
   *         that differed.
   */
  ArrayList getChangedAttributeList(
    EIEvidenceKey key, Object dtls)
      throws AppException, InformationalException;

  // ____________________________________________________________
  /**
   * Method to search for records on a participant entity by 
   * concernRoleID and status.
   * 
   * @param key
   *          - The unique concernRoleID of the participant.
   * 
   * @return A list of EIEvidenceKey objects each containing an
   *         evidenceID/evidenceType pair.
   */
  EIEvidenceKeyList readAllByConcernRoleID(ConcernRoleIDKey key)
    throws AppException, InformationalException;

  // ____________________________________________________________
  /**
   * Method removing participant evidence. This method is called 
   * when participant evidence is being canceled
   * 
   * @param key
   *          - Contains an evidenceID / evidenceType pairing
   * @param dtls
   *          - Modified evidence details
   */
  void removeEvidence(EIEvidenceKey key, Object dtls) 
    throws AppException, InformationalException;
      
}

Adopting an interface approach enforces a pattern upon entity design/development as each entity must implement the same interface. This approach allows the Cúram Enterprise FrameworkFramework to provide as much common functionality as possible so that custom implementations can concentrate more on business aspects of evidence maintenance, e.g.validations. Each evidence entity must implement the Evidence Interface to have access to the Evidence Controller class.This class implements the common business logic across all evidence entities and the custom business logic specific to each evidence entity.