Package it.eng.spagobi.commons.bo

Examples of it.eng.spagobi.commons.bo.Domain


    Integer biObjectID = new Integer(idStr);
    BIObject obj = DAOFactory.getBIObjectDAO().loadBIObjectById(biObjectID);
    Engine engine = obj.getEngine();
   
    // GET THE TYPE OF ENGINE (INTERNAL / EXTERNAL) AND THE SUITABLE BIOBJECT TYPES
    Domain engineType = null;
    Domain compatibleBiobjType = null;
    engineType = DAOFactory.getDomainDAO().loadDomainById(engine.getEngineTypeId());
    compatibleBiobjType = DAOFactory.getDomainDAO().loadDomainById(engine.getBiobjTypeId());
    String compatibleBiobjTypeCd = compatibleBiobjType.getValueCd();
    String biobjTypeCd = obj.getBiObjectTypeCode();
   
    // CHECK IF THE BIOBJECT IS COMPATIBLE WITH THE TYPES SUITABLE FOR THE ENGINE
    if (!compatibleBiobjTypeCd.equalsIgnoreCase(biobjTypeCd)) {
      // the engine document type and the biobject type are not compatible
View Full Code Here


    List<Domain> domainsDs = (List<Domain>)getSessionContainer().getAttribute("dsTypesList");   
    String dsType = "";
    if(domainsDs!=null && !domainsDs.isEmpty()){
      Iterator it = domainsDs.iterator();
      while(it.hasNext()){
        Domain d = (Domain)it.next();
        if(d!=null && d.getValueCd().equalsIgnoreCase(dsTypeCd)){
          dsType = d.getValueName();
          break;
        }
      }
    }     
   
View Full Code Here

    Integer biObjectID = new Integer(idStr);
    BIObject obj = DAOFactory.getBIObjectDAO().loadBIObjectForDetail(biObjectID);
    Engine engine = obj.getEngine();
   
    // GET THE TYPE OF ENGINE (INTERNAL / EXTERNAL) AND THE SUITABLE BIOBJECT TYPES
    Domain engineType = null;
    Domain compatibleBiobjType = null;
    engineType = DAOFactory.getDomainDAO().loadDomainById(engine.getEngineTypeId());
    compatibleBiobjType = DAOFactory.getDomainDAO().loadDomainById(engine.getBiobjTypeId());
    String compatibleBiobjTypeCd = compatibleBiobjType.getValueCd();
    String biobjTypeCd = obj.getBiObjectTypeCode();
   
    // CHECK IF THE BIOBJECT IS COMPATIBLE WITH THE TYPES SUITABLE FOR THE ENGINE
    if (!compatibleBiobjTypeCd.equalsIgnoreCase(biobjTypeCd)) {
      // the engine document type and the biobject type are not compatible
View Full Code Here

    List<Domain> domainsDs = (List<Domain>)getSessionContainer().getAttribute("dsTypesList")
    String dsType = "";
    if(domainsDs!=null && !domainsDs.isEmpty()){
      Iterator it = domainsDs.iterator();
      while(it.hasNext()){
        Domain d = (Domain)it.next();
        if(d!=null && d.getValueCd().equalsIgnoreCase(dsTypeCd)){
          dsType = d.getValueName();
          break;
        }
      }
    } 
View Full Code Here

    if( !(o instanceof Domain) ) {
      throw new SerializationException("DomainJSONSerializer is unable to serialize object of type: " + o.getClass().getName());
    }
   
    try {
      Domain domain = (Domain)o;
      result = new JSONObject();
      result.put(DOMAIN_CODE, domain.getDomainCode() ); // BIOBJ_TYPE
      result.put(DOMAIN_NAME, domain.getDomainName() ); // BI Object types
     
      result.put(VALUE_ID, domain.getValueId() ); // ex. 1
      result.put(VALUE_CODE, domain.getValueCd() ); // REPORT
      result.put(VALUE_NAME, domain.getValueName() ); // ex. Report
      result.put(VALUE_DECRIPTION, domain.getValueDescription() ); // Basic business intelligence objects type
    } catch (Throwable t) {
      throw new SerializationException("An error occurred while serializing object: " + o, t);
    } finally {
     
    }
View Full Code Here

        if(engines!=null && !engines.isEmpty()){
          o.setEngine(engines.get(0));
        }
      }
     
      Domain objType = DAOFactory.getDomainDAO().loadDomainByCodeAndValue(SpagoBIConstants.BIOBJ_TYPE, type);
      Integer biObjectTypeID = objType.getValueId();
      o.setBiObjectTypeID(biObjectTypeID);
      o.setBiObjectTypeCode(objType.getValueCd());
         
      UserProfile userProfile = (UserProfile) this.getUserProfile();
      String creationUser =  userProfile.getUserId().toString();
      o.setCreationUser(creationUser);
      if(dataSourceId!=null && dataSourceId!=""){
        o.setDataSourceId(new Integer(dataSourceId));
     
      List<Integer> functionalities = new ArrayList<Integer>();
      for(int i=0; i< functsArrayJSon.length(); i++){
        String funcIdStr = functsArrayJSon.getString(i);
        Integer funcId = new Integer(funcIdStr);
        if (funcId.intValue() == -1) {
          // -1 stands for personal folder: check is it exists
          boolean exists = UserUtilities.userFunctionalityRootExists(userProfile);
          if (!exists) {
            // create personal folder if it doesn't exist
            UserUtilities.createUserFunctionalityRoot(userProfile);
          }
          // load personal folder to get its id
          LowFunctionality lf = UserUtilities.loadUserFunctionalityRoot(userProfile);
          funcId = lf.getId();
        }
        functionalities.add(funcId);
      }   
      o.setFunctionalities(functionalities);
     
      Domain objState = DAOFactory.getDomainDAO().loadDomainByCodeAndValue(SpagoBIConstants.DOC_STATE, SpagoBIConstants.DOC_STATE_REL);     
      Integer stateID = objState.getValueId();
      o.setStateID(stateID);
      o.setStateCode(objState.getValueCd());   
     
      BIObject orig_obj = objDao.loadBIObjectById(new Integer(orig_biobj_id));
      ObjTemplate objTemp = new ObjTemplate();
      byte[] content = null;
      if(template != null && template != ""){
View Full Code Here

      if (objId != null && !objId.equals("")){
          BIObject obj = DAOFactory.getBIObjectDAO().loadBIObjectById(new Integer(objId));
          if (obj!= null){
            String state = obj.getStateCode();
            if (state!= null && state.equals("DEV")){
              Domain dTemp = DAOFactory.getDomainDAO().loadDomainByCodeAndValue("STATE", "TEST");
              obj.setStateCode("TEST");
              obj.setStateID(dTemp.getValueId());
            }else if (state!= null && state.equals("TEST")){
              Domain dTemp = DAOFactory.getDomainDAO().loadDomainByCodeAndValue("STATE", "REL");
              obj.setStateCode("REL");
              obj.setStateID(dTemp.getValueId());
            }
            DAOFactory.getBIObjectDAO().modifyBIObject(obj);
          }
       }
   
View Full Code Here

      if (objId != null && !objId.equals("")){
          BIObject obj = DAOFactory.getBIObjectDAO().loadBIObjectById(new Integer(objId));
          if (obj!= null){
            String state = obj.getStateCode();
            if (state!= null && state.equals("REL")){
              Domain dTemp = DAOFactory.getDomainDAO().loadDomainByCodeAndValue("STATE", "TEST");
              obj.setStateCode("TEST");
              obj.setStateID(dTemp.getValueId());
            }else if (state!= null && state.equals("TEST")){
              Domain dTemp = DAOFactory.getDomainDAO().loadDomainByCodeAndValue("STATE", "DEV");
              obj.setStateCode("DEV");
              obj.setStateID(dTemp.getValueId());
            }
            DAOFactory.getBIObjectDAO().modifyBIObject(obj);
          }
       }
   }
View Full Code Here

      response.setAttribute("modality", modalita);
            Parameter parameter = createNewParameter();
      List list = DAOFactory.getDomainDAO().loadListDomainsByType("PAR_TYPE");
      response.setAttribute ("listObj", list);
      if (list.size() > 0) {
        Domain domain = (Domain) list.get(0);
        parameter.setType(domain.getValueCd());
        parameter.setTypeId(domain.getValueId());
      }
      response.setAttribute("parametersObj", parameter);
      //sets information for future definitions of back return
      session.setAttribute("originIns", "true");
    } catch (Exception ex) {
View Full Code Here

            obj.setStateID(null);
            obj.setStateCode("");
            obj.setBiObjectTypeID(null);
            obj.setBiObjectTypeCode("");
            obj.setRefreshSeconds(new Integer(0));
            Domain state = DAOFactory.getDomainDAO().loadDomainByCodeAndValue("STATE", "DEV");
            obj.setStateCode(state.getValueCd());
            obj.setStateID(state.getValueId());
            List functionalitites = new ArrayList();
            obj.setFunctionalities(functionalitites);
            response.setAttribute(NAME_ATTR_OBJECT, obj);
            helper.fillResponse(initialPath);     
    } catch (Exception ex) {
View Full Code Here

TOP

Related Classes of it.eng.spagobi.commons.bo.Domain

Copyright © 2018 www.massapicom. 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.