Package org.infoglue.cms.entities.content

Examples of org.infoglue.cms.entities.content.DigitalAssetVO


    file.renameTo(newFile);

    // Create Digital Asset for label
    logger.info("Creating Digital Asset for label");
    DigitalAssetVO newAsset = new DigitalAssetVO();
    newAsset.setAssetContentType("text/infoglue-translation");
    newAsset.setAssetKey("translation");
    newAsset.setAssetFileName(newFile.getName());
    newAsset.setAssetFilePath(newFile.getPath());
    newAsset.setAssetFileSize(new Integer(new Long(newFile.length()).intValue()));

    // Check existance of presentation string and remove old ones
    List assets = LabelController.getDigitalAssetByName(newFile.getName());
    if (assets != null && assets.size() > 0)
    {
View Full Code Here


         
          if(assetKey == null || match.contains("\"" + assetKey + "\"") || match.contains("\"" + encodedAssetKey + "\""))
          {
            match = match.substring(match.indexOf("\"")+1, match.length()-2);
            match = URLDecoder.decode(match, "utf-8");
            DigitalAssetVO daVO = null;
            if(returnMatchOnNoAssetKey || !match.equals(""))
              daVO = DigitalAssetController.getController().getDigitalAssetVO(contentId, languageId, match, true, db);
           
            if(daVO != null && (assetKey == null || assetKey.equals(daVO.getAssetKey())))
            {
              String assetUrl = DigitalAssetController.getController().getDigitalAssetThumbnailUrl(daVO.getId(), 70, 70, Color.WHITE, "center", "middle", 60, 60, 30, db);
              if(assetUrl != null && !assetUrl.equals(""))
                sb.append("<a href='#' onmouseover=\"$('#casset_" + daVO.getId() + "').show();\" onmouseout=\"$('#casset_" + daVO.getId() + "').hide();\">" + match + "</a><div id='casset_" + daVO.getId() + "' style='display: none; position: absolute;'><img src='" + assetUrl + "'/></div>" + ", ");
            }
          }
      }
     
      Pattern pattern2 = Pattern.compile("<binding ([^<]*)</binding>");
      //Pattern pattern2 = Pattern.compile("<binding *?entity=\"Content\" entityId=\"81\"><binding>");
      Matcher matcher2 = pattern2.matcher(versionValue);
      while ( matcher2.find() )
      {
          String match = matcher2.group();
        //System.out.println("assetKey:" + assetKey + ", match:" + match);
        if(match.contains("entityId=\"" + contentId + "\"") && match.contains("assetKey="))
          {
            int indexAssetKey = match.indexOf("assetKey=");
            int indexAssetKeyEnd = match.indexOf("\"", indexAssetKey+10);
            match = match.substring(indexAssetKey+10, indexAssetKeyEnd);
            logger.info("match:" + match);
            match = URLDecoder.decode(match, "utf-8");
            logger.info("match:" + match);
                       
            DigitalAssetVO daVO = null;
            if(returnMatchOnNoAssetKey || !match.equals(""))
              daVO = DigitalAssetController.getController().getDigitalAssetVO(contentId, languageId, match, true, db);
           
            if(daVO != null && (assetKey == null || assetKey.equals(daVO.getAssetKey())))
            {
              logger.info("daVO.getAssetKey():" + daVO.getAssetKey());
              String assetUrl = DigitalAssetController.getController().getDigitalAssetThumbnailUrl(daVO.getId(), 70, 70, Color.WHITE, "center", "middle", 60, 60, 30, db);
              if(assetUrl != null && !assetUrl.equals(""))
                sb.append("<a href='#' onmouseover=\"$('#passet_" + daVO.getId() + "').show();\" onmouseout=\"$('#passet_" + daVO.getId() + "').hide();\">" + match + "</a><div id='passet_" + daVO.getId() + "' style='display: none; position: absolute;'><img src='" + assetUrl + "'/></div>" + ", ");
            }
          }
      }
     
     
View Full Code Here

TOP

Related Classes of org.infoglue.cms.entities.content.DigitalAssetVO

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.