001/** 002 * Copyright 2005-2016 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.krad.uif.view; 017 018import org.kuali.rice.krad.uif.component.ConfigurableBase; 019 020import java.io.Serializable; 021 022/** 023 * A simple object that keeps track of various HistoryInformation 024 * 025 * TODO a variety of these settings are not used in the current implementation of breadcrumbs 026 * and history, they may be removed later if they prove unuseful in future changes 027 * 028 * @author Kuali Rice Team (rice.collab@kuali.org) 029 */ 030public class HistoryEntry extends ConfigurableBase implements Serializable { 031 private static final long serialVersionUID = -8310916657379268794L; 032 033 private String viewId; 034 private String pageId; 035 private String title; 036 private String url; 037 private String formKey; 038 039 public HistoryEntry() { 040 super(); 041 } 042 043 public HistoryEntry(String viewId, String pageId, String title, String url, String formKey) { 044 super(); 045 046 this.viewId = viewId; 047 this.pageId = pageId; 048 this.title = title; 049 this.url = url; 050 this.formKey = formKey; 051 } 052 053 public String toParam() { 054 return viewId 055 + History.VAR_TOKEN 056 + pageId 057 + History.VAR_TOKEN 058 + title 059 + History.VAR_TOKEN 060 + url 061 + History.VAR_TOKEN 062 + formKey; 063 } 064 065 /** 066 * The viewId of the view 067 * 068 * @return the viewId 069 */ 070 public String getViewId() { 071 return this.viewId; 072 } 073 074 /** 075 * @param viewId the viewId to set 076 */ 077 public void setViewId(String viewId) { 078 this.viewId = viewId; 079 } 080 081 /** 082 * The pageId of the page on the view 083 * 084 * @return the pageId 085 */ 086 public String getPageId() { 087 return this.pageId; 088 } 089 090 /** 091 * @param pageId the pageId to set 092 */ 093 public void setPageId(String pageId) { 094 this.pageId = pageId; 095 } 096 097 /** 098 * The title of the view 099 * 100 * @return the title 101 */ 102 public String getTitle() { 103 return this.title; 104 } 105 106 /** 107 * @param title the title to set 108 */ 109 public void setTitle(String title) { 110 this.title = title; 111 } 112 113 /** 114 * The url of this HistoryEntry 115 * 116 * @return the url 117 */ 118 public String getUrl() { 119 return this.url; 120 } 121 122 /** 123 * @param url the url to set 124 */ 125 public void setUrl(String url) { 126 this.url = url; 127 } 128 129 /** 130 * @return the formKey 131 */ 132 public String getFormKey() { 133 return this.formKey; 134 } 135 136 /** 137 * The formKey of the form in the view 138 * TODO unsure of use 139 * 140 * @param formKey the formKey to set 141 */ 142 public void setFormKey(String formKey) { 143 this.formKey = formKey; 144 } 145 146}