BrightSide Workbench Full Report + Source Code
org.turro.elephant.entities.web.WebItem Class Reference
Inheritance diagram for org.turro.elephant.entities.web.WebItem:
Collaboration diagram for org.turro.elephant.entities.web.WebItem:

Public Member Functions

String getWebTag ()
 
void setWebTag (String webTag)
 
WebItemType getType ()
 
void setType (WebItemType type)
 
String getCaption ()
 
void setCaption (String caption)
 
String getImage ()
 
void setImage (String image)
 
int getOrdering ()
 
void setOrdering (int ordering)
 
Wiki getSummary ()
 
void setSummary (Wiki summary)
 
Wiki getDescription ()
 
void setDescription (Wiki description)
 
Set< WebGoalgetGoals ()
 
void setGoals (Set< WebGoal > goals)
 
Set< WebItemgetNexts ()
 
void setNexts (Set< WebItem > nexts)
 
Set< String > getExternals ()
 
void setExternals (Set< String > externals)
 
String getPlainCompendium ()
 
String getCompendium ()
 
String getContent ()
 
boolean isIcon ()
 
boolean isValid ()
 
Icons getIcons ()
 
String getItemLabel ()
 
void compose ()
 
Set< WebLinkgetExternalLinks ()
 
int hashCode ()
 
boolean equals (Object obj)
 
Object entityId ()
 
boolean isEmpty ()
 
- Public Member Functions inherited from org.turro.jpa.entity.IDaoEntity
default boolean isNew ()
 
default void prepareSave ()
 
default void prepareDelete ()
 
default void removeEmpties ()
 
default Collection< Collection > collections ()
 

Detailed Description

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

Definition at line 53 of file WebItem.java.

Member Function Documentation

◆ compose()

void org.turro.elephant.entities.web.WebItem.compose ( )

Definition at line 199 of file WebItem.java.

199  {
200  IConstructor constructor = Application.getApplication().getConstructor();
201  if(constructor != null) {
202  getSummary().compose(constructor);
203  getDescription().compose(constructor);
204  }
205  }
void compose(IConstructor constructor)
Definition: Wiki.java:66
Here is the call graph for this function:

◆ entityId()

Object org.turro.elephant.entities.web.WebItem.entityId ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 237 of file WebItem.java.

237  {
238  return webTag;
239  }

◆ equals()

boolean org.turro.elephant.entities.web.WebItem.equals ( Object  obj)

Definition at line 220 of file WebItem.java.

220  {
221  if (this == obj) {
222  return true;
223  }
224  if (obj == null) {
225  return false;
226  }
227  if (getClass() != obj.getClass()) {
228  return false;
229  }
230  final WebItem other = (WebItem) obj;
231  return Objects.equals(this.webTag, other.webTag);
232  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCaption()

String org.turro.elephant.entities.web.WebItem.getCaption ( )

Definition at line 103 of file WebItem.java.

103  {
104  return caption;
105  }

◆ getCompendium()

String org.turro.elephant.entities.web.WebItem.getCompendium ( )

Definition at line 175 of file WebItem.java.

175  {
176  return summary == null ? "" : summary.getText();
177  }
Here is the call graph for this function:

◆ getContent()

String org.turro.elephant.entities.web.WebItem.getContent ( )

Definition at line 179 of file WebItem.java.

179  {
180  return description == null ? "" : description.getText();
181  }
Here is the call graph for this function:

◆ getDescription()

Wiki org.turro.elephant.entities.web.WebItem.getDescription ( )

Definition at line 136 of file WebItem.java.

136  {
137  if(description == null) description = new Wiki();
138  return description;
139  }
Here is the caller graph for this function:

◆ getExternalLinks()

Set<WebLink> org.turro.elephant.entities.web.WebItem.getExternalLinks ( )

Definition at line 207 of file WebItem.java.

207  {
208  return externals.stream().map(ext -> WebActions.of(ext).link())
209  .filter(wl -> !wl.isEmpty()).collect(Collectors.toSet());
210  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getExternals()

Set<String> org.turro.elephant.entities.web.WebItem.getExternals ( )

Definition at line 161 of file WebItem.java.

161  {
162  return externals;
163  }
Here is the caller graph for this function:

◆ getGoals()

Set<WebGoal> org.turro.elephant.entities.web.WebItem.getGoals ( )

Definition at line 145 of file WebItem.java.

145  {
146  return goals;
147  }
Here is the caller graph for this function:

◆ getIcons()

Icons org.turro.elephant.entities.web.WebItem.getIcons ( )

Definition at line 191 of file WebItem.java.

191  {
192  return Icons.from(image);
193  }

◆ getImage()

String org.turro.elephant.entities.web.WebItem.getImage ( )

Definition at line 111 of file WebItem.java.

111  {
112  return image;
113  }

◆ getItemLabel()

String org.turro.elephant.entities.web.WebItem.getItemLabel ( )

Definition at line 195 of file WebItem.java.

195  {
196  return Phrases.start(caption).add(webTag, "()").add(type.toString()).toString();
197  }
Here is the caller graph for this function:

◆ getNexts()

Set<WebItem> org.turro.elephant.entities.web.WebItem.getNexts ( )

Definition at line 153 of file WebItem.java.

153  {
154  return nexts;
155  }
Here is the caller graph for this function:

◆ getOrdering()

int org.turro.elephant.entities.web.WebItem.getOrdering ( )

Definition at line 119 of file WebItem.java.

119  {
120  return ordering;
121  }
Here is the caller graph for this function:

◆ getPlainCompendium()

String org.turro.elephant.entities.web.WebItem.getPlainCompendium ( )

Definition at line 171 of file WebItem.java.

171  {
172  return summary == null ? "" : HtmlContent.plain(summary.getText(), 100);
173  }
Here is the call graph for this function:

◆ getSummary()

Wiki org.turro.elephant.entities.web.WebItem.getSummary ( )

Definition at line 127 of file WebItem.java.

127  {
128  if(summary == null) summary = new Wiki();
129  return summary;
130  }
Here is the caller graph for this function:

◆ getType()

WebItemType org.turro.elephant.entities.web.WebItem.getType ( )

Definition at line 95 of file WebItem.java.

95  {
96  return type;
97  }
Here is the caller graph for this function:

◆ getWebTag()

String org.turro.elephant.entities.web.WebItem.getWebTag ( )

Definition at line 87 of file WebItem.java.

87  {
88  return webTag;
89  }
Here is the caller graph for this function:

◆ hashCode()

int org.turro.elephant.entities.web.WebItem.hashCode ( )

Definition at line 213 of file WebItem.java.

213  {
214  int hash = 7;
215  hash = 71 * hash + Objects.hashCode(this.webTag);
216  return hash;
217  }

◆ isEmpty()

boolean org.turro.elephant.entities.web.WebItem.isEmpty ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 242 of file WebItem.java.

242  {
243  return Strings.isBlank(webTag) || Strings.isBlank(caption);
244  }

◆ isIcon()

boolean org.turro.elephant.entities.web.WebItem.isIcon ( )

Definition at line 183 of file WebItem.java.

183  {
184  return !Strings.isBlank(image) && !image.endsWith(".png");
185  }

◆ isValid()

boolean org.turro.elephant.entities.web.WebItem.isValid ( )

Definition at line 187 of file WebItem.java.

187  {
188  return webTag.matches("[A-Za-z0-9_-]+");
189  }
Here is the caller graph for this function:

◆ setCaption()

void org.turro.elephant.entities.web.WebItem.setCaption ( String  caption)

Definition at line 107 of file WebItem.java.

107  {
108  this.caption = caption;
109  }

◆ setDescription()

void org.turro.elephant.entities.web.WebItem.setDescription ( Wiki  description)

Definition at line 141 of file WebItem.java.

141  {
142  this.description = description;
143  }

◆ setExternals()

void org.turro.elephant.entities.web.WebItem.setExternals ( Set< String >  externals)

Definition at line 165 of file WebItem.java.

165  {
166  this.externals = externals;
167  }

◆ setGoals()

void org.turro.elephant.entities.web.WebItem.setGoals ( Set< WebGoal goals)

Definition at line 149 of file WebItem.java.

149  {
150  this.goals = goals;
151  }

◆ setImage()

void org.turro.elephant.entities.web.WebItem.setImage ( String  image)

Definition at line 115 of file WebItem.java.

115  {
116  this.image = image;
117  }

◆ setNexts()

void org.turro.elephant.entities.web.WebItem.setNexts ( Set< WebItem nexts)

Definition at line 157 of file WebItem.java.

157  {
158  this.nexts = nexts;
159  }

◆ setOrdering()

void org.turro.elephant.entities.web.WebItem.setOrdering ( int  ordering)

Definition at line 123 of file WebItem.java.

123  {
124  this.ordering = ordering;
125  }

◆ setSummary()

void org.turro.elephant.entities.web.WebItem.setSummary ( Wiki  summary)

Definition at line 132 of file WebItem.java.

132  {
133  this.summary = summary;
134  }

◆ setType()

void org.turro.elephant.entities.web.WebItem.setType ( WebItemType  type)

Definition at line 99 of file WebItem.java.

99  {
100  this.type = type;
101  }
Here is the caller graph for this function:

◆ setWebTag()

void org.turro.elephant.entities.web.WebItem.setWebTag ( String  webTag)

Definition at line 91 of file WebItem.java.

91  {
92  this.webTag = webTag;
93  }
Here is the caller graph for this function:

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