All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javax.portlet.ActionResponse Maven / Gradle / Ivy

/*  Licensed to the Apache Software Foundation (ASF) under one
 *  or more contributor license agreements.  See the NOTICE file
 *  distributed with this work for additional information
 *  regarding copyright ownership.  The ASF licenses this file
 *  to you under the Apache License, Version 2.0 (the
 *  "License"); you may not use this file except in compliance
 *  with the License.  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing,
 *  software distributed under the License is distributed on an
 *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 *  KIND, either express or implied.  See the License for the
 *  specific language governing permissions and limitations
 *  under the License.
 */
/*
 * NOTE: this source code is based on an early draft version of JSR 286 and not intended for product
 * implementations. This file may change or vanish in the final version of the JSR 286 specification.
 */
/*
 * This source code implements specifications defined by the Java
 * Community Process. In order to remain compliant with the specification
 * DO NOT add / change / or delete method signatures!
/**
  * Copyright 2006 IBM Corporation.
  */

package javax.portlet;


/**
 * The ActionResponse interface represents the portlet
 * response to an action request.
 * It extends the StateAwareResponse interface to provide specific 
 * action response functionality to portlets.
* The portlet container creates an ActionResponse object and * passes it as argument to the portlet's processAction method. * * @see StateAwareResponse * @see PortletResponse * @see ActionRequest */ public interface ActionResponse extends StateAwareResponse { /** * Instructs the portlet container to send a redirect response * to the client using the specified redirect location URL. *

* This method only accepts an absolute URL (e.g. * http://my.co/myportal/mywebap/myfolder/myresource.gif) * or a full path URI (e.g. /myportal/mywebap/myfolder/myresource.gif). * If required, * the portlet container may encode the given URL before the * redirection is issued to the client. *

* The sendRedirect method can not be invoked after any of the * following methods of the ActionResponse interface has been called: *

    *
  • setPortletMode
  • *
  • setWindowState
  • *
  • setRenderParameter
  • *
  • setRenderParameters
  • *
  • removePublicRenderParamter
  • *
* * @param location the redirect location URL * * @exception java.io.IOException * if an input or output exception occurs. * @exception java.lang.IllegalArgumentException * if a relative path URL is given * @exception java.lang.IllegalStateException * if the method is invoked after any of above mentioned methods of * the ActionResponse interface has been called. */ public void sendRedirect(String location) throws java.io.IOException; /** * Instructs the portlet container to send a redirect response * to the client using the specified redirect location URL and * encode a render URL as parameter on the redirect URL. *

* This method only accepts an absolute URL (e.g. * http://my.co/myportal/mywebap/myfolder/myresource.gif) * or a full path URI (e.g. /myportal/mywebap/myfolder/myresource.gif). * If required, * the portlet container may encode the given URL before the * redirection is issued to the client. *

* The portlet container will attach a render URL with the currently set portlet mode, window state * and render parameters on the ActionResponse and the current public render parameters. * The attached URL will be available as query parameter value under the key provided with the * renderUrlParamName parameter. *

* New values for *

    *
  • setPortletMode *
  • setWindowState *
  • setRenderParameter *
  • setRenderParameters *
* are only used for creating the render URL and not remembered after the redirect * is issued. * * @param location the redirect location URL * @param renderUrlParamName name of the query parameter under which the portlet container should * store a render URL to this portlet * * @exception java.io.IOException * if an input or output exception occurs. * @exception java.lang.IllegalArgumentException * if a relative path URL is given * * @since 2.0 */ public void sendRedirect(String location, String renderUrlParamName) throws java.io.IOException; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy