BrightSide Workbench Full Report + Source Code
org.turro.elephant.context.ElephantApplication Class Reference
Inheritance diagram for org.turro.elephant.context.ElephantApplication:
Collaboration diagram for org.turro.elephant.context.ElephantApplication:

Public Member Functions

 ElephantApplication (HttpServletRequest request, HttpServletResponse response)
 
HttpServletRequest getHttpServletRequest ()
 
HttpServletResponse getHttpServletResponse ()
 
void sendRedirect (String uri)
 
void navigateBack ()
 
- Public Member Functions inherited from org.turro.elephant.context.Application
 Application ()
 
ApplicationContext getContext ()
 
boolean hasAnyRoleKey (String role)
 
boolean isInRole (String role)
 
boolean isInRole (String role, String redirect) throws IOException
 
IContact checkUser (boolean doLogin) throws IOException
 
Object getPreference (String key)
 
void putPreference (String key, Object value)
 
IConstructor getConstructor ()
 
void invalidateSession ()
 
HttpSession getHttpSession (boolean create)
 
IImplementation getImplementation (String name)
 
List getImplementationNamesByType (String type)
 
String getServerBase ()
 
String getServerUrl ()
 

Static Public Member Functions

static Application getCurrent (HttpServletRequest request, HttpServletResponse response)
 
static Application getCurrent (IConstructor constructor)
 
- Static Public Member Functions inherited from org.turro.elephant.context.Application
static Application getApplication ()
 
static Application getFromConstructor (IConstructor constructor)
 
static boolean loadResources (String path)
 
static void resetSettings ()
 
static void resetSchemes ()
 
static IContact getUser ()
 
static Cookie getCookie (String name)
 
static String getCookieValue (String name)
 
static void setCookie (String name, String value, String path, int age)
 
static void encryptCookie (String name, String value, String path, int age)
 
static String decryptCookieValue (String name)
 
static void deleteCookie (String name, String path)
 
static Locale getUsedLocale ()
 
static Map getStringMap ()
 
static Map getStringMap (Locale locale, String configured)
 
static String getString (String key)
 
static String getString (String key, String locale)
 
static String getString (String key, Locale locale)
 
static List< String > getAllLocales (String key)
 
static ResourceBundle getBundle (String bundle, Locale locale, String configured)
 
static HttpServletRequest getResolverRequest ()
 
static HttpServletResponse getResolverResponse ()
 
static HttpSession getResolverSession (boolean create)
 

Protected Member Functions

IConstructor doConstructor ()
 

Additional Inherited Members

- Static Public Attributes inherited from org.turro.elephant.context.Application
static final String[] BUNDLES
 
static final String REGEXP_NO_RESOURCES = "(\\/zkau.*|\\/app.*)"
 
- Protected Attributes inherited from org.turro.elephant.context.Application
UserPreferences preferences
 
HttpServletRequest request
 
HttpServletResponse response
 
- Static Protected Attributes inherited from org.turro.elephant.context.Application
static ThreadLocal< Applicationapp = new ThreadLocal<>()
 

Detailed Description

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

Definition at line 30 of file ElephantApplication.java.

Constructor & Destructor Documentation

◆ ElephantApplication()

org.turro.elephant.context.ElephantApplication.ElephantApplication ( HttpServletRequest  request,
HttpServletResponse  response 
)

Definition at line 48 of file ElephantApplication.java.

48  {
49  super();
50  this.request = request;
51  this.response = response;
52  request.setAttribute("el_app", this);
53  }

Member Function Documentation

◆ doConstructor()

IConstructor org.turro.elephant.context.ElephantApplication.doConstructor ( )
protected

Reimplemented from org.turro.elephant.context.Application.

Definition at line 56 of file ElephantApplication.java.

56  {
57  IConstructor constructor = ElephantContext.getConstructor(
60  constructor.setRequestAttribute("el_cons", constructor);
61  return constructor;
62  }
Here is the call graph for this function:

◆ getCurrent() [1/2]

static Application org.turro.elephant.context.ElephantApplication.getCurrent ( HttpServletRequest  request,
HttpServletResponse  response 
)
static

Definition at line 32 of file ElephantApplication.java.

32  {
33  Application application = (Application) request.getAttribute("el_app");
34  if(application == null) {
35  application = new ElephantApplication(request, response);
36  request.setAttribute("el_app", application);
37  }
38  app.set(application);
39  return application;
40  }
static ThreadLocal< Application > app
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCurrent() [2/2]

static Application org.turro.elephant.context.ElephantApplication.getCurrent ( IConstructor  constructor)
static

Definition at line 42 of file ElephantApplication.java.

42  {
43  return getCurrent(constructor.getRequest(), constructor.getResponse());
44  }
static Application getCurrent(HttpServletRequest request, HttpServletResponse response)
Here is the call graph for this function:

◆ getHttpServletRequest()

HttpServletRequest org.turro.elephant.context.ElephantApplication.getHttpServletRequest ( )

Reimplemented from org.turro.elephant.context.Application.

Definition at line 65 of file ElephantApplication.java.

65  {
66  return request;
67  }
Here is the caller graph for this function:

◆ getHttpServletResponse()

HttpServletResponse org.turro.elephant.context.ElephantApplication.getHttpServletResponse ( )

Reimplemented from org.turro.elephant.context.Application.

Definition at line 70 of file ElephantApplication.java.

70  {
71  return response;
72  }
Here is the caller graph for this function:

◆ navigateBack()

void org.turro.elephant.context.ElephantApplication.navigateBack ( )

Reimplemented from org.turro.elephant.context.Application.

Definition at line 91 of file ElephantApplication.java.

91  {
92  try {
94  } catch (IOException ex) {
95  Logger.getLogger(ElephantApplication.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
96  }
97  }
Here is the call graph for this function:

◆ sendRedirect()

void org.turro.elephant.context.ElephantApplication.sendRedirect ( String  uri)

Reimplemented from org.turro.elephant.context.Application.

Definition at line 82 of file ElephantApplication.java.

82  {
83  try {
84  getConstructor().redirect(uri);
85  } catch (IOException ex) {
86  Logger.getLogger(ElephantApplication.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
87  }
88  }
Here is the call graph for this function:

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