Package com.dotmarketing.velocity

Examples of com.dotmarketing.velocity.DotResourceCache


      }
    }
    //http://jira.dotmarketing.net/browse/DOTCMS-1873
    //To clear velocity cache
    //http://jira.dotmarketing.net/browse/DOTCMS-2435
    DotResourceCache vc = CacheLocator.getVeloctyResourceCache();
        vc.clearMenuCache();
  }
View Full Code Here


      }
    }
    //http://jira.dotmarketing.net/browse/DOTCMS-1873
    //To clear velocity cache
    //http://jira.dotmarketing.net/browse/DOTCMS-2435
    DotResourceCache vc = CacheLocator.getVeloctyResourceCache();
        vc.clearMenuCache();
  }
View Full Code Here

      }
    }
    //http://jira.dotmarketing.net/browse/DOTCMS-1873
    //To clear velocity cache
    //http://jira.dotmarketing.net/browse/DOTCMS-2435
    DotResourceCache vc = CacheLocator.getVeloctyResourceCache();
        vc.clearMenuCache();
  }
View Full Code Here

    // creates the new file as
    // inode{1}/inode{2}/inode.file_extension
    java.io.File workingFile = getAssetIOFile(file);

    // To clear velocity cache
    DotResourceCache vc = CacheLocator.getVeloctyResourceCache();
    vc.remove(ResourceManager.RESOURCE_TEMPLATE + workingFile.getPath());

    // If a new version was created, we move the current data to the new
    // version
    if (destination != null && InodeUtils.isSet(destination.getInode())) {
      java.io.File newVersionFile = getAssetIOFile(destination);
View Full Code Here

            // inode{1}/inode{2}/inode.file_extension
            java.io.File workingIOFile = fileAPI.getAssetIOFile(actualFile);

            //http://jira.dotmarketing.net/browse/DOTCMS-1873
            //To clear velocity cache
            DotResourceCache vc = CacheLocator.getVeloctyResourceCache();
            vc.remove(ResourceManager.RESOURCE_TEMPLATE + workingIOFile.getPath());

            // If a new version was created, we move the current
            // data to the new version
            if (file != null && InodeUtils.isSet(file.getInode())) {
              byte[] currentData = new byte[0];
              FileInputStream is = new FileInputStream(workingIOFile);
              int size = is.available();
              currentData = new byte[size];
              is.read(currentData);
              java.io.File newVersionFile = fileAPI.getAssetIOFile(file);

              //http://jira.dotmarketing.net/browse/DOTCMS-1873
              //To clear velocity cache
              vc.remove(ResourceManager.RESOURCE_TEMPLATE + newVersionFile.getPath());

              FileChannel channelTo = new FileOutputStream(newVersionFile).getChannel();
              ByteBuffer currentDataBuffer = ByteBuffer.allocate(currentData.length);
              currentDataBuffer.put(currentData);
              currentDataBuffer.position(0);
View Full Code Here

      }

      //http://jira.dotmarketing.net/browse/DOTCMS-1873
      //To clear velocity cache
      if(workingFile!=null){
        DotResourceCache vc = CacheLocator.getVeloctyResourceCache();
        vc.remove(ResourceManager.RESOURCE_TEMPLATE + workingFile.getPath());
      }

      InputStream is = content;
      byte[] currentData = IOUtils.toByteArray(is);
View Full Code Here

    // inode{1}/inode{2}/inode.file_extension
    java.io.File workingFile = getAssetIOFile(file);

    // http://jira.dotmarketing.net/browse/DOTCMS-1873
    // To clear velocity cache
    DotResourceCache vc = CacheLocator.getVeloctyResourceCache();
    vc.remove(ResourceManager.RESOURCE_TEMPLATE + workingFile.getPath());

    // If a new version was created, we move the current data to the new
    // version
    if (destination != null && InodeUtils.isSet(destination.getInode())) {
      java.io.File newVersionFile = getAssetIOFile(destination);
View Full Code Here

    }
  }

  private void invalidateCacheFromCluster(String k) {
    boolean flushMenus = false;
    DotResourceCache vc = CacheLocator.getVeloctyResourceCache();
    String menuGroup = vc.getMenuGroup();

    int i = k.lastIndexOf(":");
    if (i > 0) {
      String key = k.substring(0, i);
      String group = k.substring(i + 1, k.length());
View Full Code Here

    String velocityRoot=FileUtil.getRealPath("/WEB-INF/velocity/") + folderPath;
 
    String filePath=  folderPath + identifier.getInode() + "_" + asset.getLanguageId() + "." + Config.getStringProperty("VELOCITY_CONTENT_MAP_EXTENSION");
    java.io.File f=new java.io.File (velocityRoot + filePath);
    f.delete();
    DotResourceCache vc=CacheLocator.getVeloctyResourceCache();
        vc.remove(ResourceManager.RESOURCE_TEMPLATE + filePath );
   
        List<Field> fields=FieldsCache.getFieldsByStructureInode(asset.getStructureInode());
        for (Field field : fields) {
      try {
        FieldServices.invalidate(field.getInode(), asset.getInode(), EDIT_MODE);
View Full Code Here

    out.write(data);

    out.flush();
    out.close();
    tmpOut.close();
    DotResourceCache vc=CacheLocator.getVeloctyResourceCache();
        vc.remove(ResourceManager.RESOURCE_TEMPLATE + filePath );

  }
View Full Code Here

TOP

Related Classes of com.dotmarketing.velocity.DotResourceCache

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.