BrightSide Workbench Full Report + Source Code
org.turro.elephant.web.ContextConstructor Class Reference

Public Member Functions

 ContextConstructor (IConstructor constructor, ElContext context)
 
void start () throws ServletException, IOException
 

Detailed Description

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

Definition at line 37 of file ContextConstructor.java.

Constructor & Destructor Documentation

◆ ContextConstructor()

org.turro.elephant.web.ContextConstructor.ContextConstructor ( IConstructor  constructor,
ElContext  context 
)

Definition at line 42 of file ContextConstructor.java.

42  {
43  this.constructor = constructor;
44  this.context = context;
45  }

Member Function Documentation

◆ start()

void org.turro.elephant.web.ContextConstructor.start ( ) throws ServletException, IOException

Definition at line 47 of file ContextConstructor.java.

47  {
48  final IElement iel = context.getWebContext().getElementInstance();
49 
50  if(iel == null) return;
51 
52  iel.setConfiguration(constructor, context);
53 
54  String template = context.getTemplate();
55  WebContext webContext = context.getWebContext();
56 
57  webContext.getPage().initiate(constructor);
58 
59  SessionTags.get(constructor).add(webContext);
60 
61  ElephantMarker em = new ElephantMarker(constructor);
62  if(webContext.isControlVersion() ||
63  constructor.isInRole("control-version:admin") ||
64  constructor.isWebAdministering()) {
65  em.put("fileVersion", new FileVersionWrapper(iel, 20, 3));
66  }
67  // Desactivat fins no tenir les plantilles carregades
68  if(webContext.isPrintVersion() && context.canPrint()) {
69  String printPath = ElephantContext.getRootWebPath() + "/print_" + context.getPath();
70  em.put("printPath", printPath);
71  }
72  Navigator navigator = new Navigator(context);
73  navigator.setDynamicLoad("dynamic".equals(ElephantContext.getContextLoad()));
74  em.put("nav", navigator);
75  em.put("traversal", webContext.isTraversalNavigation());
76  em.put("body", iel);
77  em.put("webmap", new WebMap(constructor));
78  iel.loadData();
79  iel.getMetas().forEach(meta -> constructor.addMeta(meta));
80  context.setTitle(iel.getTitle());
81  constructor.getOut();
82  em.process("layout", template);
83  }
void initiate(IConstructor constructor)
Definition: WebPage.java:97
void setConfiguration(IConstructor constructor, ElContext context)
Here is the call graph for this function:
Here is the caller graph for this function:

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