/**
  * Retrieves the contact that matches the specified id.
  *
  * @param contactId The id to match.
  * @return A Contact instance or null if the id supplied was invalid or could not be matched.
  */
 public FreeAgentContact getContact(String contactId) {
   if (contactId != null && !contactId.isEmpty()) {
     FreeAgentContactWrapper contactWrapper = freeAgentServiceInstance.getContact(contactId);
     if (contactWrapper != null) {
       return contactWrapper.getContact();
     }
   }
   return null;
 }
  /**
   * Retrieves the Contact associated with the specified project.
   *
   * @param project The populated project instance to retrieve the contact for.
   * @return A populated FreeAgentContact instance or null if the contact could not be found.
   */
  public FreeAgentContact getContactForProject(FreeAgentProject project) {
    if (project != null) {
      String contactId = extractIdentifier(project.getContact());

      if (contactId != null && !contactId.isEmpty()) {
        FreeAgentContactWrapper contactWrapper = freeAgentServiceInstance.getContact(contactId);

        if (contactWrapper != null) {
          return contactWrapper.getContact();
        }
      }
    }
    return null;
  }