Search in sources :

Example 16 with Get

use of br.com.caelum.vraptor.Get in project mamute by caelum.

the class HibernateStatisticsController method show.

@Get("/alsjkdalkjsjdhadskj")
@CustomBrutauthRules(ModeratorOnlyRule.class)
public void show() {
    Statistics statistics = sf.getStatistics();
    result.include("s", statistics);
}
Also used : Statistics(org.hibernate.stat.Statistics) CustomBrutauthRules(br.com.caelum.brutauth.auth.annotations.CustomBrutauthRules) Get(br.com.caelum.vraptor.Get)

Example 17 with Get

use of br.com.caelum.vraptor.Get in project restfulie-java by caelum.

the class ItemsController method show.

@Get
@Path("/items/{id}")
public void show(int id) {
    Item item = database.get(id);
    result.use(representation()).from(item).serialize();
}
Also used : Item(br.com.caelum.example.model.Item) Path(br.com.caelum.vraptor.Path) Get(br.com.caelum.vraptor.Get)

Aggregations

Get (br.com.caelum.vraptor.Get)17 Path (br.com.caelum.vraptor.Path)5 CustomBrutauthRules (br.com.caelum.brutauth.auth.annotations.CustomBrutauthRules)3 Question (org.mamute.model.Question)3 Tag (org.mamute.model.Tag)3 DateTime (org.joda.time.DateTime)2 SocialAPI (org.mamute.auth.SocialAPI)2 TagPage (org.mamute.model.TagPage)2 Token (org.scribe.model.Token)2 Verifier (org.scribe.model.Verifier)2 Espetaculo (br.com.caelum.agiletickets.models.Espetaculo)1 Sessao (br.com.caelum.agiletickets.models.Sessao)1 SimpleBrutauthRules (br.com.caelum.brutauth.auth.annotations.SimpleBrutauthRules)1 Item (br.com.caelum.example.model.Item)1 ConfigurableHypermediaResource (br.com.caelum.vraptor.restfulie.hypermedia.ConfigurableHypermediaResource)1 Serializer (br.com.caelum.vraptor.serialization.Serializer)1 ArrayList (java.util.ArrayList)1 Statistics (org.hibernate.stat.Statistics)1 FacebookAPI (org.mamute.auth.FacebookAPI)1 GoogleAPI (org.mamute.auth.GoogleAPI)1