◆ ElephantContext()
org.turro.elephant.context.ElephantContext.ElephantContext |
( |
| ) |
|
◆ contextDestroyed()
void org.turro.elephant.context.ElephantContext.contextDestroyed |
( |
ServletContextEvent |
event | ) |
|
◆ contextInitialized()
void org.turro.elephant.context.ElephantContext.contextInitialized |
( |
ServletContextEvent |
event | ) |
|
Definition at line 76 of file ElephantContext.java.
77 _context =
event.getServletContext();
78 loadSiteConfiguration();
79 Configurator.init(
ElephantContext.getRealPath(
"/WEB-INF/elephant/conf/configurator/context.json"));
◆ createConstructor()
static IConstructor org.turro.elephant.context.ElephantContext.createConstructor |
( |
| ) |
|
|
static |
◆ decrypt() [1/2]
static byte [] org.turro.elephant.context.ElephantContext.decrypt |
( |
byte[] |
value | ) |
|
|
static |
Definition at line 269 of file ElephantContext.java.
270 return (value !=
null && ((value.length % 8) == 0)) ?
271 Cipher.symetricDecrypt(value) :
null;
◆ decrypt() [2/2]
static String org.turro.elephant.context.ElephantContext.decrypt |
( |
String |
value | ) |
|
|
static |
Definition at line 279 of file ElephantContext.java.
280 if(!Strings.isBlank(value)) {
281 byte[] bytes =
decrypt(
new Base64().decode(value.getBytes()));
282 return bytes !=
null ?
new String(bytes) :
"";
static byte[] decrypt(byte[] value)
◆ encrypt() [1/2]
static byte [] org.turro.elephant.context.ElephantContext.encrypt |
( |
byte[] |
value | ) |
|
|
static |
◆ encrypt() [2/2]
static String org.turro.elephant.context.ElephantContext.encrypt |
( |
String |
value | ) |
|
|
static |
Definition at line 274 of file ElephantContext.java.
275 return !Strings.isBlank(value) ?
new String(
276 new Base64().encode(
encrypt(value.getBytes()))) :
"";
static byte[] encrypt(byte[] value)
◆ file()
static File org.turro.elephant.context.ElephantContext.file |
( |
String |
path | ) |
|
|
static |
◆ getAttribute()
static Object org.turro.elephant.context.ElephantContext.getAttribute |
( |
String |
key | ) |
|
|
static |
◆ getConstructor()
static IConstructor org.turro.elephant.context.ElephantContext.getConstructor |
( |
HttpServletRequest |
request, |
|
|
HttpServletResponse |
response |
|
) |
| |
|
static |
Definition at line 563 of file ElephantContext.java.
564 IConstructor impl = CollectionUtil.from(Instances.fresh().byAnnotation(ElephantConstructor.class, IConstructor.class)).first();
566 impl.setRequest(request);
567 impl.setResponse(response);
◆ getContactCurrency()
static Currency org.turro.elephant.context.ElephantContext.getContactCurrency |
( |
| ) |
|
|
static |
◆ getContactLocale()
static Locale org.turro.elephant.context.ElephantContext.getContactLocale |
( |
| ) |
|
|
static |
◆ getContextLoad()
static String org.turro.elephant.context.ElephantContext.getContextLoad |
( |
| ) |
|
|
static |
◆ getContextVariable()
static String org.turro.elephant.context.ElephantContext.getContextVariable |
( |
IConstructor |
constructor | ) |
|
|
static |
◆ getCurrent()
static ServletContext org.turro.elephant.context.ElephantContext.getCurrent |
( |
| ) |
|
|
static |
◆ getDirectoryQualification()
static String org.turro.elephant.context.ElephantContext.getDirectoryQualification |
( |
| ) |
|
|
static |
◆ getEncoding()
static String org.turro.elephant.context.ElephantContext.getEncoding |
( |
| ) |
|
|
static |
◆ getEntityWebContext() [1/2]
static String org.turro.elephant.context.ElephantContext.getEntityWebContext |
( |
Path |
path | ) |
|
|
static |
Definition at line 412 of file ElephantContext.java.
413 return ElephantProperties.getContextProperty(ENTITY_WEB_CONTEXT, path.getRoot());
◆ getEntityWebContext() [2/2]
static String org.turro.elephant.context.ElephantContext.getEntityWebContext |
( |
String |
path | ) |
|
|
static |
- Parameters
-
path | Entity path. Allows multiple path separated by comma. The first path have preference, and so on. The method returns when a web path value is encountered on null if none. |
- Returns
- The web path for the entity, by input priority.
Definition at line 401 of file ElephantContext.java.
402 String[] paths = path.split(
",");
403 for(String p : paths) {
405 if(!Strings.isBlank(ep)) {
static String getEntityWebContext(String path)
◆ getLiveLinks()
static boolean org.turro.elephant.context.ElephantContext.getLiveLinks |
( |
| ) |
|
|
static |
◆ getMetas()
static List<String> org.turro.elephant.context.ElephantContext.getMetas |
( |
| ) |
|
|
static |
◆ getRealPath()
static String org.turro.elephant.context.ElephantContext.getRealPath |
( |
String |
path | ) |
|
|
static |
Definition at line 115 of file ElephantContext.java.
118 real = real.replaceAll(
"\\\\",
"/");
119 if(real.endsWith(
"/"))
120 real = real.substring(0, real.length() - 1);
static ServletContext getCurrent()
◆ getRelativePath()
static String org.turro.elephant.context.ElephantContext.getRelativePath |
( |
String |
path | ) |
|
|
static |
Definition at line 125 of file ElephantContext.java.
127 if(path.startsWith(
remove)) {
128 return path.substring(
remove.length());
◆ getRootResourcePath()
static String org.turro.elephant.context.ElephantContext.getRootResourcePath |
( |
| ) |
|
|
static |
◆ getRootWebPath()
static String org.turro.elephant.context.ElephantContext.getRootWebPath |
( |
| ) |
|
|
static |
◆ getServerBase()
static String org.turro.elephant.context.ElephantContext.getServerBase |
( |
String |
scheme | ) |
|
|
static |
Definition at line 246 of file ElephantContext.java.
247 if(scheme.equals(
"http") &&
getUseSSL()) {
250 String server = schemes.get(scheme);
static boolean getUseSSL()
static String getSiteForcedDomain()
◆ getServerUrl()
static String org.turro.elephant.context.ElephantContext.getServerUrl |
( |
String |
scheme | ) |
|
|
static |
◆ getSiteDescription()
static String org.turro.elephant.context.ElephantContext.getSiteDescription |
( |
| ) |
|
|
static |
◆ getSiteFonts()
static String org.turro.elephant.context.ElephantContext.getSiteFonts |
( |
| ) |
|
|
static |
◆ getSiteForcedDomain()
static String org.turro.elephant.context.ElephantContext.getSiteForcedDomain |
( |
| ) |
|
|
static |
◆ getSiteIcon()
static String org.turro.elephant.context.ElephantContext.getSiteIcon |
( |
| ) |
|
|
static |
◆ getSiteInternalFiles()
static String org.turro.elephant.context.ElephantContext.getSiteInternalFiles |
( |
| ) |
|
|
static |
◆ getSiteKeywords()
static String org.turro.elephant.context.ElephantContext.getSiteKeywords |
( |
| ) |
|
|
static |
◆ getSiteLocales()
static String org.turro.elephant.context.ElephantContext.getSiteLocales |
( |
| ) |
|
|
static |
◆ getSiteName()
static String org.turro.elephant.context.ElephantContext.getSiteName |
( |
| ) |
|
|
static |
◆ getSiteSignin()
static String org.turro.elephant.context.ElephantContext.getSiteSignin |
( |
| ) |
|
|
static |
◆ getSiteSyndicate()
static String org.turro.elephant.context.ElephantContext.getSiteSyndicate |
( |
| ) |
|
|
static |
◆ getSiteWelcome()
static String org.turro.elephant.context.ElephantContext.getSiteWelcome |
( |
| ) |
|
|
static |
◆ getTemplatesRoot()
static String org.turro.elephant.context.ElephantContext.getTemplatesRoot |
( |
| ) |
|
|
static |
◆ getUseSSL()
static boolean org.turro.elephant.context.ElephantContext.getUseSSL |
( |
| ) |
|
|
static |
◆ getUseSSO()
static boolean org.turro.elephant.context.ElephantContext.getUseSSO |
( |
| ) |
|
|
static |
◆ hasSignup()
static boolean org.turro.elephant.context.ElephantContext.hasSignup |
( |
| ) |
|
|
static |
◆ initServerSchemas()
static void org.turro.elephant.context.ElephantContext.initServerSchemas |
( |
HttpServletRequest |
request | ) |
|
|
static |
Definition at line 370 of file ElephantContext.java.
371 if(!schemes.containsKey(request.getScheme())) {
372 schemes.put(request.getScheme(), request.getScheme() +
"://" +
373 request.getServerName() + getServerPort(request));
◆ isValidLocale()
static boolean org.turro.elephant.context.ElephantContext.isValidLocale |
( |
Locale |
locale | ) |
|
|
static |
◆ logMsg()
static String org.turro.elephant.context.ElephantContext.logMsg |
( |
String |
msg | ) |
|
|
static |
◆ removeAttribute()
static void org.turro.elephant.context.ElephantContext.removeAttribute |
( |
String |
key | ) |
|
|
static |
◆ removeWebContext()
static String org.turro.elephant.context.ElephantContext.removeWebContext |
( |
String |
path | ) |
|
|
static |
Definition at line 107 of file ElephantContext.java.
109 if(!Strings.isBlank(
remove) && path.startsWith(
remove)) {
110 return path.substring(
remove.length());
◆ resetSchemes()
static void org.turro.elephant.context.ElephantContext.resetSchemes |
( |
| ) |
|
|
static |
◆ resetSite()
static void org.turro.elephant.context.ElephantContext.resetSite |
( |
| ) |
|
|
static |
◆ setAttribute()
static void org.turro.elephant.context.ElephantContext.setAttribute |
( |
String |
key, |
|
|
Object |
value |
|
) |
| |
|
static |
◆ siteInfo()
static Jsons org.turro.elephant.context.ElephantContext.siteInfo |
( |
| ) |
|
|
static |
◆ toUri()
static URI org.turro.elephant.context.ElephantContext.toUri |
( |
String |
localPath | ) |
throws URISyntaxException |
|
static |
The documentation for this class was generated from the following file: