19 package org.turro.elephant.direct;
22 import java.util.logging.Level;
23 import java.util.logging.Logger;
24 import javax.servlet.ServletContext;
25 import javax.servlet.http.HttpServletRequest;
26 import javax.servlet.http.HttpServletResponse;
27 import org.turro.string.Strings;
28 import org.turro.action.Actions;
29 import org.turro.collections.KeyValueMap;
30 import org.turro.elephant.context.ElephantContext;
31 import org.turro.elephant.context.IConstructor;
32 import org.turro.http.URLUtil;
33 import org.turro.reflection.Instances;
41 public static final String
44 public static String
getIdentifier(Class<? extends IDirectContent> control) {
45 return control.getAnnotation(
DirectContent.class).identifier();
48 public static String
createURL(String server, String
id) {
50 if(!Strings.isBlank(url)) {
64 public static boolean getContent(ServletContext context, HttpServletRequest request, HttpServletResponse response) {
68 public static boolean isYourTurn(HttpServletRequest request, String path) {
83 public static String
doCreatePOST(String
id, String domId, String values) {
88 ".done(function(data) { $(\"#" + domId +
"\").html(data); });";
103 public static String
doCreateParameter(String
id, String parameter, Map<String, String> values) {
109 }
catch (Exception ex) {
116 public static KeyValueMap
getParameters(HttpServletRequest request, HttpServletResponse response) {
123 public static synchronized boolean executeDirectContents(ServletContext context, HttpServletRequest request, HttpServletResponse response) {
125 if(iDirect.myTurn(request)) {
126 iDirect.execute(context, request, response);
135 if(iDirect.itsMe(
id)) {
static String createRightNowParameter(String values)
static String createParameter(String email, String redir)
static KeyValueMap getRightNowAction(IConstructor constructor)
static String createRightNowAction(String values)
static boolean getUseSSL()
static IConstructor getConstructor(HttpServletRequest request, HttpServletResponse response)
static String getRootWebPath()
static String logMsg(String msg)
static String doCreateURL(String id, String values)
static IDirectContent getDirectContent(String id)
static boolean isDirectContent(HttpServletRequest request)
static boolean isYourTurn(HttpServletRequest request, String path)
static String doCreatePOST(String id, String values)
static String createURL(String server, String id)
static final String DIRECT_CONTENT_PATH
static String createRelativeURL(String id)
static boolean getContent(ServletContext context, HttpServletRequest request, HttpServletResponse response)
static KeyValueMap getParameters(HttpServletRequest request, HttpServletResponse response)
static String doCreatePOST(String id, String domId, String values)
static String doCreateParameter(String id, String parameter, Map< String, String > values)
static synchronized boolean executeDirectContents(ServletContext context, HttpServletRequest request, HttpServletResponse response)
static String getIdentifier(Class<? extends IDirectContent > control)
static String checkAppServer(String server, boolean secured)