1 19 20 package com.sslexplorer.core; 21 22 import javax.servlet.http.HttpServletRequest ; 23 import javax.servlet.http.HttpServletResponse ; 24 25 import com.sslexplorer.security.Constants; 26 import com.sslexplorer.vfs.clipboard.Clipboard; 27 28 public class ClipboardPanel extends DefaultPanel { 29 30 public ClipboardPanel() { 31 super("clipboard", Panel.MESSAGES, 90, "/WEB-INF/jsp/tiles/clipboard.jspf", null, "navigation", true, true, true, true); 32 } 33 34 public boolean isAvailable(HttpServletRequest request, HttpServletResponse response, String layout) { 35 boolean available = super.isAvailable(request, response, layout); 36 if (available) { 37 Clipboard c = (Clipboard) request.getSession().getAttribute(Constants.CLIPBOARD); 38 available = c != null && c.getContent().size() > 0; 39 } 40 return available; 41 } 42 } | Popular Tags |