Package it.eng.spagobi.commons.bo

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


          ObjMetacontent objMetacontent = (ObjMetacontent) DAOFactory.getObjMetacontentDAO().loadObjMetacontent(objMetadata.getObjMetaId(), biObj.getId(), null);
          if(objMetacontent != null){
            Integer binId = objMetacontent.getBinaryContentId();
            String uid = createUidDocument(String.valueOf(binId.intValue()), String.valueOf(biObj.getId().intValue()));
            Integer idDomain = objMetadata.getDataType();
            Domain domain = DAOFactory.getDomainDAO().loadDomainById(idDomain);
            String binIdString = String.valueOf(binId.intValue());
           
            byte[] content = objMetacontent.getContent();
            String htmlContent = null;
            if (domain.getValueCd().equalsIgnoreCase(LONG_TEXT)) {
              bais = new ByteArrayInputStream(content);
              JTidyHTMLHandler htmlHandler = new JTidyHTMLHandler();
              htmlContent = htmlHandler.getContent(bais);
              bais.close();
            }
View Full Code Here


              ObjMetacontent metacontent = metacontentDAO.loadObjMetacontent(metaId, biObjId, null);
              //indexes biobject+metadata -->document uid is of type biObjId+"_"+binId
              if(metacontent != null){
                hasMetacontent = true;
                Integer idDomain = metadata.getDataType();
                Domain domain = DAOFactory.getDomainDAO().loadDomainById(idDomain);
               
                Integer binId = metacontent.getBinaryContentId();
                Integer biobjId = metacontent.getBiobjId();
               
                String binIdString = String.valueOf(binId.intValue());
   
                byte[] content = metacontent.getContent();
                String htmlContent = null;
                if (domain.getValueCd().equalsIgnoreCase(LONG_TEXT)) {
                  bais = new ByteArrayInputStream(content);
                  JTidyHTMLHandler htmlHandler = new JTidyHTMLHandler();
                  htmlContent = htmlHandler.getContent(bais);
                  bais.close();
                }
View Full Code Here

   
    try {
      SbiUdp udp = (SbiUdp)o;
      result = new JSONObject();
      //converts valueId in valueCd information
      Domain tmpDomain = DAOFactory.getDomainDAO().loadDomainById(udp.getTypeId());
      String typeStr = tmpDomain.getValueCd();         
      tmpDomain = DAOFactory.getDomainDAO().loadDomainById((udp.getFamilyId()));
      String familyStr =  tmpDomain.getValueCd();
       
      result.put(UDP_ID, udp.getUdpId());
      result.put(UDP_NAME, udp.getName() );
      result.put(UDP_DESCRIPTION, udp.getDescription() );
      result.put(UDP_LABEL, udp.getLabel() );
View Full Code Here

   *
   * @return true, if is internal
   */
  public static boolean isInternal(Engine engine) {
    boolean response = false;
    Domain engineType = getEngTypeDom(engine);
    if("INT".equalsIgnoreCase(engineType.getValueCd()))
      response=true;
    return response;
  }
View Full Code Here

   *
   * @return true, if is external
   */
  public static boolean isExternal(Engine engine) {
    boolean response = false;
    Domain engineType = getEngTypeDom(engine);
    if("EXT".equalsIgnoreCase(engineType.getValueCd()))
      response=true;
    return response;
  }
View Full Code Here

    return response;
  }
 
 
  private static Domain getEngTypeDom(Engine engine) {
    Domain engineType = null;
    try {
      engineType = DAOFactory.getDomainDAO().loadDomainById(engine.getEngineTypeId());
    } catch (EMFUserError e) {
       SpagoBITracer.major(SpagoBIConstants.NAME_MODULE, EngineUtilities.class.getName(),
                     "getEngTypeDom", "Error retrieving engine type domain", e);
View Full Code Here

    if (this.subObject == null) {
      throw new SpagoBIServiceException("", "no subobject set");
    }
    String url = null;
    Engine engine = this.getBIObject().getEngine();
    Domain engineType;
    try {
      engineType = DAOFactory.getDomainDAO().loadDomainById(
          engine.getEngineTypeId());
    } catch (EMFUserError e) {
      throw new SpagoBIServiceException("Impossible to load engine type domain", e);
    }

    // IF THE ENGINE IS EXTERNAL
    if ("EXT".equalsIgnoreCase(engineType.getValueCd())) {
      // instance the driver class
      String driverClassName = engine.getDriverName();
      IEngineDriver aEngineDriver = null;
      try {
        aEngineDriver = (IEngineDriver) Class.forName(driverClassName).newInstance();
View Full Code Here

  public String getExecutionUrl(Locale locale) {
    logger.debug("IN");
    String url = null;
    Engine engine = this.getBIObject().getEngine();
    Domain engineType;
    try {
      engineType = DAOFactory.getDomainDAO().loadDomainById(
          engine.getEngineTypeId());
    } catch (EMFUserError e) {
      throw new SpagoBIServiceException("Impossible to load engine type domain", e);
    }

    // IF THE ENGINE IS EXTERNAL
    if ("EXT".equalsIgnoreCase(engineType.getValueCd())) {
      // instance the driver class
      String driverClassName = engine.getDriverName();
      IEngineDriver aEngineDriver = null;
      try {
        aEngineDriver = (IEngineDriver) Class.forName(driverClassName).newInstance();
View Full Code Here

            logger.error("Error while getting available document states from db", e);
          }
          boolean stateFound = false;
          Iterator it = availableStates.iterator();
          while (it.hasNext()) {
            Domain aDomain = (Domain) it.next();
            if (aDomain.getValueCd().equalsIgnoreCase(documentState)) {
              stateFound = true;
              break;
            }
          }
          if (stateFound) {
View Full Code Here

    }
    Engine engine = obj.getEngine();
    audit.setEngineId(engine.getId());
    audit.setEngineLabel(engine.getLabel());
    audit.setEngineName(engine.getName());
    Domain engineType = null;
    try {
      engineType = DAOFactory.getDomainDAO().loadDomainById(engine.getEngineTypeId());
    } catch (EMFUserError e) {
      logger.error("Error retrieving document's engine information", e);
    }
    audit.setEngineType(engineType != null ? engineType.getValueCd() : null);
    if (engineType != null) {
      if ("EXT".equalsIgnoreCase(engineType.getValueCd())) {
        audit.setEngineUrl(engine.getUrl());
        audit.setEngineDriver(engine.getDriverName());
      } else {
        audit.setEngineClass(engine.getClassName());
      }
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.