ActionRequest req, ActionResponse res)
throws Exception
{
String message = "";
String errorMessage = "";
CmsMaintenanceForm ccf = (CmsMaintenanceForm) form;
String cmd = req.getParameter("cmd");
String defaultStructure = req.getParameter("defaultStructure");
Structure structure = new Structure();
//Manage all the cache Task
if(cmd.equals("cache")){
String cacheName = ccf.getCacheName();
if (cacheName.equals(com.dotmarketing.util.WebKeys.Cache.CACHE_CONTENTS_INDEX))
{
Logger.info(this, "Running Contents Index Cache");
if(defaultStructure.equals("Rebuild Whole Index")){
structure = StructureCache.getStructureByVelocityVarName(defaultStructure);
}else
structure = StructureCache.getStructureByVelocityVarName(ccf.getStructure());
if(!InodeUtils.isSet(structure.getInode()))
{
try{
int shards = Config.getIntProperty("es.index.number_of_shards", 2);
try{