Search in sources :

Example 6 with Get

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

the class RankingController method tagRank.

@Get
public void tagRank(String tagName) {
    Tag tag = tags.findByName(tagName);
    if (tag == null) {
        result.notFound();
    }
    result.include("tag", tag);
    DateTime after = new DateTime().minusDays(30);
    result.include("tag", tag);
    result.include("answerersAllTime", reputationEvents.getTopAnswerersSummaryAllTime(tag));
    result.include("answerersLastMonth", reputationEvents.getTopAnswerersSummaryAfter(tag, after));
    result.include("askersAllTime", reputationEvents.getTopAskersSummaryAllTime(tag));
    result.include("askersLastMonth", reputationEvents.getTopAskersSummaryAfter(tag, after));
    result.include("usersActive", true);
    result.include("noDefaultActive", true);
}
Also used : Tag(org.mamute.model.Tag) DateTime(org.joda.time.DateTime) Get(br.com.caelum.vraptor.Get)

Example 7 with Get

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

the class TagPageController method showTagPage.

@Get
public void showTagPage(String tagName) {
    TagPage tagPage = tagPages.findByTag(tagName);
    result.include(tagPage);
    result.include("hasAbout", tags.hasAbout(tagPage.getTag()));
}
Also used : TagPage(org.mamute.model.TagPage) Get(br.com.caelum.vraptor.Get)

Example 8 with Get

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

the class EspetaculosController method sessao.

@Get
@Path("/sessao/{id}")
public void sessao(Long id) {
    Sessao sessao = agenda.sessao(id);
    if (sessao == null) {
        result.notFound();
    }
    result.include("sessao", sessao);
}
Also used : Sessao(br.com.caelum.agiletickets.models.Sessao) Path(br.com.caelum.vraptor.Path) Get(br.com.caelum.vraptor.Get)

Example 9 with Get

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

the class EspetaculosController method sessoes.

@Get
@Path("/espetaculo/{espetaculoId}/sessoes")
public void sessoes(Long espetaculoId) {
    Espetaculo espetaculo = carregaEspetaculo(espetaculoId);
    result.include("espetaculo", espetaculo);
}
Also used : Espetaculo(br.com.caelum.agiletickets.models.Espetaculo) Path(br.com.caelum.vraptor.Path) Get(br.com.caelum.vraptor.Get)

Example 10 with Get

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

the class ListController method withTag.

@Get
public void withTag(String tagName, Integer p, boolean semRespostas) {
    Integer page = getPage(p);
    Tag tag = tags.findByName(tagName);
    if (tag == null) {
        result.notFound();
        return;
    }
    List<Question> questionsWithTag = questions.withTagVisible(tag, page, semRespostas);
    result.include("totalPages", questions.numberOfPages(tag));
    result.include("tag", tag);
    result.include("recentTags", recentTagsContainer.getRecentTagsUsage());
    result.include("questions", questionsWithTag);
    result.include("currentPage", page);
    result.include("hasAbout", tags.hasAbout(tag));
    if (semRespostas) {
        result.include("unansweredActive", true);
        result.include("noDefaultActive", true);
        result.include("unansweredTagLinks", true);
    }
}
Also used : Question(org.mamute.model.Question) Tag(org.mamute.model.Tag) 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