Examples of IEngineDAO


Examples of it.eng.spagobi.engines.config.dao.IEngineDAO

      IDomainDAO domainDAO = DAOFactory.getDomainDAO();
      Domain officeDocDom = domainDAO.loadDomainByCodeAndValue("BIOBJ_TYPE", "OFFICE_DOC");
      // recover development sbidomains
      Domain relDom = domainDAO.loadDomainByCodeAndValue("STATE", "REL");
      // recover engine
      IEngineDAO engineDAO = DAOFactory.getEngineDAO();
      List engines = engineDAO.loadAllEnginesForBIObjectType(officeDocDom.getValueCd());
      if(engines.isEmpty()) {
        throw new Exception(" No suitable engines for the new document");
      }
      Engine engine = (Engine)engines.get(0);   
      // load the template
View Full Code Here

Examples of it.eng.spagobi.engines.config.dao.IEngineDAO

      }
      RequestContainer reqCont = getRequestContainer();
      SessionContainer sessCont = reqCont.getSessionContainer();
      SessionContainer permSess = sessCont.getPermanentContainer();
      IEngUserProfile profile = (IEngUserProfile)permSess.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
      IEngineDAO dao=DAOFactory.getEngineDAO();
      dao.setUserProfile(profile);
      if (mod.equalsIgnoreCase(AdmintoolsConstants.DETAIL_INS)) {
        dao.insertEngine(engine);
      } else {
        dao.modifyEngine(engine);
      }
           
    } catch (EMFUserError e){
      HashMap params = new HashMap();
      params.put(AdmintoolsConstants.PAGE, ListEnginesModule.MODULE_PAGE);
View Full Code Here

Examples of it.eng.spagobi.engines.config.dao.IEngineDAO

  private void delDettaglioEngine(SourceBean request, String mod, SourceBean response)
    throws EMFUserError, SourceBeanException {
   
    try {
      String id = (String) request.getAttribute("id");
            IEngineDAO enginedao = DAOFactory.getEngineDAO();
      Engine engine = enginedao.loadEngineByID(new Integer(id));
//      controls if the engine is in use by any BIObject
      boolean isAss = enginedao.hasBIObjAssociated(id);
      if (isAss){
        HashMap params = new HashMap();
        params.put(AdmintoolsConstants.PAGE, ListEnginesModule.MODULE_PAGE);
        EMFUserError error = new EMFUserError(EMFErrorSeverity.ERROR, 1030, new Vector(), params );
        getErrorHandler().addError(error);
        return;
       
      }
      enginedao.eraseEngine(engine);
    }   catch (EMFUserError e){
        HashMap params = new HashMap();
        params.put(AdmintoolsConstants.PAGE, ListEnginesModule.MODULE_PAGE);
        throw new EMFUserError(EMFErrorSeverity.ERROR, 1013, new Vector(), params);
       
View Full Code Here

Examples of it.eng.spagobi.engines.config.dao.IEngineDAO

      response.setAttribute(ImportExportConstants.PUBLISHER_NAME, "ImportExportSkipEngineAssociation");
    } else {
      // get the existing and exported engines
      // move to jsp
            List exportedEngines = impManager.getExportedEngines();
      IEngineDAO engineDAO = DAOFactory.getEngineDAO();
      List currentEngines = engineDAO.loadAllEngines();
      response.setAttribute(ImportExportConstants.LIST_EXPORTED_ENGINES, exportedEngines);
      response.setAttribute(ImportExportConstants.LIST_CURRENT_ENGINES, currentEngines);
      response.setAttribute(ImportExportConstants.PUBLISHER_NAME, "ImportExportEngineAssociation");
    }
  } catch (EMFUserError emfue) {
View Full Code Here

Examples of it.eng.spagobi.engines.config.dao.IEngineDAO

    RequestContainer requestContainer = this.getRequestContainer();
    SessionContainer session = requestContainer.getSessionContainer();
    impManager = (IImportManager) session.getAttribute(ImportExportConstants.IMPORT_MANAGER);
    impManager.openSession();
    List exportedEngines = impManager.getExportedEngines();
    IEngineDAO engineDAO = DAOFactory.getEngineDAO();
    List currentEngines = engineDAO.loadAllEngines();
      response.setAttribute(ImportExportConstants.LIST_EXPORTED_ENGINES, exportedEngines);
      response.setAttribute(ImportExportConstants.LIST_CURRENT_ENGINES, currentEngines);
      response.setAttribute(ImportExportConstants.PUBLISHER_NAME, "ImportExportEngineAssociation");
  } catch (SourceBeanException sbe) {
      logger.error("Error while populating response source bean ", sbe);
View Full Code Here

Examples of it.eng.spagobi.engines.config.dao.IEngineDAO

   */
  public boolean associateAllExportedEnginesByUserAssociation() throws EMFUserError {
    logger.debug("IN");
    try {
      List exportedEngines = this.getExportedEngines();
      IEngineDAO engineDAO = DAOFactory.getEngineDAO();
      List currentEngines = engineDAO.loadAllEngines();
      Iterator exportedEnginesIt = exportedEngines.iterator();
      while (exportedEnginesIt.hasNext()) {
        Engine exportedEngine = (Engine) exportedEnginesIt.next();
        String associatedEngineLabel = this.getUserAssociation().getAssociatedEngine(exportedEngine.getLabel());
        if (associatedEngineLabel == null || associatedEngineLabel.trim().equals("")) return true;
View Full Code Here

Examples of it.eng.spagobi.engines.config.dao.IEngineDAO

      Integer engineId=null;
        Engine engineObj=obj.getEngine();
        JSONArray prova = new JSONArray();
        if(engineObj!=null){ 
         
          IEngineDAO engineDao=DAOFactory.getEngineDAO();
          List exporters=new ArrayList();
          exporters=engineDao.getAssociatedExporters(engineObj);     
          if(!exporters.isEmpty()){
            for (Iterator iterator = exporters.iterator(); iterator.hasNext();) {
             
               Exporters exp = (Exporters) iterator.next();
               Integer domainId=exp.getDomainId();
View Full Code Here

Examples of it.eng.spagobi.engines.config.dao.IEngineDAO

      obj.setStateCode(state.getValueCd());
      obj.setStateID(state.getValueId());

      // gets engine
      Engine engine = null;
      IEngineDAO engineDAO = DAOFactory.getEngineDAO();
      if (document.getEngineId() == null) {
        // if engine id is not specified take the first engine for the biobject type
        List engines = engineDAO.loadAllEnginesForBIObjectType(document.getType());
        if (engines.size() == 0) {
          throw new Exception("No engines defined for document type = [" + document.getType() + "]");
        }
        engine = (Engine) engines.get(0);
      } else {
        engine = engineDAO.loadEngineByID(document.getEngineId());
      }
      obj.setEngine(engine);

    } catch (Exception e) {
      logger.error("Error while converting SDKDocument into BIObject.", e);
View Full Code Here

Examples of it.eng.spagobi.engines.config.dao.IEngineDAO

        IDomainDAO domainDAO = DAOFactory.getDomainDAO();
        Domain officeDocDom = domainDAO.loadDomainByCodeAndValue("BIOBJ_TYPE", "OFFICE_DOC");
        // recover development sbidomains
        Domain devDom = domainDAO.loadDomainByCodeAndValue("STATE", "DEV");
        // recover engine
        IEngineDAO engineDAO = DAOFactory.getEngineDAO();
        List engines = engineDAO.loadAllEnginesForBIObjectType(officeDocDom.getValueCd());
        Engine engine = (Engine)engines.get(0);
        // load the template
        UploadedFile uploadedFile = new UploadedFile();
        IDossierPresentationsDAO dpDAO = DAOFactory.getDossierPresentationDAO();
        Integer dossierId = new Integer(dossierIdStr);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.