Context.java :  » Web-Framework » vraptor » org » vraptor » scope » Java Open Source

Java Open Source » Web Framework » vraptor 
vraptor » org » vraptor » scope » Context.java
package org.vraptor.scope;

/**
 * A simple context, similar to a map. 
 * 
 * @author Guilherme Silveira
 * @author Paulo Silveira
 */
public interface Context {
  /**
   * Sets an attribute. Optional operation.
   * 
   * @param name
   *            name
   * @param value
   *            value
   */
  void setAttribute(String name, Object value);

  /**
   * Retrieves an attribute
   * 
   * @param name
   *            name
   * @return value or null if not found
   */
  Object getAttribute(String name);

  /**
   * Whether it contains an attribute
   * 
   * @param name
   *            name
   * @return true if contained
   */
  boolean hasAttribute(String name);

  /**
   * Removes an attribute
   * 
   * @param name
   *            name
   * @return value
   */
  Object removeAttribute(String name);
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.