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

org.ajax4jsf.ajax.resource.ResourceComponent Maven / Gradle / Ivy

Go to download

Ajax4jsf is an open source extension to the JavaServer Faces standard that adds AJAX capability to JSF applications without requiring the writing of any JavaScript.

The newest version!
/**
 * Licensed under the Common Development and Distribution License,
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *   http://www.sun.com/cddl/
 *   
 * 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.
 */

package org.ajax4jsf.ajax.resource;

import java.util.Date;

import javax.faces.el.MethodBinding;

/**
 * @author shura (latest modification by $Author: alexsmirnov $)
 * @version $Revision: 1.2 $ $Date: 2006/07/19 12:36:14 $
 *
 */
public interface ResourceComponent {
	
	/**
	 * Get Mime-type for target .
	 * @return
	 */
	public abstract String getMimeType();

	/**
	 * Set Mime-type for target .
	 * @param newvalue
	 */
	public abstract void setMimeType(String newvalue);
	

	/**
	 * Get Last modified date  for target .
	 * @return
	 */
	public abstract Date getLastModified();

	/**
	 * Set Last modified for target .
	 * @param newvalue
	 */
	public abstract void setLastModified(Date newvalue);
	
	
	/**
	 * Get Expiration time for target .
	 * @return
	 */
	public abstract Date getExpires();

	/**
	 * Set Expiration time for target .
	 * @param newvalue
	 */
	public abstract void setExpires(Date newvalue);
	
	
	/**
	 * Get caching flag for resource.
	 * @return
	 */
	public abstract boolean isCacheable();

	/**
	 * Set caching flag for resource.
	 * @param newvalue
	 */
	public abstract void setCacheable(boolean newvalue);
	
	/**
	 * Get session-avare flag for resource.
	 * @return true if resource depend of client session. If false, no JSESSIONID encoded in URI
	 */
	public abstract boolean isSession();

	/**
	 * Set session-avare flag for resource.
	 * @param newvalue
	 */
	public abstract void setSession(boolean newvalue);
	
	/**
	 * Get Data object, encoded in uri and passed to "send" method for generate resource content.
	 * @return
	 */
	public abstract Object getValue();

	/**
	 * Set Data object, encoded in uri and passed to "send" method for generate resource content.
	 * @param newvalue
	 */
	public abstract void setValue(Object newvalue);
	
	/**
	 * Get El binding to  method in user bean to send resource. Method will called with two parameters - restored data object and servlet output stream.
	 * @return
	 */
	public abstract MethodBinding getCreateContent();

	/**
	 * Set El binding to  method in user bean to send resource. Method will called with two parameters - restored data object and servlet output stream.
	 * @param newvalue
	 */
	public abstract void setCreateContent(MethodBinding newvalue);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy