18 package org.turro.elephant.impl.abstracts;
20 import java.io.IOException;
21 import java.util.ArrayList;
22 import java.util.Collection;
23 import java.util.Collections;
24 import java.util.Iterator;
25 import java.util.List;
26 import javax.servlet.ServletException;
27 import org.turro.string.Strings;
28 import org.jdom.Element;
29 import org.turro.elephant.context.IConstructor;
30 import org.turro.elephant.context.IElement;
31 import org.turro.elephant.impl.context.*;
32 import org.turro.elephant.impl.repository.Repository;
33 import org.turro.elephant.impl.repository.RepositoryFile;
34 import org.turro.elephant.layout.IManageable;
35 import org.turro.elephant.layout.IRenderable;
36 import org.turro.elephant.security.IDefendable;
37 import org.turro.elephant.web.ElContext;
38 import org.turro.elephant.web.SocialImageMap;
39 import org.turro.elephant.web.SocialNet;
40 import org.turro.i18n.I_;
51 protected Element
conf =
null, factory =
null;
54 protected Collection<String>
metas;
63 return (
this instanceof
DefaultElement) ? null : this.getClass().getSimpleName();
83 return metas ==
null ? Collections.EMPTY_LIST :
metas;
102 public void loadData() throws ServletException, IOException {
138 for(
int i = 0;
types !=
null && i <
types.length; i++) {
139 result +=
"<div class='" +
types[i] +
"'>";
147 for(
int i = 0;
types !=
null && i <
types.length; i++) {
231 ArrayList<RepositoryFile> files =
new ArrayList<>();
243 private void initTypes() {
246 types = type.split(
" *, *");
253 this.factory = factory;
257 List attribs =
conf.getChildren(
"attrib");
258 Iterator it = attribs.iterator();
260 while(it.hasNext()) {
261 tmp = (Element)it.next();
263 "attrib:" + tmp.getAttributeValue(
"name"),
264 tmp.getAttributeValue(
"value"),
abstract void startConstruction()
void setRootCategories(ElContext root)
AttributeSupport getAttributes()
String getElementFolder()
Collection< String > metas
Collection< String > getMetas()
void populateFromParent()
void setConfiguration(Element conf, Element factory)
void setTitle(String title)
void setMetas(Collection< String > metas)
boolean isOriginalContext()
void setConfiguration(IConstructor constructor, ElContext context)
AttributeSupport attrSupport
IConstructor getConstructor()
static final int STRING_ATTR
String getAttributeValue(String name, String defaultValue)
void addAttribute(AttributeItem attr)
Set< RepositoryFile > getRepositoryFiles(String pattern)
WebContext getWebContext()
Repository getRepository()
static boolean hasImage(String url)
List< String > getMetas()
static String get(String msg)
boolean isInRole(String role)