001/* 002 * Copyright 2002-2015 the original author or authors. 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 * https://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 017package org.springframework.web.portlet.bind.annotation; 018 019import java.lang.annotation.Documented; 020import java.lang.annotation.ElementType; 021import java.lang.annotation.Retention; 022import java.lang.annotation.RetentionPolicy; 023import java.lang.annotation.Target; 024 025import org.springframework.core.annotation.AliasFor; 026import org.springframework.web.bind.annotation.Mapping; 027 028/** 029 * Annotation for mapping Portlet render requests onto handler methods. 030 * 031 * @author Juergen Hoeller 032 * @author Sam Brannen 033 * @since 3.0 034 * @see org.springframework.web.bind.annotation.RequestMapping 035 */ 036@Target({ElementType.METHOD}) 037@Retention(RetentionPolicy.RUNTIME) 038@Documented 039@Mapping 040public @interface RenderMapping { 041 042 /** 043 * Alias for {@link #windowState}. 044 */ 045 @AliasFor("windowState") 046 String value() default ""; 047 048 /** 049 * The window state that the annotated render method applies for. 050 * <p>If not specified, the render method will be invoked for any 051 * window state within its general mapping. 052 * <p>Standard Portlet specification values are supported: {@code "NORMAL"}, 053 * {@code "MAXIMIZED"}, {@code "MINIMIZED"}. 054 * <p>Custom window states can be used as well, as supported by the portal. 055 * @since 4.2 056 * @see #value 057 * @see javax.portlet.PortletRequest#getWindowState() 058 */ 059 @AliasFor("value") 060 String windowState() default ""; 061 062 /** 063 * The parameters of the mapped request, narrowing the primary mapping. 064 * <p>Same format for any environment: a sequence of {@code "myParam=myValue"} 065 * style expressions, with a request only mapped if each such parameter is found 066 * to have the given value. {@code "myParam"} style expressions are also supported, 067 * with such parameters having to be present in the request (allowed to have 068 * any value). Finally, {@code "!myParam"} style expressions indicate that the 069 * specified parameter is <i>not</i> supposed to be present in the request. 070 * @see org.springframework.web.bind.annotation.RequestMapping#params() 071 */ 072 String[] params() default {}; 073 074}