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

Public Member Functions

 ProjectGrantCollectionIterator (IConstructor constructor, Writer writer, boolean mail)
 
void init ()
 
String renderSearchEngine ()
 
TagSet getCloudTags ()
 
TagSet getEntityTags (Object entity)
 
- Public Member Functions inherited from org.turro.collections.CollectionHtmlIterator< E, ID >
 CollectionHtmlIterator (List collection, ElephantMarker marker)
 
 CollectionHtmlIterator (List collection, ElephantMarker marker, Writer writer)
 
void setSummaryTemplate (String summaryTemplate)
 
String getSummaryTemplate ()
 
void setFullTemplate (String fullTemplate)
 
String getFullTemplate ()
 
boolean isNavigatorTop ()
 
void setNavigatorTop (boolean navigatorTop)
 
boolean isNavigatorBottom ()
 
void setNavigatorBottom (boolean navigatorBottom)
 
boolean isSearchOption ()
 
void setSearchOption (boolean searchOption)
 
boolean isForceSummary ()
 
void setForceSummary (boolean forceSummary)
 
boolean wantItem ()
 
boolean isItem ()
 
Object addAttribute (String key, Object value)
 
Writer getWriter ()
 
void load ()
 
void forceItem (ID item)
 
String getTitle ()
 
Collection< String > getMetas ()
 
void render ()
 
boolean isFirst ()
 
boolean isLast ()
 
String renderTree ()
 
String renderTreeSelection ()
 
boolean isEmpty ()
 
- Public Member Functions inherited from org.turro.collections.CollectionIterator< E, ID >
 CollectionIterator (List< E > collection)
 
int getPage ()
 
void setPage (int page)
 
void initClauses ()
 
List< E > getItems ()
 
int getTotalCount ()
 
List< E > getTotalItems ()
 
int item ()
 
void current (int value)
 
int current ()
 
int pages ()
 
boolean beginning ()
 
boolean end ()
 
void next ()
 
void previous ()
 

Protected Member Functions

AxProjectGrant entity (ProcedenceId value)
 
void renderSummary (ElephantMarker marker, AxProjectGrant e, int page)
 
void renderItem (ElephantMarker marker, AxProjectGrant e, int page)
 
String title (AxProjectGrant e)
 
Collection< String > metas (AxProjectGrant e)
 
ProcedenceId parseId (String value)
 
String getTemplateRoot ()
 
void prepareControls (AxProjectGrant entity, int page)
 
String getItemLink (AxProjectGrant project)
 
String getReadAllLink ()
 
String doItemLink (AxProjectGrant entity, ProcedenceId id, boolean obfuscated)
 
String getRestrictedLink ()
 
- Protected Member Functions inherited from org.turro.collections.CollectionHtmlIterator< E, ID >
abstract E entity (ID value)
 
abstract void renderSummary (ElephantMarker marker, E e, int page)
 
abstract void renderItem (ElephantMarker marker, E e, int page)
 
abstract String title (E e)
 
abstract Collection< String > metas (E e)
 
ID getIdentifier ()
 
void onRenderItem (E e)
 
boolean isValid (E e)
 
String stringId (ID value)
 

Additional Inherited Members

- Static Public Attributes inherited from org.turro.action.content.IContentIterator
static String PRELOAD_TMPL = "#preload"
 
- Protected Attributes inherited from org.turro.collections.CollectionHtmlIterator< E, ID >
HTMLHelper html
 
IConstructor constructor
 
ElephantMarker marker
 
- Protected Attributes inherited from org.turro.collections.CollectionIterator< E, ID >
List< E > items
 
int _total = -1
 

Detailed Description

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

Definition at line 52 of file ProjectGrantCollectionIterator.java.

Constructor & Destructor Documentation

◆ ProjectGrantCollectionIterator()

org.turro.alliance.client.ProjectGrantCollectionIterator.ProjectGrantCollectionIterator ( IConstructor  constructor,
Writer  writer,
boolean  mail 
)

Definition at line 54 of file ProjectGrantCollectionIterator.java.

54  {
55  super(new ProjectGrantList(), new ElephantMarker(constructor, mail), writer);
56  init();
57  }
Here is the call graph for this function:

Member Function Documentation

◆ doItemLink()

String org.turro.alliance.client.ProjectGrantCollectionIterator.doItemLink ( AxProjectGrant  entity,
ProcedenceId  id,
boolean  obfuscated 
)
protected

Definition at line 173 of file ProjectGrantCollectionIterator.java.

173  {
174  String ewu = EntityWebUrls.getUrlFromEntity(entity);
175  if(ewu != null) {
176  return getReadAllLink() + ewu;
177  } else {
178  if(obfuscated) {
179  return getReadAllLink() + "?" + MarkerHelper.setObfuscatedPars("item=" + id.stringify());
180  } else {
181  return getReadAllLink() + "?item=" + id.stringify();
182  }
183  }
184  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ entity()

AxProjectGrant org.turro.alliance.client.ProjectGrantCollectionIterator.entity ( ProcedenceId  value)
protected

Definition at line 66 of file ProjectGrantCollectionIterator.java.

66  {
67  return ((ProjectGrantList) collection).getProjectGrant(value);
68  }

◆ getCloudTags()

TagSet org.turro.alliance.client.ProjectGrantCollectionIterator.getCloudTags ( )

Definition at line 97 of file ProjectGrantCollectionIterator.java.

97  {
98  return TagCloud.getTags(constructor, "axproject-grant");
99  }
Here is the call graph for this function:

◆ getEntityTags()

TagSet org.turro.alliance.client.ProjectGrantCollectionIterator.getEntityTags ( Object  entity)

Definition at line 101 of file ProjectGrantCollectionIterator.java.

101  {
102  return Tags.getTags(entity);
103  }
Here is the call graph for this function:

◆ getItemLink()

String org.turro.alliance.client.ProjectGrantCollectionIterator.getItemLink ( AxProjectGrant  project)
protected

Definition at line 154 of file ProjectGrantCollectionIterator.java.

154  {
155  return doItemLink(project, project.getProjectGrantId(), true);
156  }
String doItemLink(AxProjectGrant entity, ProcedenceId id, boolean obfuscated)
Here is the call graph for this function:

◆ getReadAllLink()

String org.turro.alliance.client.ProjectGrantCollectionIterator.getReadAllLink ( )
protected

Definition at line 158 of file ProjectGrantCollectionIterator.java.

158  {
159  String path = Optional.ofNullable(constructor)
160  .map(cons -> cons.getCurrentContext())
161  .map(ctx -> ctx.getFullPath())
162  .filter(p -> !p.endsWith("/user"))
163  .orElse(null);
164  if(Strings.isBlank(path)) {
165  path = ElephantContext.getEntityWebContext("/axproject-grant");
166  }
167  if(Strings.isBlank(path)) {
168  return getRestrictedLink();
169  }
170  return path;
171  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRestrictedLink()

String org.turro.alliance.client.ProjectGrantCollectionIterator.getRestrictedLink ( )
protected

Definition at line 186 of file ProjectGrantCollectionIterator.java.

186  {
187  return "/user/alliance/projectgrants";
188  }
Here is the caller graph for this function:

◆ getTemplateRoot()

String org.turro.alliance.client.ProjectGrantCollectionIterator.getTemplateRoot ( )
protected

Definition at line 137 of file ProjectGrantCollectionIterator.java.

137  {
138  return "alliance/client/projectgrant";
139  }
Here is the caller graph for this function:

◆ init()

void org.turro.alliance.client.ProjectGrantCollectionIterator.init ( )

Definition at line 59 of file ProjectGrantCollectionIterator.java.

59  {
60  DaoHtmlSearch dhs = DaoHtmlSearch.getInstance(constructor, ElephantContext.getContextVariable(constructor));
61  dhs.setIterator(this);
62  ((ProjectGrantList) collection).doFilter(dhs);
63  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ metas()

Collection<String> org.turro.alliance.client.ProjectGrantCollectionIterator.metas ( AxProjectGrant  e)
protected

Definition at line 118 of file ProjectGrantCollectionIterator.java.

118  {
119  ArrayList<RepositoryFile> files = new ArrayList<>();
120  String path = getItemLink(e, 0);
121  if(!SocialImageMap.hasImage(path)) {
122  FileAttach fa = new FileAttach(ElephantPU.getObjectPath(e));
123  Repository repository = fa.getPublishableRepository(constructor);
124  files.addAll(repository.getRepositoryFiles("*_social.png,*_social.jpg"));
125  files.addAll(repository.getRepositoryFiles("*.png,*.jpg"));
126  }
127  SocialNet sn = new SocialNet(path, e.getTitle(), e.getGoal(), files);
128  return sn.getMetas();
129  }
Here is the call graph for this function:

◆ parseId()

ProcedenceId org.turro.alliance.client.ProjectGrantCollectionIterator.parseId ( String  value)
protected

Reimplemented from org.turro.collections.CollectionHtmlIterator< E, ID >.

Definition at line 132 of file ProjectGrantCollectionIterator.java.

132  {
133  return ProcedenceId.from(value);
134  }
Here is the call graph for this function:

◆ prepareControls()

void org.turro.alliance.client.ProjectGrantCollectionIterator.prepareControls ( AxProjectGrant  entity,
int  page 
)
protected

Definition at line 141 of file ProjectGrantCollectionIterator.java.

141  {
142  marker.put("entiter", this);
143  if(!marker.contains("iee")) {
144  IElephantEntity iee = Entities.getController(entity);
145  if(!(iee instanceof EmptyController)) {
146  marker.put("iee", iee);
147  }
148  }
149  marker.put("itemLink", getItemLink(entity));
150  marker.put("allLink", getReadAllLink());
151  marker.put("restrictedLink", getRestrictedLink());
152  }
Object put(Object key, Object value)
Here is the call graph for this function:

◆ renderItem()

void org.turro.alliance.client.ProjectGrantCollectionIterator.renderItem ( ElephantMarker  marker,
AxProjectGrant  e,
int  page 
)
protected

Definition at line 86 of file ProjectGrantCollectionIterator.java.

Here is the call graph for this function:

◆ renderSearchEngine()

String org.turro.alliance.client.ProjectGrantCollectionIterator.renderSearchEngine ( )

Reimplemented from org.turro.collections.CollectionHtmlIterator< E, ID >.

Definition at line 71 of file ProjectGrantCollectionIterator.java.

71  {
72  DaoHtmlSearch dhs = DaoHtmlSearch.getInstance(constructor, ElephantContext.getContextVariable(constructor));
73  return dhs.render(constructor);
74  }
Here is the call graph for this function:

◆ renderSummary()

void org.turro.alliance.client.ProjectGrantCollectionIterator.renderSummary ( ElephantMarker  marker,
AxProjectGrant  e,
int  page 
)
protected

Definition at line 77 of file ProjectGrantCollectionIterator.java.

77  {
78  if(e != null) {
79  marker.put("projectGrant", e);
80  prepareValues(e, page);
81  }
83  }
Here is the call graph for this function:

◆ title()

String org.turro.alliance.client.ProjectGrantCollectionIterator.title ( AxProjectGrant  e)
protected

Definition at line 93 of file ProjectGrantCollectionIterator.java.

93  {
94  return e.getTitle();
95  }
Here is the call graph for this function:

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