BrightSide Workbench Full Report + Source Code
org.turro.alliance.www.CategoriesTree Class Reference
Inheritance diagram for org.turro.alliance.www.CategoriesTree:
Collaboration diagram for org.turro.alliance.www.CategoriesTree:

Public Member Functions

 CategoriesTree (IConstructor constructor, String context, IContact contact)
 
String getImageSrc (Item item)
 
String getFolderImageSrc ()
 
String getCssClass (Item item)
 
- Public Member Functions inherited from org.turro.jpa.content.TreeDaoContentIterator< E, ID >
 TreeDaoContentIterator (Dao dao, ElephantMarker marker, String contextPath, IContact contact)
 
boolean isRestricted ()
 
void setRestricted (boolean restricted)
 
boolean isAllowInterest ()
 
void setAllowInterest (boolean allowInterest)
 
boolean isAllowComments ()
 
void setAllowComments (boolean allowComments)
 
boolean isAllowVotes ()
 
void setAllowVotes (boolean allowVotes)
 
boolean isAllowDescriptions ()
 
void setAllowDescriptions (boolean allowDescriptions)
 
boolean isAllowAttachments ()
 
void setAllowAttachments (boolean allowAttachments)
 
boolean isAllowFiles ()
 
void setAllowFiles (boolean allowFiles)
 
boolean isAllowPolls ()
 
void setAllowPolls (boolean allowPolls)
 
boolean isAllowForum ()
 
void setAllowForum (boolean allowForum)
 
String getContextPath ()
 
IContact getContact ()
 
String getCssClass (String path)
 
String getSelectedItem ()
 
void renderSelected ()
 
String parseSelected ()
 
Object getVotesCtrl (E e)
 
Object getInterestCtrl (E e)
 
Object getCommentsCtrl (E e)
 
Object getAttachmentsCtrl (E e)
 
Object getFilesCtrl (E e)
 
Object getDescriptionsCtrl (E e)
 
Object getPollsCtrl (E e)
 
Object getForumCtrl (E e)
 
- Public Member Functions inherited from org.turro.jpa.iterator.DaoHtmlTree< E, ID >
 DaoHtmlTree (Dao dao, ElephantMarker marker)
 
String getTreeTemplate ()
 
void setTreeTemplate (String treeTemplate)
 
String getFullTemplate ()
 
void setFullTemplate (String fullTemplate)
 
void render ()
 
String parse ()
 
VisualElements getVisuals ()
 
- Public Member Functions inherited from org.turro.jpa.iterator.DaoTree< E, ID >
 DaoTree (Dao dao)
 
Dao getDao ()
 
void fillTree (String path)
 
void fillRoot (Item item)
 

Protected Member Functions

WhereClause getItemClause (String currPath)
 
Object getEntity (Object value)
 
WhereClause getChildrenClause (String currPath)
 
WhereClause getLeafClause (String currPath)
 
Object getId (Object item)
 
Object getParentId (Object item)
 
void prepareTree (ElephantMarker marker, List< Item< Object, Object >> items)
 
void prepareItem (ElephantMarker marker, Object item)
 
String getTemplateRoot ()
 
Object doVotesCtrl (Object e)
 
Object doInterestCtrl (Object e)
 
Object doCommentsCtrl (Object e)
 
Object doAttachmentsCtrl (Object e)
 
Object doFilesCtrl (Object e)
 
Object doDescriptionsCtrl (Object e)
 
Object doPollsCtrl (Object e)
 
VisualElements loadVisuals ()
 
- Protected Member Functions inherited from org.turro.jpa.content.TreeDaoContentIterator< E, ID >
void setSelectedItem (String value)
 
abstract void prepareTree (ElephantMarker marker, List< Item< E, ID >> items)
 
abstract void prepareItem (ElephantMarker marker, E item)
 
abstract Object doVotesCtrl (E e)
 
abstract Object doInterestCtrl (E e)
 
abstract Object doCommentsCtrl (E e)
 
abstract Object doAttachmentsCtrl (E e)
 
abstract Object doFilesCtrl (E e)
 
abstract Object doDescriptionsCtrl (E e)
 
abstract Object doPollsCtrl (E e)
 
void renderTree (ElephantMarker marker, List< Item< E, ID >> items)
 
void renderItem (ElephantMarker marker, E item)
 
String parseTree (ElephantMarker marker, List< Item< E, ID >> items)
 
String parseItem (ElephantMarker marker, E item)
 

Additional Inherited Members

- Static Public Member Functions inherited from org.turro.jpa.content.TreeDaoContentIterator< E, ID >
static String getSelectionLink (String path)
 
static String getSelectedItem (IConstructor constructor, String pathOrigin)
 
- Protected Attributes inherited from org.turro.jpa.iterator.DaoHtmlTree< E, ID >
IConstructor constructor
 
ElephantMarker marker
 
- Protected Attributes inherited from org.turro.jpa.iterator.DaoTree< E, ID >
Dao dao
 

Detailed Description

Constructor & Destructor Documentation

◆ CategoriesTree()

org.turro.alliance.www.CategoriesTree.CategoriesTree ( IConstructor  constructor,
String  context,
IContact  contact 
)

Definition at line 42 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

42  {
43  super(new AlliancePU(), new ElephantMarker(constructor), context, contact);
44  }

Member Function Documentation

◆ doAttachmentsCtrl()

Object org.turro.alliance.www.CategoriesTree.doAttachmentsCtrl ( Object  e)
protected

Definition at line 154 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

154  {
155  return null;
156  }

◆ doCommentsCtrl()

Object org.turro.alliance.www.CategoriesTree.doCommentsCtrl ( Object  e)
protected

Definition at line 149 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

149  {
150  return null;
151  }

◆ doDescriptionsCtrl()

Object org.turro.alliance.www.CategoriesTree.doDescriptionsCtrl ( Object  e)
protected

Definition at line 164 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

164  {
165  return null;
166  }

◆ doFilesCtrl()

Object org.turro.alliance.www.CategoriesTree.doFilesCtrl ( Object  e)
protected

Definition at line 159 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

159  {
160  return null;
161  }

◆ doInterestCtrl()

Object org.turro.alliance.www.CategoriesTree.doInterestCtrl ( Object  e)
protected

Definition at line 144 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

144  {
145  return null;
146  }

◆ doPollsCtrl()

Object org.turro.alliance.www.CategoriesTree.doPollsCtrl ( Object  e)
protected

Definition at line 169 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

169  {
170  return null;
171  }

◆ doVotesCtrl()

Object org.turro.alliance.www.CategoriesTree.doVotesCtrl ( Object  e)
protected

Definition at line 139 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

139  {
140  return null;
141  }

◆ getChildrenClause()

WhereClause org.turro.alliance.www.CategoriesTree.getChildrenClause ( String  currPath)
protected

Reimplemented from org.turro.jpa.iterator.DaoTree< E, ID >.

Definition at line 66 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

66  {
67  WhereClause wc = new WhereClause();
68  wc.addClause("select g from AxCategory g");
69  wc.addClause("where 1=1");
70  if(Strings.isBlank(currPath)) {
71  wc.addClause("and g.parent is null");
72  } else {
73  wc.addClause("and g.parent.uniquePath = :pathName");
74  wc.addNamedValue("pathName", currPath);
75  }
76  wc.addClause("order by g.name");
77  return wc;
78  }
Here is the call graph for this function:

◆ getCssClass()

String org.turro.alliance.www.CategoriesTree.getCssClass ( Item  item)

Definition at line 103 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

103  {
104  AxCategory cat = (AxCategory) item.getValue();
105  String selected = getSelectedItem();
106  String path = cat.getUniquePath();
107  if(path == null || selected == null) {
108  return "";
109  } else if(path.equals(selected)) {
110  return "active";
111  } else if(selected.startsWith(path)) {
112  return "inpath";
113  } else {
114  return "";
115  }
116  }
Here is the call graph for this function:

◆ getEntity()

Object org.turro.alliance.www.CategoriesTree.getEntity ( Object  value)
protected

Definition at line 61 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

61  {
62  return value instanceof String ? getDao().find(AxCategory.class, Long.valueOf((String) value)) : value;
63  }
Here is the call graph for this function:

◆ getFolderImageSrc()

String org.turro.alliance.www.CategoriesTree.getFolderImageSrc ( )

Definition at line 99 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

99  {
100  return ElephantContext.getRootWebPath() + Images.getImage("group");
101  }
Here is the call graph for this function:

◆ getId()

Object org.turro.alliance.www.CategoriesTree.getId ( Object  item)
protected

Definition at line 86 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

86  {
87  return item instanceof AxCategory ? ((AxCategory) item).getCategoryId() : new Path((String) item).getLastNode();
88  }
Here is the call graph for this function:

◆ getImageSrc()

String org.turro.alliance.www.CategoriesTree.getImageSrc ( Item  item)

Definition at line 95 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

95  {
96  return ElephantContext.getRootWebPath() + Images.getImage("group");
97  }
Here is the call graph for this function:

◆ getItemClause()

WhereClause org.turro.alliance.www.CategoriesTree.getItemClause ( String  currPath)
protected

Reimplemented from org.turro.jpa.content.TreeDaoContentIterator< E, ID >.

Definition at line 47 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

47  {
48  WhereClause wc = new WhereClause();
49  wc.addClause("select g from AxCategory g");
50  wc.addClause("where 1=1");
51  if(Strings.isBlank(currPath)) {
52  wc.addClause("and 1=2");
53  } else {
54  wc.addClause("and g.uniquePath = :pathName");
55  wc.addNamedValue("pathName", currPath);
56  }
57  return wc;
58  }
Here is the call graph for this function:

◆ getLeafClause()

WhereClause org.turro.alliance.www.CategoriesTree.getLeafClause ( String  currPath)
protected

Reimplemented from org.turro.jpa.iterator.DaoTree< E, ID >.

Definition at line 81 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

81  {
82  return null;
83  }

◆ getParentId()

Object org.turro.alliance.www.CategoriesTree.getParentId ( Object  item)
protected

Definition at line 91 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

91  {
92  return item instanceof AxCategory ? ((AxCategory) item).getParent().getCategoryId() : new Path((String) item).getLastNode();
93  }
Here is the call graph for this function:

◆ getTemplateRoot()

String org.turro.alliance.www.CategoriesTree.getTemplateRoot ( )
protected

Reimplemented from org.turro.jpa.content.TreeDaoContentIterator< E, ID >.

Definition at line 134 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

134  {
135  return "alliance/category";
136  }

◆ loadVisuals()

VisualElements org.turro.alliance.www.CategoriesTree.loadVisuals ( )
protected

Reimplemented from org.turro.jpa.iterator.DaoHtmlTree< E, ID >.

Definition at line 174 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

174  {
175  return null;
176  }

◆ prepareItem()

void org.turro.alliance.www.CategoriesTree.prepareItem ( ElephantMarker  marker,
Object  item 
)
protected

Definition at line 129 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

129  {
130  // do nothing
131  }

◆ prepareTree()

void org.turro.alliance.www.CategoriesTree.prepareTree ( ElephantMarker  marker,
List< Item< Object, Object >>  items 
)
protected

Definition at line 119 of file Elephant/elephant-alliance/src/main/java/org/turro/alliance/www/CategoriesTree.java.

119  {
120  String selPath = getSelectedItem();
121  if(Strings.isBlank(selPath) && !items.isEmpty()) {
122  selPath = ((AxCategory) ((Item) items.iterator().next()).getValue()).getUniquePath();
123  setSelectedItem(selPath);
124  }
125  marker.put("selpath", selPath);
126  }
Object put(Object key, Object value)
Here is the call graph for this function:

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