001 /* 002 * Copyright 2007 Peter Ledbrook. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * 017 * 018 * Modified 2009 Bradley Beddoes, Intient Pty Ltd, Ported to Apache Ki 019 * Modified 2009 Kapil Sachdeva, Gemalto Inc, Ported to Apache Shiro 020 */ 021 package org.codehaus.groovy.grails.plugins.gwt; 022 023 import org.codehaus.groovy.grails.commons.ArtefactHandlerAdapter; 024 025 /** 026 * Manages the GWT action handler artifact type. Action handlers are 027 * the server-side components that process the actions (or commands) 028 * that come from the GWT client. Actions are equivalent to commands 029 * in the Command pattern. 030 */ 031 public final class ActionHandlerArtefactHandler extends ArtefactHandlerAdapter { 032 public static final String TYPE = "ActionHandler"; 033 034 public ActionHandlerArtefactHandler() { 035 super(TYPE, ActionHandlerGrailsClass.class, DefaultActionHandlerGrailsClass.class, null); 036 } 037 038 public boolean isArtefactClass(Class clazz) { 039 return clazz != null && clazz.getName().endsWith(TYPE); 040 } 041 }