示例#1
0
  /* (non-Javadoc)
   * @see ieci.tdw.ispac.api.IWorklistAPI#getTasksPCD(int, InputStream)
   */
  public IItemCollection getTasksPCD(int taskPcdId, InputStream tasklistxml) throws ISPACException {

    String resp = getRespString();
    DbCnt cnt = context.getConnection();
    try {
      WLTaskListFactory wlfactory = new WLTaskListFactory();
      WLTaskListBuilder wlbuilder = null;

      wlbuilder = wlfactory.getTaskListBuilder(tasklistxml);
      if (wlbuilder == null)
        throw new ISPACException("No se ha podido construir WLTaskListBuilder");

      CollectionDAO coldao =
          wlbuilder.getTaskList(
              cnt,
              ISPACEntities.ENTITY_NULLREGKEYID,
              resp,
              ISPACEntities.ENTITY_NULLREGKEYID,
              taskPcdId);
      return coldao.disconnect();
    } catch (ISPACException ie) {
      throw new ISPACException(
          "Error en WLWorklist:getTasksPCD(" + taskPcdId + ", tasklistxml)", ie);
    } finally {
      context.releaseConnection(cnt);
    }
  }
示例#2
0
  private IItemCollection getTasksCTL(
      int taskCtlId, InputStream tasklistxml, String resp, int pcdId) throws ISPACException {

    DbCnt cnt = context.getConnection();
    try {
      WLTaskListFactory wlfactory = new WLTaskListFactory();
      WLTaskListBuilder wlbuilder = null;

      wlbuilder = wlfactory.getTaskListBuilder(tasklistxml);
      if (wlbuilder == null)
        throw new ISPACException("No se ha podido construir WLTaskListBuilder");

      CollectionDAO coldao = wlbuilder.getTaskList(cnt, taskCtlId, resp, pcdId);
      return coldao.disconnect();
    } catch (ISPACException ie) {
      throw new ISPACException(
          "Error en WLWorklist:getTasksCTL(" + taskCtlId + ", tasklistxml, pcdId[" + pcdId + "])",
          ie);
    } finally {
      context.releaseConnection(cnt);
    }
  }