19 package org.turro.alliance.client;
21 import java.io.Writer;
22 import java.util.ArrayList;
23 import java.util.Collection;
24 import java.util.Optional;
25 import org.turro.alliance.db.entities.AxProjectGrant;
26 import org.turro.alliance.db.entities.ProcedenceId;
27 import org.turro.collections.CollectionHtmlIterator;
28 import org.turro.elephant.context.ElephantContext;
29 import org.turro.elephant.context.IConstructor;
30 import org.turro.elephant.db.ElephantPU;
31 import org.turro.elephant.impl.repository.Repository;
32 import org.turro.elephant.impl.repository.RepositoryFile;
33 import org.turro.elephant.web.SocialImageMap;
34 import org.turro.elephant.web.SocialNet;
35 import org.turro.entities.EmptyController;
36 import org.turro.entities.Entities;
37 import org.turro.entities.IElephantEntity;
38 import org.turro.file.util.FileAttach;
39 import org.turro.jpa.entity.EntityWebUrls;
40 import org.turro.jpa.search.DaoHtmlSearch;
41 import org.turro.marker.ElephantMarker;
42 import org.turro.marker.MarkerHelper;
43 import org.turro.string.Strings;
44 import org.turro.tags.TagCloud;
45 import org.turro.tags.TagSet;
46 import org.turro.tags.Tags;
80 prepareValues(e, page);
88 prepareValues(e, page);
105 private String getItemLink(
AxProjectGrant projectGrant,
int page) {
109 private String getPageLink(
int page) {
113 private void prepareValues(
final AxProjectGrant projectGrant,
int page) {
119 ArrayList<RepositoryFile> files =
new ArrayList<>();
120 String path = getItemLink(e, 0);
138 return "alliance/client/projectgrant";
149 marker.
put(
"itemLink", getItemLink(entity));
160 .map(cons -> cons.getCurrentContext())
161 .map(ctx -> ctx.getFullPath())
162 .filter(p -> !p.endsWith(
"/user"))
164 if(Strings.isBlank(path)) {
167 if(Strings.isBlank(path)) {
187 return "/user/alliance/projectgrants";
String renderSearchEngine()
ProcedenceId parseId(String value)
String getItemLink(AxProjectGrant project)
Collection< String > metas(AxProjectGrant e)
AxProjectGrant entity(ProcedenceId value)
void prepareControls(AxProjectGrant entity, int page)
void renderItem(ElephantMarker marker, AxProjectGrant e, int page)
String doItemLink(AxProjectGrant entity, ProcedenceId id, boolean obfuscated)
String title(AxProjectGrant e)
TagSet getEntityTags(Object entity)
String getRestrictedLink()
void renderSummary(ElephantMarker marker, AxProjectGrant e, int page)
ProjectGrantCollectionIterator(IConstructor constructor, Writer writer, boolean mail)
ProcedenceId getProjectGrantId()
static ProcedenceId from(String id)
String getSummaryTemplate()
static String getContextVariable(IConstructor constructor)
static String getEntityWebContext(String path)
static String getObjectPath(Object object)
Set< RepositoryFile > getRepositoryFiles(String pattern)
static boolean hasImage(String url)
List< String > getMetas()
static IElephantEntity getController(String path)
Repository getPublishableRepository(IConstructor constructor)
static String getUrlFromEntity(Object entity)
String render(IConstructor constructor)
void setIterator(IContentIterator iterator)
static DaoHtmlSearch getInstance(IConstructor constructor, String context)
void process(String rootTmpl, String tmpl)
boolean contains(Object key)
Object put(Object key, Object value)
static String setObfuscatedPars(String parameters)
ElContext getCurrentContext()