BrightSide Workbench Full Report + Source Code
org.turro.user.content.AbstractUserContent Class Referenceabstract
Inheritance diagram for org.turro.user.content.AbstractUserContent:
Collaboration diagram for org.turro.user.content.AbstractUserContent:

Public Member Functions

 AbstractUserContent (IContact contact)
 
String getId ()
 
IContact getContact ()
 
int getPriority ()
 
final void setPriority (int priority)
 
boolean isDirect ()
 
final void setDirect (boolean direct)
 
String getCaption ()
 
Set< String > getTags ()
 
String render (IConstructor constructor)
 
String getContent ()
 
void reset ()
 
int compareTo (IElephantUserContent o)
 

Protected Member Functions

final void setCaption (String caption)
 
final void addTag (String tag)
 
String getFullPath ()
 
abstract boolean showIfEmpty ()
 
abstract IContentIterator createIterator (IConstructor constructor)
 
Writer createWriter ()
 

Detailed Description

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

Definition at line 35 of file AbstractUserContent.java.

Constructor & Destructor Documentation

◆ AbstractUserContent()

org.turro.user.content.AbstractUserContent.AbstractUserContent ( IContact  contact)

Definition at line 46 of file AbstractUserContent.java.

46  {
47  this.contact = contact;
48  priority = 3;
49  }

Member Function Documentation

◆ addTag()

final void org.turro.user.content.AbstractUserContent.addTag ( String  tag)
protected

Definition at line 93 of file AbstractUserContent.java.

93  {
94  tags.add(tag);
95  }
Here is the caller graph for this function:

◆ compareTo()

int org.turro.user.content.AbstractUserContent.compareTo ( IElephantUserContent  o)

Definition at line 143 of file AbstractUserContent.java.

143  {
144  int result = CompareUtil.compare(getPriority(), o.getPriority());
145  if(result == 0) {
146  result = CompareUtil.compare(!isDirect(), !o.isDirect());
147  }
148  if(result == 0) {
149  result = CompareUtil.compare(getId(), o.getId());
150  }
151  return result;
152  }
Here is the call graph for this function:

◆ createIterator()

◆ createWriter()

Writer org.turro.user.content.AbstractUserContent.createWriter ( )
protected

Definition at line 136 of file AbstractUserContent.java.

136  {
137  return new StringWriter();
138  }
Here is the caller graph for this function:

◆ getCaption()

String org.turro.user.content.AbstractUserContent.getCaption ( )

Implements org.turro.user.content.IElephantUserContent.

Definition at line 80 of file AbstractUserContent.java.

80  {
81  return caption;
82  }

◆ getContact()

IContact org.turro.user.content.AbstractUserContent.getContact ( )

Implements org.turro.user.content.IElephantUserContent.

Definition at line 57 of file AbstractUserContent.java.

57  {
58  return contact;
59  }
Here is the caller graph for this function:

◆ getContent()

String org.turro.user.content.AbstractUserContent.getContent ( )

Implements org.turro.user.content.IElephantUserContent.

Definition at line 118 of file AbstractUserContent.java.

118  {
119  return parsedContent;
120  }

◆ getFullPath()

String org.turro.user.content.AbstractUserContent.getFullPath ( )
protected

Definition at line 126 of file AbstractUserContent.java.

126  {
127  // Uses ContentIterator path
128  return null;
129  }
Here is the caller graph for this function:

◆ getId()

String org.turro.user.content.AbstractUserContent.getId ( )

Implements org.turro.user.content.IElephantUserContent.

Definition at line 52 of file AbstractUserContent.java.

52  {
53  return this.getClass().getName();
54  }
Here is the caller graph for this function:

◆ getPriority()

int org.turro.user.content.AbstractUserContent.getPriority ( )

Implements org.turro.user.content.IElephantUserContent.

Definition at line 62 of file AbstractUserContent.java.

62  {
63  return priority;
64  }
Here is the caller graph for this function:

◆ getTags()

Set<String> org.turro.user.content.AbstractUserContent.getTags ( )

Implements org.turro.user.content.IElephantUserContent.

Definition at line 89 of file AbstractUserContent.java.

89  {
90  return tags;
91  }

◆ isDirect()

boolean org.turro.user.content.AbstractUserContent.isDirect ( )

Implements org.turro.user.content.IElephantUserContent.

Definition at line 71 of file AbstractUserContent.java.

71  {
72  return direct;
73  }
Here is the caller graph for this function:

◆ render()

String org.turro.user.content.AbstractUserContent.render ( IConstructor  constructor)

Implements org.turro.user.content.IElephantUserContent.

Definition at line 98 of file AbstractUserContent.java.

98  {
99  if(parsedContent == null) {
100  IContentIterator ci = createIterator(constructor);
101  if(!showIfEmpty() && ci.isEmpty()) {
102  parsedContent = "";
103  } else {
104  ci.addAttribute("ucId", getId());
105  ci.addAttribute("ucTags", tags);
106  ci.addAttribute("ucCaption", caption);
107  ci.addAttribute("ucPriority", priority);
108  ci.addAttribute("ucRelation", direct ? 0 : 1);
109  ci.load();
110  ci.render();
111  parsedContent = ci.getWriter().toString();
112  }
113  }
114  return parsedContent;
115  }
abstract IContentIterator createIterator(IConstructor constructor)
Here is the call graph for this function:

◆ reset()

void org.turro.user.content.AbstractUserContent.reset ( )

Definition at line 122 of file AbstractUserContent.java.

122  {
123  parsedContent = null;
124  }

◆ setCaption()

final void org.turro.user.content.AbstractUserContent.setCaption ( String  caption)
protected

Definition at line 84 of file AbstractUserContent.java.

84  {
85  this.caption = caption;
86  }
Here is the caller graph for this function:

◆ setDirect()

final void org.turro.user.content.AbstractUserContent.setDirect ( boolean  direct)

Definition at line 75 of file AbstractUserContent.java.

75  {
76  this.direct = direct;
77  }
Here is the caller graph for this function:

◆ setPriority()

final void org.turro.user.content.AbstractUserContent.setPriority ( int  priority)

Definition at line 66 of file AbstractUserContent.java.

66  {
67  this.priority = priority;
68  }
Here is the caller graph for this function:

◆ showIfEmpty()


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