/**
   * add a new content. It is registered to contentManager service
   *
   * @param con a Connection
   * @param pubDetail the content to register
   * @param userId the creator of the content
   * @return the unique silverObjectId which identified the new content
   */
  public int createSilverContent(
      Connection con, PublicationDetail pubDetail, String userId, boolean isVisible)
      throws ContentManagerException {

    SilverContentVisibility scv =
        new SilverContentVisibility(pubDetail.getBeginDate(), pubDetail.getEndDate(), isVisible);
    return getContentManager()
        .addSilverContent(
            con, pubDetail.getPK().getId(), pubDetail.getPK().getComponentName(), userId, scv);
  }
  /**
   * update the visibility attributes of the content. Here, the type of content is a
   * PublicationDetail
   *
   * @param pubDetail the content
   */
  public void updateSilverContentVisibility(PublicationDetail pubDetail, boolean isVisible)
      throws ContentManagerException {
    int silverContentId =
        getContentManager()
            .getSilverContentId(pubDetail.getPK().getId(), pubDetail.getPK().getComponentName());
    if (silverContentId != -1) {
      SilverContentVisibility scv =
          new SilverContentVisibility(pubDetail.getBeginDate(), pubDetail.getEndDate(), isVisible);

      getContentManager()
          .updateSilverContentVisibilityAttributes(
              scv, pubDetail.getPK().getComponentName(), silverContentId);
      ClassifyEngine.clearCache();
    } else {
      createSilverContent(null, pubDetail, pubDetail.getCreatorId(), isVisible);
    }
  }