|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectbr.com.caelum.vraptor.environment.DefaultEnvironment
@ApplicationScoped @Component public class DefaultEnvironment
A default environment implementation which loads the environment file based on the br.com.caelum.vraptor.environment property in the context init parameter.
| Constructor Summary | |
|---|---|
DefaultEnvironment(javax.servlet.ServletContext context)
|
|
| Method Summary | |
|---|---|
String |
get(String key)
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultEnvironment(javax.servlet.ServletContext context)
throws IOException
IOException| Method Detail |
|---|
public boolean supports(String feature)
Environment
supports in interface Environmentpublic boolean has(String key)
Environment
has in interface Environmentpublic String get(String key)
Environment
get in interface Environment
public void set(String key,
String value)
Environment
set in interface Environmentpublic Iterable<String> getKeys()
getKeys in interface Environmentpublic URL getResource(String name)
Environment
getResource in interface Environmentpublic String getName()
Environment
getName in interface Environment
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||