private int getMaxEmptyOccurrences(BIObjectParameter biParameter, List docs) {
   int toReturn = 0;
   logger.debug("IN");
   Iterator it = docs.iterator();
   while (it.hasNext()) {
     ConfiguredBIDocument configuredBIDocument = (ConfiguredBIDocument) it.next();
     Map parameters = configuredBIDocument.getParameters();
     BIObject configuredDocument = configuredBIDocument.loadBIObjectDetails();
     List configuredDocumentParameters = configuredDocument.getBiObjectParameters();
     int emptyOccurrences =
         getAnalyticalDriverEmptyOccurrences(
             biParameter, configuredDocumentParameters, parameters);
     if (emptyOccurrences > toReturn) {
       toReturn = emptyOccurrences;
     }
   }
   logger.debug("OUT: " + toReturn);
   return toReturn;
 }
 private void detailConfiguredDocumentHandler(SourceBean request, SourceBean response)
     throws Exception {
   logger.debug("IN");
   String tempFolder = (String) request.getAttribute(DossierConstants.DOSSIER_TEMP_FOLDER);
   String confDocIdent = (String) request.getAttribute("configureddocumentidentifier");
   // get configured document
   IDossierDAO dossierDao = new DossierDAOHibImpl();
   ConfiguredBIDocument confDoc = dossierDao.getConfiguredDocument(confDocIdent, tempFolder);
   // get parameter value map
   Map paramValueMap = confDoc.getParameters();
   // create parameter name map
   //		Integer idobj = confDoc.getId();
   String label = confDoc.getLabel();
   BIObject obj = DAOFactory.getBIObjectDAO().loadBIObjectByLabel(label);
   Integer idobj = obj.getId();
   IBIObjectParameterDAO biobjpardao = DAOFactory.getBIObjectParameterDAO();
   List params = biobjpardao.loadBIObjectParametersById(idobj);
   Iterator iterParams = params.iterator();
   Map paramNameMap = new HashMap();
   while (iterParams.hasNext()) {
     BIObjectParameter par = (BIObjectParameter) iterParams.next();
     String parLabel = par.getLabel();
     String parUrlName = par.getParameterUrlName();
     paramNameMap.put(parLabel, parUrlName);
   }
   // set attribute into response
   response.setAttribute("parnamemap", paramNameMap);
   response.setAttribute("parvaluemap", paramValueMap);
   //		response.setAttribute("idobj", confDoc.getId());
   response.setAttribute("description", confDoc.getDescription());
   response.setAttribute("label", confDoc.getLabel());
   response.setAttribute("name", confDoc.getName());
   response.setAttribute("logicalname", confDoc.getLogicalName());
   response.setAttribute(DossierConstants.PUBLISHER_NAME, "DossierConfiguredDocumentDetail");
   logger.debug("OUT");
 }
 private void addEmptyAnalyticalDrivers(
     BIObject dossier, ConfiguredBIDocument configuredBIDocument) {
   logger.debug("IN");
   Map parameters = configuredBIDocument.getParameters();
   BIObject configuredDocument = configuredBIDocument.loadBIObjectDetails();
   List configuredDocumentParameters = configuredDocument.getBiObjectParameters();
   Iterator configuredBIObjectParametersIt = configuredDocumentParameters.iterator();
   while (configuredBIObjectParametersIt.hasNext()) {
     BIObjectParameter biParameter = (BIObjectParameter) configuredBIObjectParametersIt.next();
     int emptyOccurrences =
         getAnalyticalDriverEmptyOccurrences(
             biParameter, configuredDocumentParameters, parameters);
     if (emptyOccurrences > 0) {
       int occurrenciesInDossier =
           getAnalyticalDriverOccurrenciesInDossier(dossier, biParameter.getParID());
       for (int c = occurrenciesInDossier; c < emptyOccurrences; c++) {
         BIObjectParameter parameterToBeAdded =
             getEmptyOccurrence(biParameter, configuredDocumentParameters, parameters, c);
         addBIObjectParameterToDossier(dossier, parameterToBeAdded);
       }
     }
   }
   logger.debug("OUT");
 }