BrightSide Workbench Full Report + Source Code
ContactsBean.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2013 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 package org.turro.contacts.www;
20 
21 import java.io.IOException;
22 import org.turro.string.ObjectString;
23 import org.turro.elephant.context.ElephantContext;
24 import org.turro.elephant.context.IConstructor;
25 
30 @Deprecated
31 public class ContactsBean {
32  private IConstructor constructor;
33  private String context, sclass, syndicationId, summaryTemplate, fullTemplate;
34  private int count;
35 
36  public String getPublished() throws IOException {
37  constructor.setOutputToString();
38  ContactIterator pi = new ContactIterator(constructor, ElephantContext.getRootWebPath() + context, null);
39  pi.setNavigatorTop(true);
40  pi.setNavigatorBottom(true);
41  pi.setFullTemplate(fullTemplate);
42  pi.setSummaryTemplate(summaryTemplate);
43  pi.setPage(count);
44  pi.setSyndicationId(syndicationId);
45  pi.load();
46  pi.render();
47  constructor.setOut(null);
48  return constructor.getOutputString();
49  }
50 
51  public void setSummaryTemplate(String summaryTemplate) {
52  this.summaryTemplate = summaryTemplate;
53  }
54 
55  public void setFullTemplate(String fullTemplate) {
56  this.fullTemplate = fullTemplate;
57  }
58 
59  public void setSyndicationId(String syndicationId) {
60  this.syndicationId = syndicationId;
61  }
62 
63  public void setConstructor(IConstructor constructor) {
64  this.constructor = constructor;
65  }
66 
67  public void setContext(String context) {
68  this.context = context;
69  }
70 
71  public void setCount(String count) {
72  this.count = (Integer) ObjectString.parseNativeString(count, Integer.class, true);
73  }
74 
75  public void setSclass(String sclass) {
76  this.sclass = sclass;
77  }
78 
79 }
void setSyndicationId(String syndicationId)
void setConstructor(IConstructor constructor)
void setSummaryTemplate(String summaryTemplate)
void setSyndicationId(String syndicationId)
void setFullTemplate(String fullTemplate)
void setFullTemplate(String fullTemplate)
void setNavigatorBottom(boolean navigatorBottom)
void setSummaryTemplate(String summaryTemplate)
void setNavigatorTop(boolean navigatorTop)