BrightSide Workbench Full Report + Source Code
org.turro.publication.www.PublicationBean Class Reference

Public Member Functions

String getPublished () throws IOException
 
String getCategoryTitle ()
 
String getCategoryRSS ()
 
void setSummaryTemplate (String summaryTemplate)
 
void setFullTemplate (String fullTemplate)
 
void setCategoryId (String categoryId)
 
void setConstructor (IConstructor constructor)
 
void setContactId (String contactId)
 
void setContext (String context)
 
void setCount (String count)
 
void setGroupId (String groupId)
 
void setPublicationId (String publicationId)
 
void setSclass (String sclass)
 
void setShowBody (String showBody)
 
void setShowDetails (String showDetails)
 
void setShowSummary (String showSummary)
 
void setShowTitle (String showTitle)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 37 of file PublicationBean.java.

Member Function Documentation

◆ getCategoryRSS()

String org.turro.publication.www.PublicationBean.getCategoryRSS ( )

Definition at line 80 of file PublicationBean.java.

80  {
81  return "<div class='rss_feed'>" +
82  "<a href='" + ElephantContext.getRootResourcePath() +
83  "/print_" + context + "?rss'>" +
84  "<img border='0' src='" + ElephantContext.getRootResourcePath() +
85  "/_internal/system/images/feed.png'/>" +
86  "</a></div>";
87  }
Here is the call graph for this function:

◆ getCategoryTitle()

String org.turro.publication.www.PublicationBean.getCategoryTitle ( )

Definition at line 76 of file PublicationBean.java.

76  {
77  return new PublicationPU().find(PublicationCategory.class, categoryId).getName();
78  }

◆ getPublished()

String org.turro.publication.www.PublicationBean.getPublished ( ) throws IOException

Definition at line 45 of file PublicationBean.java.

45  {
46  if(!Strings.isBlank(summaryTemplate) || !Strings.isBlank(fullTemplate)) {
47  constructor.setOutputToString();
48  PublicationIterator pi = new PublicationIterator(constructor, ElephantContext.getRootWebPath() + context, null);
49  pi.setNavigatorTop(false);
50  pi.setNavigatorBottom(false);
51  pi.setFullTemplate(fullTemplate);
52  pi.setSummaryTemplate(summaryTemplate);
53  pi.setPage(count);
54  pi.setContactId(contactId);
55  pi.setGroupId(groupId);
56  pi.setCategoryId(categoryId);
57  pi.load();
58  pi.render();
59  constructor.setOut(null);
60  return constructor.getOutputString();
61  } else if(publicationId != 0) {
62  Publication pub = new PublicationPU().find(Publication.class, publicationId);
63  return PublicationContent.getPublicationStr(
64  pub, sclass, showTitle, showDetails, showSummary, showBody,
65  ElephantContext.getRootWebPath() + context, false,
66  I_.get("See all"), constructor);
67  } else {
68  List<Publication> list = PublicationCategories.getPublicationsBy(
69  count, groupId, categoryId, contactId, true);
70  return PublicationContent.getPublicationsStr(
71  list, sclass, showTitle, showDetails, showSummary, showBody,
72  ElephantContext.getRootWebPath() + context, false, null, constructor);
73  }
74  }
Here is the call graph for this function:

◆ setCategoryId()

void org.turro.publication.www.PublicationBean.setCategoryId ( String  categoryId)

Definition at line 97 of file PublicationBean.java.

97  {
98  this.categoryId = (Long) ObjectString.parseNativeString(categoryId, Long.class, true);
99  }

◆ setConstructor()

void org.turro.publication.www.PublicationBean.setConstructor ( IConstructor  constructor)

Definition at line 101 of file PublicationBean.java.

101  {
102  this.constructor = constructor;
103  }

◆ setContactId()

void org.turro.publication.www.PublicationBean.setContactId ( String  contactId)

Definition at line 105 of file PublicationBean.java.

105  {
106  this.contactId = contactId;
107  }

◆ setContext()

void org.turro.publication.www.PublicationBean.setContext ( String  context)

Definition at line 109 of file PublicationBean.java.

109  {
110  this.context = context;
111  }

◆ setCount()

void org.turro.publication.www.PublicationBean.setCount ( String  count)

Definition at line 113 of file PublicationBean.java.

113  {
114  this.count = (Integer) ObjectString.parseNativeString(count, Integer.class, true);
115  }

◆ setFullTemplate()

void org.turro.publication.www.PublicationBean.setFullTemplate ( String  fullTemplate)

Definition at line 93 of file PublicationBean.java.

93  {
94  this.fullTemplate = fullTemplate;
95  }

◆ setGroupId()

void org.turro.publication.www.PublicationBean.setGroupId ( String  groupId)

Definition at line 117 of file PublicationBean.java.

117  {
118  this.groupId = (Long) ObjectString.parseNativeString(groupId, Long.class, true);
119  }

◆ setPublicationId()

void org.turro.publication.www.PublicationBean.setPublicationId ( String  publicationId)

Definition at line 121 of file PublicationBean.java.

121  {
122  this.publicationId = (Long) ObjectString.parseNativeString(publicationId, Long.class, true);
123  }

◆ setSclass()

void org.turro.publication.www.PublicationBean.setSclass ( String  sclass)

Definition at line 125 of file PublicationBean.java.

125  {
126  this.sclass = sclass;
127  }

◆ setShowBody()

void org.turro.publication.www.PublicationBean.setShowBody ( String  showBody)

Definition at line 129 of file PublicationBean.java.

129  {
130  this.showBody = "true".equals(showBody);
131  }

◆ setShowDetails()

void org.turro.publication.www.PublicationBean.setShowDetails ( String  showDetails)

Definition at line 133 of file PublicationBean.java.

133  {
134  this.showDetails = "true".equals(showDetails);
135  }

◆ setShowSummary()

void org.turro.publication.www.PublicationBean.setShowSummary ( String  showSummary)

Definition at line 137 of file PublicationBean.java.

137  {
138  this.showSummary = "true".equals(showSummary);
139  }

◆ setShowTitle()

void org.turro.publication.www.PublicationBean.setShowTitle ( String  showTitle)

Definition at line 141 of file PublicationBean.java.

141  {
142  this.showTitle = "true".equals(showTitle);
143  }

◆ setSummaryTemplate()

void org.turro.publication.www.PublicationBean.setSummaryTemplate ( String  summaryTemplate)

Definition at line 89 of file PublicationBean.java.

89  {
90  this.summaryTemplate = summaryTemplate;
91  }

The documentation for this class was generated from the following file: