|
static String | setObfuscatedParsPOST (String parameters) |
|
static String | setObfuscatedPars (String parameters) |
|
static String | setObfuscatedPars (KeyValueMap parameters) |
|
static String | setObfuscatedRightNowPars (String parameters) |
|
static String | setObfuscatedRightNowPars (KeyValueMap parameters) |
|
static KeyValueMap | getObfuscatedParameters () |
|
static KeyValueMap | getObfuscatedParameters (HttpServletRequest request) |
|
static KeyValueMap | getObfuscatedFrom (String obfuscated) |
|
static KeyValueMap | getAllParameters () |
|
static KeyValueMap | getAllParameters (Map< String, String[]> parameterMap) |
|
static String | obsfuscatedPOST (String context, String values) |
|
static String | createPOST (String id, String values) |
|
static String | createPOST (String id, String domId, String values) |
|
static String | createURL (String id, String values) |
|
static String | createDirectURL (IConstructor constructor, IContact contact, String directContentId, String values, int daysValid, boolean withDomain) |
|
- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 77 of file MarkerHelper.java.
◆ MarkerHelper()
org.turro.marker.MarkerHelper.MarkerHelper |
( |
IConstructor |
constructor | ) |
|
◆ color()
Colors.Color org.turro.marker.MarkerHelper.color |
( |
String |
color | ) |
|
Definition at line 410 of file MarkerHelper.java.
411 return Optional.ofNullable(Colors.of(
color)).map(c -> c.color()).orElse(
null);
Colors.Color color(String color)
◆ createDirectURL()
static String org.turro.marker.MarkerHelper.createDirectURL |
( |
IConstructor |
constructor, |
|
|
IContact |
contact, |
|
|
String |
directContentId, |
|
|
String |
values, |
|
|
int |
daysValid, |
|
|
boolean |
withDomain |
|
) |
| |
|
static |
Definition at line 377 of file MarkerHelper.java.
379 String exrino =
null;
381 KeyValueMap kvm =
new KeyValueMap(values);
382 kvm.put(Actions.USER_PAR, contact.getConnector(IUser.CONNECTOR_EMAIL));
383 kvm.put(Actions.REDIR_PAR, (withDomain ? ElephantContext.getServerBase(
"http") :
"") + constructor.
getCurrentContext().
getWebPath());
384 exrino = Actions.createAction(kvm, daysValid,
false);
385 }
catch (ParserException ex) {
386 Logger.getLogger(
MarkerHelper.class.getName()).log(Level.SEVERE,
null, ex);
388 return (withDomain ? ElephantContext.getServerBase(
"http") :
"") +
389 ElephantContext.getRootWebPath() +
390 DirectContents.DIRECT_CONTENT_PATH + directContentId +
MarkerHelper(IConstructor constructor)
ElContext getCurrentContext()
◆ createPOST() [1/2]
static String org.turro.marker.MarkerHelper.createPOST |
( |
String |
id, |
|
|
String |
domId, |
|
|
String |
values |
|
) |
| |
|
static |
Definition at line 369 of file MarkerHelper.java.
370 return DirectContents.doCreatePOST(
id, domId, values);
◆ createPOST() [2/2]
static String org.turro.marker.MarkerHelper.createPOST |
( |
String |
id, |
|
|
String |
values |
|
) |
| |
|
static |
Definition at line 365 of file MarkerHelper.java.
366 return DirectContents.doCreatePOST(
id, values);
◆ createURL()
static String org.turro.marker.MarkerHelper.createURL |
( |
String |
id, |
|
|
String |
values |
|
) |
| |
|
static |
Definition at line 373 of file MarkerHelper.java.
374 return DirectContents.doCreateURL(
id, values);
◆ downloadPath()
String org.turro.marker.MarkerHelper.downloadPath |
( |
Document |
document | ) |
|
Definition at line 416 of file MarkerHelper.java.
417 return ElephantContext.getRootWebPath() +
"/down_" +
418 ElephantContext.removeWebContext(
419 ElephantContext.getRelativePath(document.path().toString()));
◆ getAllParameters() [1/2]
static KeyValueMap org.turro.marker.MarkerHelper.getAllParameters |
( |
| ) |
|
|
static |
Definition at line 330 of file MarkerHelper.java.
331 HttpServletRequest request = Application.getApplication().getHttpServletRequest();
332 if(request !=
null) {
335 return new KeyValueMap(
new HashMap());
static KeyValueMap getAllParameters()
◆ getAllParameters() [2/2]
static KeyValueMap org.turro.marker.MarkerHelper.getAllParameters |
( |
Map< String, String[]> |
parameterMap | ) |
|
|
static |
Definition at line 338 of file MarkerHelper.java.
339 final Map map =
new HashMap();
340 if(parameterMap !=
null) {
341 parameterMap.keySet().forEach((key) -> {
343 KeyValueMap kvm = MarkerHelper.getObfuscatedFrom(parameterMap.get(key)[0]);
348 map.put(key, parameterMap.get(key)[0]);
352 return new KeyValueMap(map);
static final String OBFUSCATED_PAR
◆ getAnonymous()
Definition at line 189 of file MarkerHelper.java.
190 return Plugins.loadImplementation(IDirectContent.class,
"anonymous-ctrl");
◆ getContent() [1/2]
String org.turro.marker.MarkerHelper.getContent |
( |
KeyValueMap |
values | ) |
|
Definition at line 109 of file MarkerHelper.java.
110 return ContentService.createURL(constructor, values);
◆ getContent() [2/2]
String org.turro.marker.MarkerHelper.getContent |
( |
String |
values | ) |
|
Definition at line 105 of file MarkerHelper.java.
106 return ContentService.createURL(constructor, values);
◆ getCookies()
Definition at line 139 of file MarkerHelper.java.
140 return DirectContents.getDirectContent(
"cookie-management");
◆ getEntityInfoURL()
String org.turro.marker.MarkerHelper.getEntityInfoURL |
( |
String |
entityPath | ) |
|
Definition at line 211 of file MarkerHelper.java.
212 return EntityInfoContent.createURL(EntityInfoType.FULL, LinkType.WEB) +
"&path=" + entityPath;
◆ getEntryPoint() [1/2]
String org.turro.marker.MarkerHelper.getEntryPoint |
( |
String |
entryPoint, |
|
|
KeyValueMap |
values |
|
) |
| |
Definition at line 117 of file MarkerHelper.java.
118 return ContentService.createEntryPoint(constructor, entryPoint, values);
◆ getEntryPoint() [2/2]
String org.turro.marker.MarkerHelper.getEntryPoint |
( |
String |
entryPoint, |
|
|
String |
values |
|
) |
| |
Definition at line 113 of file MarkerHelper.java.
114 return ContentService.createEntryPoint(constructor, entryPoint, values);
◆ getHelpLink()
String org.turro.marker.MarkerHelper.getHelpLink |
( |
ElContext |
context | ) |
|
Definition at line 205 of file MarkerHelper.java.
206 return context !=
null ? HelpContext.helpLink(context.getPath()) :
null;
◆ getIdFrom()
String org.turro.marker.MarkerHelper.getIdFrom |
( |
String |
value | ) |
|
◆ getImageFromUrl()
String org.turro.marker.MarkerHelper.getImageFromUrl |
( |
String |
url | ) |
|
Definition at line 98 of file MarkerHelper.java.
99 HashMap map =
new HashMap();
100 map.put(
"type",
"image");
101 map.put(
"data", url);
String getContent(String values)
◆ getMessageQueue()
Definition at line 151 of file MarkerHelper.java.
152 return DirectContents.getDirectContent(
"message-queue");
◆ getObfuscatedFrom()
static KeyValueMap org.turro.marker.MarkerHelper.getObfuscatedFrom |
( |
String |
obfuscated | ) |
|
|
static |
Definition at line 319 of file MarkerHelper.java.
320 if(!Strings.isBlank(obfuscated)) {
322 return new KeyValueMap(ElephantContext.decrypt(URLDecoder.decode(obfuscated, charset)));
323 }
catch (Exception ex) {
324 WebLoggers.info(
MarkerHelper.class).exception(ex).log();
◆ getObfuscatedParameter()
String org.turro.marker.MarkerHelper.getObfuscatedParameter |
( |
String |
parameter | ) |
|
Definition at line 260 of file MarkerHelper.java.
262 return getMapFromObfuscated().get(parameter);
263 }
catch (Exception ex) {
264 Logger.getLogger(
MarkerHelper.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
◆ getObfuscatedParameters() [1/2]
static KeyValueMap org.turro.marker.MarkerHelper.getObfuscatedParameters |
( |
| ) |
|
|
static |
Definition at line 311 of file MarkerHelper.java.
static KeyValueMap getObfuscatedFrom(String obfuscated)
◆ getObfuscatedParameters() [2/2]
static KeyValueMap org.turro.marker.MarkerHelper.getObfuscatedParameters |
( |
HttpServletRequest |
request | ) |
|
|
static |
◆ getPushNotification()
Definition at line 147 of file MarkerHelper.java.
148 return DirectContents.getDirectContent(
"push-notification");
◆ getQRCodeFromCurrent()
String org.turro.marker.MarkerHelper.getQRCodeFromCurrent |
( |
| ) |
|
Definition at line 87 of file MarkerHelper.java.
String getQRCodeFromUrl(String url)
HttpServletRequest getRequest()
◆ getQRCodeFromUrl()
String org.turro.marker.MarkerHelper.getQRCodeFromUrl |
( |
String |
url | ) |
|
Definition at line 91 of file MarkerHelper.java.
92 HashMap map =
new HashMap();
93 map.put(
"type",
"qrcode");
◆ getRepository()
Repository org.turro.marker.MarkerHelper.getRepository |
( |
String |
path | ) |
|
◆ getSiteAddress()
String org.turro.marker.MarkerHelper.getSiteAddress |
( |
| ) |
|
◆ getTracker()
Definition at line 143 of file MarkerHelper.java.
144 return DirectContents.getDirectContent(
"img-tk");
◆ getTrick()
String org.turro.marker.MarkerHelper.getTrick |
( |
int |
seconds | ) |
|
◆ getUniqueId()
String org.turro.marker.MarkerHelper.getUniqueId |
( |
| ) |
|
◆ getUserActivityURL()
String org.turro.marker.MarkerHelper.getUserActivityURL |
( |
IContact |
contact | ) |
|
Definition at line 217 of file MarkerHelper.java.
218 return new UserActivityContent().createURL(contact, ActivityType.values());
◆ getUserContents()
◆ getUserContentTags()
Set<String> org.turro.marker.MarkerHelper.getUserContentTags |
( |
| ) |
|
◆ getUserMenu()
Set<IUserMenu> org.turro.marker.MarkerHelper.getUserMenu |
( |
| ) |
|
◆ imageExists()
boolean org.turro.marker.MarkerHelper.imageExists |
( |
String |
image | ) |
|
Definition at line 133 of file MarkerHelper.java.
134 if(Strings.isBlank(image))
return false;
135 image = image.contains(
"?") ? image.substring(0, image.indexOf(
"?")) : image;
136 return new File(ElephantContext.getRealPath(image)).exists();
◆ imageOrDefault()
String org.turro.marker.MarkerHelper.imageOrDefault |
( |
String |
image | ) |
|
Definition at line 129 of file MarkerHelper.java.
130 return imageExists(image) ? image :
"/_zul/images/noimg/noimage.png";
boolean imageExists(String image)
◆ imageOrEmpty()
String org.turro.marker.MarkerHelper.imageOrEmpty |
( |
String |
image | ) |
|
◆ navigateAndSetWebTag()
String org.turro.marker.MarkerHelper.navigateAndSetWebTag |
( |
String |
fromTag, |
|
|
String |
path |
|
) |
| |
Definition at line 243 of file MarkerHelper.java.
244 return TagsServlet.navigateAndSet(fromTag, path);
◆ navigateToWebTag()
String org.turro.marker.MarkerHelper.navigateToWebTag |
( |
String |
fromTag, |
|
|
String |
webTag |
|
) |
| |
Definition at line 239 of file MarkerHelper.java.
240 return TagsServlet.navigateFromTo(fromTag, webTag);
◆ needCookies()
boolean org.turro.marker.MarkerHelper.needCookies |
( |
| ) |
|
◆ obfuscateParameters()
String org.turro.marker.MarkerHelper.obfuscateParameters |
( |
String |
parameters | ) |
|
Definition at line 252 of file MarkerHelper.java.
static String setObfuscatedPars(String parameters)
◆ obfuscateRightNowPars()
String org.turro.marker.MarkerHelper.obfuscateRightNowPars |
( |
String |
parameters | ) |
|
Definition at line 256 of file MarkerHelper.java.
static String setObfuscatedRightNowPars(String parameters)
◆ obsfuscatedPOST()
static String org.turro.marker.MarkerHelper.obsfuscatedPOST |
( |
String |
context, |
|
|
String |
values |
|
) |
| |
|
static |
Definition at line 355 of file MarkerHelper.java.
static String setObfuscatedParsPOST(String parameters)
◆ processMacrosForWeb()
String org.turro.marker.MarkerHelper.processMacrosForWeb |
( |
String |
text | ) |
|
Definition at line 160 of file MarkerHelper.java.
161 if(text.contains(
"{@")) {
162 StringWriter swriter =
new StringWriter();
163 try(PrintWriter writer =
new PrintWriter(swriter)) {
164 Parser.processMacros(constructor, writer, text);
165 text = swriter.toString();
166 }
catch (IOException | ServletException ex) {
167 Logger.getLogger(
MarkerHelper.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
170 return MailSenders.processMacros((IContact) constructor.
getUser(), text,
true);
◆ setObfuscatedPars() [1/2]
static String org.turro.marker.MarkerHelper.setObfuscatedPars |
( |
KeyValueMap |
parameters | ) |
|
|
static |
◆ setObfuscatedPars() [2/2]
static String org.turro.marker.MarkerHelper.setObfuscatedPars |
( |
String |
parameters | ) |
|
|
static |
◆ setObfuscatedParsPOST()
static String org.turro.marker.MarkerHelper.setObfuscatedParsPOST |
( |
String |
parameters | ) |
|
|
static |
◆ setObfuscatedRightNowPars() [1/2]
static String org.turro.marker.MarkerHelper.setObfuscatedRightNowPars |
( |
KeyValueMap |
parameters | ) |
|
|
static |
◆ setObfuscatedRightNowPars() [2/2]
static String org.turro.marker.MarkerHelper.setObfuscatedRightNowPars |
( |
String |
parameters | ) |
|
|
static |
◆ truncate()
String org.turro.marker.MarkerHelper.truncate |
( |
String |
text, |
|
|
int |
max |
|
) |
| |
◆ truncateHTML()
String org.turro.marker.MarkerHelper.truncateHTML |
( |
String |
html, |
|
|
int |
max |
|
) |
| |
◆ truncateHTMLtoPlain()
String org.turro.marker.MarkerHelper.truncateHTMLtoPlain |
( |
String |
html, |
|
|
int |
max |
|
) |
| |
◆ webTags()
String org.turro.marker.MarkerHelper.webTags |
( |
| ) |
|
◆ OBFUSCATED_PAR
final String org.turro.marker.MarkerHelper.OBFUSCATED_PAR = "el_xpar" |
|
static |
The documentation for this class was generated from the following file: