br.com.caelum.vraptor.environment
Interface Environment

All Known Implementing Classes:
DefaultEnvironment

public interface Environment

An environment has a set of key/value properties to be used within your application

Author:
Alexandre Atoji, Guilherme Silveira

Method Summary
 String get(String string)
          Returns a key
 Iterable<String> getKeys()
           
 String getName()
          Returns the environment name
 URL getResource(String name)
          Locates a resource according to your current environment.
 boolean has(String key)
          Checks if a key is present
 void set(String key, String value)
          Sets a key in memory.
 boolean supports(String feature)
          Checks if a key is equals to true if it's not present will return false
 

Method Detail

getName

String getName()
Returns the environment name


has

boolean has(String key)
Checks if a key is present


supports

boolean supports(String feature)
Checks if a key is equals to true if it's not present will return false


get

String get(String string)
Returns a key


set

void set(String key,
         String value)
Sets a key in memory. This will *not* affect any configuration file.

Parameters:
key -
value -

getKeys

Iterable<String> getKeys()

getResource

URL getResource(String name)
Locates a resource according to your current environment.



Copyright © 2011. All Rights Reserved.