Package com.uwyn.drone.webui.elements.admin.modules.log

Source Code of com.uwyn.drone.webui.elements.admin.modules.log.Remove

/*
* Copyright 2002-2005 Uwyn bvba/sprl <info[remove] at uwyn dot com>
* Distributed under the terms of the GNU Lesser General Public
* License, v2.1 or later
*
* $Id: Remove.java 1178 2005-01-05 20:38:38Z gbevin $
*/
package com.uwyn.drone.webui.elements.admin.modules.log;

import com.uwyn.drone.modules.exceptions.LogManagerException;
import com.uwyn.drone.modules.logmanagement.DatabaseLogs;
import com.uwyn.drone.modules.logmanagement.DatabaseLogsFactory;
import com.uwyn.rife.engine.Element;
import com.uwyn.rife.site.ValidationBuilderXhtml;
import com.uwyn.rife.template.Template;
import com.uwyn.rife.tools.ExceptionUtils;
import java.util.logging.Logger;

public class Remove extends Element
{
  private Template mTemplate = null;
 
  public void initialize()
  {
    mTemplate = getHtmlTemplate("drone.admin.modules.log.remove");
  }
 
  public void processElement()
  {
    print(mTemplate);
  }
 
  public void doConfirm()
  {
    DatabaseLogs  database_log = DatabaseLogsFactory.get();
    try
    {
      database_log.remove();
      mTemplate.setBlock("authenticated_content", "removed_content");
    }
    catch (LogManagerException e)
    {
      ValidationBuilderXhtml builder = new ValidationBuilderXhtml();
      builder.setFallbackErrorArea(mTemplate, e.getCause().getMessage());
      Logger.getLogger("com.uwyn.drone.webui").severe(ExceptionUtils.getExceptionStackTrace(e));
    }

    print(mTemplate);
  }
}
TOP

Related Classes of com.uwyn.drone.webui.elements.admin.modules.log.Remove

TOP
Copyright © 2018 www.massapi.com. 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.