BrightSide Workbench Full Report + Source Code
org.turro.www.describeit.DescribeItCtrl Class Reference

Public Member Functions

 DescribeItCtrl (IConstructor constructor)
 
void setEntityPath (String entityPath)
 
void renderDescriptions (boolean container)
 
void renderDescriptions (String describeId, boolean container)
 
String parseDescriptions (String describeId, boolean container)
 

Detailed Description

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

Definition at line 35 of file DescribeItCtrl.java.

Constructor & Destructor Documentation

◆ DescribeItCtrl()

org.turro.www.describeit.DescribeItCtrl.DescribeItCtrl ( IConstructor  constructor)

Definition at line 41 of file DescribeItCtrl.java.

41  {
42  this.constructor = constructor;
43  }

Member Function Documentation

◆ parseDescriptions()

String org.turro.www.describeit.DescribeItCtrl.parseDescriptions ( String  describeId,
boolean  container 
)

Definition at line 74 of file DescribeItCtrl.java.

74  {
75  Collection<DescribeIt> descriptions = Strings.isBlank(describeId) ?
76  DescribeItUtil.descriptions(entityPath) :
77  DescribeItUtil.descriptions(describeId, entityPath);
78  StringWriter sw = new StringWriter();
79  if(!descriptions.isEmpty()) {
80  html = new HTMLHelper(new PrintWriter(sw));
81  String id = container ? "dic_" + IdGenerator.generate() : constructor.getParameter("domid");
82  if(container) {
83  html.startTag("div", "id='" + id + "'");
84  }
85  for(DescribeIt ci : descriptions) {
86  html.startTag("div", "class='describeit'")
87  .startTag("div", "class='body'")
88  .write(ci.getBody())
89  .endTag()
90  .endTag();
91  }
92  html.endAllTags();
93  }
94  return sw.toString();
95  }
HTMLGenerator write(String value)
HTMLGenerator startTag(String tag)
Here is the call graph for this function:

◆ renderDescriptions() [1/2]

void org.turro.www.describeit.DescribeItCtrl.renderDescriptions ( boolean  container)

Definition at line 49 of file DescribeItCtrl.java.

49  {
50  renderDescriptions(null, container);
51  }
void renderDescriptions(boolean container)
Here is the caller graph for this function:

◆ renderDescriptions() [2/2]

void org.turro.www.describeit.DescribeItCtrl.renderDescriptions ( String  describeId,
boolean  container 
)

Definition at line 53 of file DescribeItCtrl.java.

53  {
54  Collection<DescribeIt> descriptions = Strings.isBlank(describeId) ?
55  DescribeItUtil.descriptions(entityPath) :
56  DescribeItUtil.descriptions(describeId, entityPath);
57  if(!descriptions.isEmpty()) {
58  html = new HTMLHelper(constructor);
59  String id = container ? "dic_" + IdGenerator.generate() : constructor.getParameter("domid");
60  if(container) {
61  html.startTag("div", "id='" + id + "'");
62  }
63  for(DescribeIt ci : descriptions) {
64  html.startTag("div", "class='describeit'")
65  .startTag("div", "class='body'")
66  .write(ci.getBody())
67  .endTag()
68  .endTag();
69  }
70  html.endAllTags();
71  }
72  }
Here is the call graph for this function:

◆ setEntityPath()

void org.turro.www.describeit.DescribeItCtrl.setEntityPath ( String  entityPath)

Definition at line 45 of file DescribeItCtrl.java.

45  {
46  this.entityPath = entityPath;
47  }
Here is the caller graph for this function:

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