- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 61 of file ElContext.java.
◆ ElContext() [1/3]
org.turro.elephant.web.ElContext.ElContext |
( |
| ) |
|
Definition at line 77 of file ElContext.java.
78 this(
"",
null,
new File(ElephantContext.getRealPath(
"/")),
null);
◆ ElContext() [2/3]
org.turro.elephant.web.ElContext.ElContext |
( |
String |
path, |
|
|
File |
folder, |
|
|
ElContext |
parent |
|
) |
| |
|
protected |
◆ ElContext() [3/3]
org.turro.elephant.web.ElContext.ElContext |
( |
String |
path, |
|
|
String |
params, |
|
|
File |
folder, |
|
|
ElContext |
parent |
|
) |
| |
|
protected |
◆ canDisplay()
boolean org.turro.elephant.web.ElContext.canDisplay |
( |
| ) |
|
◆ canPrint()
boolean org.turro.elephant.web.ElContext.canPrint |
( |
| ) |
|
◆ canShowTo()
boolean org.turro.elephant.web.ElContext.canShowTo |
( |
IContact |
contact | ) |
|
◆ compareTo()
int org.turro.elephant.web.ElContext.compareTo |
( |
ElContext |
o | ) |
|
Definition at line 593 of file ElContext.java.
595 result = CompareUtil.compare(
level, o.level);
600 result = CompareUtil.compare(
getName(), o.getName());
603 result = CompareUtil.compare(
getId(), o.getId());
606 result = CompareUtil.compare(path, o.path);
◆ construct()
void org.turro.elephant.web.ElContext.construct |
( |
IConstructor |
constructor | ) |
throws ServletException, IOException |
Definition at line 355 of file ElContext.java.
356 new ContextConstructor(constructor,
this).start();
◆ equals()
boolean org.turro.elephant.web.ElContext.equals |
( |
Object |
obj | ) |
|
Definition at line 621 of file ElContext.java.
628 if (getClass() != obj.getClass()) {
632 if (!Objects.equals(
this.path, other.path)) {
◆ extractPath()
static String org.turro.elephant.web.ElContext.extractPath |
( |
String |
path | ) |
|
|
static |
Definition at line 574 of file ElContext.java.
578 int p = path.indexOf(
"?");
580 path = path.substring(0, p);
◆ generateCategoriesChildren()
void org.turro.elephant.web.ElContext.generateCategoriesChildren |
( |
Tree |
tree, |
|
|
Function< Item, String > |
onParam |
|
) |
| |
Definition at line 491 of file ElContext.java.
492 for(Item item : (List<Item>) tree.getItems()) {
493 addCategoriesChildren(
getPath(), item, onParam);
◆ getAncestors()
TreeSet<ElContext> org.turro.elephant.web.ElContext.getAncestors |
( |
| ) |
|
Definition at line 235 of file ElContext.java.
236 TreeSet<ElContext> ancestors =
new TreeSet<>();
◆ getChildren()
TreeSet<ElContext> org.turro.elephant.web.ElContext.getChildren |
( |
| ) |
|
◆ getContext()
IContext org.turro.elephant.web.ElContext.getContext |
( |
| ) |
|
Definition at line 280 of file ElContext.java.
281 return ContextFactory.getContext(Application.getApplication().getConstructor(), path);
◆ getDefaultLocales()
Set<String> org.turro.elephant.web.ElContext.getDefaultLocales |
( |
| ) |
|
Definition at line 318 of file ElContext.java.
321 while(ctx !=
null && ctx.webContext.getLangs().isEmpty()) {
Set< String > defaultLocales
◆ getElement()
IElement org.turro.elephant.web.ElContext.getElement |
( |
| ) |
|
Definition at line 447 of file ElContext.java.
IElement getElementInstance()
void setConfiguration(IConstructor constructor, ElContext context)
◆ getFile()
File org.turro.elephant.web.ElContext.getFile |
( |
| ) |
|
◆ getFullPath()
String org.turro.elephant.web.ElContext.getFullPath |
( |
| ) |
|
Definition at line 101 of file ElContext.java.
102 String tmp = ElephantContext.getRootWebPath() + path;
103 return (Strings.isBlank(tmp) ?
"/" : tmp + (Strings.isBlank(params) ?
"" : params));
◆ getId()
String org.turro.elephant.web.ElContext.getId |
( |
| ) |
|
◆ getLevel()
int org.turro.elephant.web.ElContext.getLevel |
( |
| ) |
|
Definition at line 126 of file ElContext.java.
127 return path ==
null ? 0 : path.split(
"\\/").length - 1;
◆ getName()
String org.turro.elephant.web.ElContext.getName |
( |
| ) |
|
◆ getNext()
ElContext org.turro.elephant.web.ElContext.getNext |
( |
boolean |
doChildren | ) |
|
Definition at line 265 of file ElContext.java.
268 if(!
set.isEmpty())
return set.first();
271 boolean found =
false;
273 if(found && sibling.canDisplay())
return sibling;
274 if(sibling.equals(
this)) found =
true;
TreeSet< ElContext > getVisibleSiblings()
ElContext getNext(boolean doChildren)
TreeSet< ElContext > getVisibleChildren()
◆ getParent()
ElContext org.turro.elephant.web.ElContext.getParent |
( |
| ) |
|
◆ getPath()
String org.turro.elephant.web.ElContext.getPath |
( |
| ) |
|
◆ getPrevious()
ElContext org.turro.elephant.web.ElContext.getPrevious |
( |
| ) |
|
Definition at line 245 of file ElContext.java.
247 boolean found =
false;
249 if(found && sibling.canDisplay())
return getLastChildren(sibling);
250 if(sibling.equals(
this)) found =
true;
◆ getRepository()
Repository org.turro.elephant.web.ElContext.getRepository |
( |
| ) |
|
Definition at line 288 of file ElContext.java.
289 return new Repository(Application.getApplication().getConstructor(), WebContext.repository(Path.of(path)).toString());
◆ getRepositoryPath()
String org.turro.elephant.web.ElContext.getRepositoryPath |
( |
| ) |
|
Definition at line 284 of file ElContext.java.
285 return WebContext.repository(Path.of(path)).toString();
◆ getResources()
WebResources org.turro.elephant.web.ElContext.getResources |
( |
| ) |
|
◆ getSiblings()
TreeSet<ElContext> org.turro.elephant.web.ElContext.getSiblings |
( |
| ) |
|
Definition at line 217 of file ElContext.java.
219 TreeSet<ElContext>
set =
new TreeSet<>();
TreeSet< ElContext > getChildren()
◆ getSocialImage()
SocialImage org.turro.elephant.web.ElContext.getSocialImage |
( |
| ) |
|
◆ getStaticChildren()
TreeSet<ElContext> org.turro.elephant.web.ElContext.getStaticChildren |
( |
| ) |
|
Definition at line 201 of file ElContext.java.
202 TreeSet<ElContext> statics =
new TreeSet<>();
204 if(!ctx.getWebContext().isDynamic()) statics.add(ctx);
◆ getTarget()
String org.turro.elephant.web.ElContext.getTarget |
( |
| ) |
|
◆ getTemplate()
String org.turro.elephant.web.ElContext.getTemplate |
( |
| ) |
|
◆ getTemplateRoot()
String org.turro.elephant.web.ElContext.getTemplateRoot |
( |
| ) |
|
◆ getTitle()
String org.turro.elephant.web.ElContext.getTitle |
( |
| ) |
|
◆ getVerbosePath() [1/2]
String org.turro.elephant.web.ElContext.getVerbosePath |
( |
| ) |
|
◆ getVerbosePath() [2/2]
String org.turro.elephant.web.ElContext.getVerbosePath |
( |
ElContext |
root | ) |
|
Definition at line 138 of file ElContext.java.
141 while(ctx !=
null && !ctx.equals(root)) {
142 result = ctx.
getName() +
" " + result;
◆ getVisibleChildren()
TreeSet<ElContext> org.turro.elephant.web.ElContext.getVisibleChildren |
( |
| ) |
|
Definition at line 209 of file ElContext.java.
210 TreeSet<ElContext> visible =
new TreeSet<>();
212 if(ctx.canDisplay()) visible.add(ctx);
◆ getVisibleSiblings()
TreeSet<ElContext> org.turro.elephant.web.ElContext.getVisibleSiblings |
( |
| ) |
|
Definition at line 227 of file ElContext.java.
228 TreeSet<ElContext> visible =
new TreeSet<>();
230 if(ctx.canDisplay()) visible.add(ctx);
TreeSet< ElContext > getSiblings()
◆ getWebContext()
WebContext org.turro.elephant.web.ElContext.getWebContext |
( |
| ) |
|
◆ getWebPath()
String org.turro.elephant.web.ElContext.getWebPath |
( |
| ) |
|
◆ hashCode()
int org.turro.elephant.web.ElContext.hashCode |
( |
| ) |
|
Definition at line 614 of file ElContext.java.
616 hash = 89 * hash + Objects.hashCode(this.path);
◆ hasRestrictions()
boolean org.turro.elephant.web.ElContext.hasRestrictions |
( |
| ) |
|
◆ init()
final void org.turro.elephant.web.ElContext.init |
( |
| ) |
|
|
protected |
Definition at line 296 of file ElContext.java.
298 level = path ==
null ? 0 : path.split(
"\\/").length - 1;
299 ElContextMap.addContext(
this);
302 if(
folder.isDirectory()) {
303 File[] subfolders =
folder.listFiles();
304 for(File subfolder: subfolders) {
305 if(subfolder.isDirectory() && !subfolder.isHidden()) {
307 if(Files.exists(path +
"/" + subfolder.getName() + CONTEXT_FILE) ||
308 WebContext.existsConf(Path.of(path))) {
static boolean isInternal(File file)
◆ inPath()
boolean org.turro.elephant.web.ElContext.inPath |
( |
ElContext |
context | ) |
|
◆ isFollowable()
boolean org.turro.elephant.web.ElContext.isFollowable |
( |
| ) |
|
◆ isIndexable()
boolean org.turro.elephant.web.ElContext.isIndexable |
( |
| ) |
|
◆ isInRole()
boolean org.turro.elephant.web.ElContext.isInRole |
( |
| ) |
|
◆ isInternal()
static boolean org.turro.elephant.web.ElContext.isInternal |
( |
File |
file | ) |
|
|
static |
Definition at line 333 of file ElContext.java.
334 if(file ==
null)
return true;
335 String fileName = file.isFile() ? file.getName() : file.getAbsolutePath();
336 String internals = ElephantContext.getSiteInternalFiles();
337 if(internals !=
null) {
338 String tmp[] = internals.split(
",");
339 for(String s : tmp) {
340 if(fileName.matches(Strings.convertToRegEx(s)))
return true;
343 return (fileName.matches(
"google.*\\.html")) ||
344 (fileName.matches(
"site.*\\.xml")) ||
345 (fileName.matches(
"robots\\.txt")) ||
346 (fileName.contains(
"_internal")) ||
347 (fileName.contains(
"_zul")) ||
348 (fileName.contains(
"resources")) ||
349 (fileName.contains(
"WEB-INF")) ||
350 (fileName.contains(
"META-INF"));
◆ isPublic()
boolean org.turro.elephant.web.ElContext.isPublic |
( |
| ) |
|
◆ isSelectable()
boolean org.turro.elephant.web.ElContext.isSelectable |
( |
| ) |
|
◆ resetDefaultLocales()
void org.turro.elephant.web.ElContext.resetDefaultLocales |
( |
| ) |
|
◆ search()
FoundList org.turro.elephant.web.ElContext.search |
( |
String |
value, |
|
|
boolean |
ignoreCase |
|
) |
| |
Definition at line 554 of file ElContext.java.
555 FoundList fl =
new FoundList();
556 SearchFormatter sf =
new SearchFormatter(value, ignoreCase);
562 "<img src='" + ElephantContext.getRootResourcePath() +
"/_internal/system/images/context.gif'/>",
565 (
double)sf.getFound(),
◆ setTitle()
void org.turro.elephant.web.ElContext.setTitle |
( |
String |
title | ) |
|
◆ children
TreeSet<ElContext> org.turro.elephant.web.ElContext.children |
|
protected |
◆ CONTEXT_FOLDER
final String org.turro.elephant.web.ElContext.CONTEXT_FOLDER = "/_internal" |
|
static |
◆ defaultLocales
Set<String> org.turro.elephant.web.ElContext.defaultLocales |
|
protected |
◆ folder
File org.turro.elephant.web.ElContext.folder |
|
protected |
◆ level
int org.turro.elephant.web.ElContext.level |
|
protected |
◆ parent
ElContext org.turro.elephant.web.ElContext.parent |
|
protected |
◆ title
String org.turro.elephant.web.ElContext.title |
|
protected |
◆ webContext
WebContext org.turro.elephant.web.ElContext.webContext |
|
protected |
The documentation for this class was generated from the following file: