001/* 002 * Stallion Core: A Modern Web Framework 003 * 004 * Copyright (C) 2015 - 2016 Stallion Software LLC. 005 * 006 * This program is free software: you can redistribute it and/or modify it under the terms of the 007 * GNU General Public License as published by the Free Software Foundation, either version 2 of 008 * the License, or (at your option) any later version. This program is distributed in the hope that 009 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 011 * License for more details. You should have received a copy of the GNU General Public License 012 * along with this program. If not, see <http://www.gnu.org/licenses/gpl-2.0.html>. 013 * 014 * 015 * 016 */ 017 018package io.stallion.requests; 019 020import io.stallion.restfulEndpoints.RestEndpointBase; 021 022import java.util.HashMap; 023import java.util.Map; 024 025 026public class RouteResult { 027 /*(var template:String, var params:Map<String, String>, redirectUrl:String, var preempt:Boolean, var name:String, var group:String)*/ 028 private String template = ""; 029 private Map<String, String> params = new HashMap<String, String>(); 030 private String redirectUrl = ""; 031 private Boolean preempt = false; 032 private String name = ""; 033 private String group = ""; 034 private RestEndpointBase endpoint = null; 035 private String pageTitle = ""; 036 private String metaDescription = ""; 037 038 public String getTemplate() { 039 return template; 040 } 041 042 public RouteResult setTemplate(String template) { 043 this.template = template; 044 return this; 045 } 046 047 public Map<String, String> getParams() { 048 return params; 049 } 050 051 public RouteResult setParams(Map<String, String> params) { 052 this.params = params; 053 return this; 054 } 055 056 public String getRedirectUrl() { 057 return redirectUrl; 058 } 059 060 public RouteResult setRedirectUrl(String redirectUrl) { 061 this.redirectUrl = redirectUrl; 062 return this; 063 } 064 065 public Boolean getPreempt() { 066 return preempt; 067 } 068 069 public RouteResult setPreempt(Boolean preempt) { 070 this.preempt = preempt; 071 return this; 072 } 073 074 public String getName() { 075 return name; 076 } 077 078 public RouteResult setName(String name) { 079 this.name = name; 080 return this; 081 } 082 083 public String getGroup() { 084 return group; 085 } 086 087 public RouteResult setGroup(String group) { 088 this.group = group; 089 return this; 090 } 091 092 093 public RestEndpointBase getEndpoint() { 094 return endpoint; 095 } 096 097 public RouteResult setEndpoint(RestEndpointBase endpoint) { 098 this.endpoint = endpoint; 099 return this; 100 } 101 102 public String getPageTitle() { 103 return pageTitle; 104 } 105 106 public RouteResult setPageTitle(String pageTitle) { 107 this.pageTitle = pageTitle; 108 return this; 109 } 110 111 public String getMetaDescription() { 112 return metaDescription; 113 } 114 115 public RouteResult setMetaDescription(String metaDescription) { 116 this.metaDescription = metaDescription; 117 return this; 118 } 119}