1 /*
2 * Copyright (C) 2003-2007 eXo Platform SAS.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Affero General Public License
6 * as published by the Free Software Foundation; either version 3
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see<http://www.gnu.org/licenses/>.
16 */
17 package org.exoplatform.ecm.webui.component.admin.views;
18
19 import java.util.MissingResourceException;
20 import java.util.ResourceBundle;
21
22 import org.exoplatform.web.application.RequestContext;
23
24 /**
25 * Created by The eXo Platform SARL
26 * Author : Tran The Trong
27 * trongtt@gmail.com
28 * Oct 9, 2006
29 * 2:36:06 PM
30 */
31 public class TemplateBean {
32 private String name ;
33 private String path ;
34
35 public TemplateBean(String n, String p) {
36 name = n ;
37 path = p ;
38 }
39
40 public String getName() {
41 ResourceBundle res = RequestContext.getCurrentInstance().getApplicationResourceBundle();
42 String label = null;
43 try {
44 label = res.getString("UIViewFormTabPane.label.option." + name);
45 } catch (MissingResourceException e) {
46 label = name;
47 }
48 return label;
49 }
50 public void setName(String n) { name = n ; }
51
52 public String getPath() { return path ; }
53 public void setPath(String p) { path = p ; }
54 }