| /******************************************************************************* |
| * Copyright (c) 2007 SAP AG and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation |
| *******************************************************************************/ |
| package org.eclipse.jst.j2ee.internal.web.operations; |
| |
| import org.eclipse.wst.common.frameworks.datamodel.IDataModel; |
| |
| public class FilterSupertypesValidator extends AbstractSupertypesValidator { |
| |
| public static final String FILTER_INTERFACE_NAME = "javax.servlet.Filter"; |
| |
| public FilterSupertypesValidator(IDataModel dataModel) { |
| super(dataModel); |
| } |
| |
| public boolean isFilterSuperclass() { |
| if (hasSuperInterface(getSuperclass(), FILTER_INTERFACE_NAME)) |
| return true; |
| |
| for (Object iface : getInterfaces()) { |
| if (hasSuperInterface((String) iface, FILTER_INTERFACE_NAME)) |
| return true; |
| } |
| |
| return false; |
| } |
| |
| } |