|
Collection< Sitemaps.SitemapLink > | getLinks () |
|
◆ getLinks()
Collection<Sitemaps.SitemapLink> org.turro.publication.util.PublicationSitemap.getLinks |
( |
| ) |
|
Implements org.turro.elephant.sitemap.IElephantSitemap.
Definition at line 47 of file PublicationSitemap.java.
48 ArrayList<Sitemaps.SitemapLink> list =
new ArrayList<>();
49 String path = ElephantContext.getEntityWebContext(
"/publication");
50 if(!Strings.isBlank(path)) {
52 WhereClause wc =
new WhereClause();
53 wc.addClause(
"select p.id from Publication as p");
54 wc.addClause(
"where p.publicationGroup.publishable = TRUE");
55 wc.addClause(
"and p.publicationCategory.publishable = TRUE");
56 Dao dao =
new PublicationPU();
57 for(Long pubId : (List<Long>) dao.getResultList(wc)) {
58 Publication pub = dao.find(Publication.class, pubId);
59 String ewu = EntityWebUrls.getUrlFromEntity(pub);
60 if(!Strings.isBlank(ewu)) {
61 Sitemaps.SitemapLink sml =
new Sitemaps.SitemapLink(
62 ElephantContext.getRootWebPath() + path + ewu);
63 FileAttach fa =
new FileAttach(PublicationPU.getObjectPath(pub));
64 Repository repository = fa.getPublishableRepository(Application.getApplication().getConstructor());
65 for(RepositoryFile rf : repository.getRepositoryFiles(
"/topmost",
"*.jpg,*.png")) {
66 sml.addImage(rf.getWebPath());
68 for(RepositoryFile rf : repository.getRepositoryFiles(
"/priorized",
"*.jpg,*.png")) {
69 sml.addImage(rf.getWebPath());
71 for(RepositoryFile rf : repository.getRepositoryFiles(
"/included",
"*.jpg,*.png")) {
72 sml.addImage(rf.getWebPath());
The documentation for this class was generated from the following file: