Esempio n. 1
0
 public final boolean getKilled() {
   if (myAccess != null && myAccess.getCompiledScript() != null) {
     return myAccess.getCompiledScript().getKill();
   } else {
     return false;
   }
 }
Esempio n. 2
0
 public void setKilled(boolean b) {
   if (myAccess.getCompiledScript().getCurrentMap() != null) {
     Mappable myMap = (Mappable) myAccess.getCompiledScript().getCurrentMap().myObject;
     if (myMap != null && myMap instanceof com.dexels.navajo.adapter.SQLMap) {
       ((SQLMap) myMap).setKillConnection();
     }
   }
   myAccess.getCompiledScript().setKill(b);
 }
Esempio n. 3
0
 private Message getMessage(Message parent, String name) throws NavajoException {
   Message m = null;
   m = NavajoFactory.getInstance().createMessage(callingAccess.getOutputDoc(), name);
   if (parent != null) {
     parent.addMessage(m);
   } else {
     callingAccess.getOutputDoc().addMessage(m);
   }
   return m;
 }
Esempio n. 4
0
 private void addProperty(Message m, String name, Object value, String type, int length)
     throws NavajoException, MappingException {
   MappingUtils.setProperty(
       false,
       m,
       name,
       value,
       type,
       null,
       Property.DIR_OUT,
       "",
       length,
       callingAccess.getOutputDoc(),
       callingAccess.getCompiledScript().getInDoc(),
       false);
 }
Esempio n. 5
0
 public String getClientToken() {
   if (myAccess != null) {
     return myAccess.getClientToken();
   } else {
     return null;
   }
 }
Esempio n. 6
0
 public String getRequestId() {
   if (myAccess != null) {
     return myAccess.getInDoc().getHeader().getRequestId();
   } else {
     return null;
   }
 }
Esempio n. 7
0
 private String getRequestNavajo() {
   if (requestNavajo == null) {
     Navajo in = myAccess.getCompiledScript().getInDoc().copy();
     in.removeMessage("__globals__");
     in.removeMessage("__parms__");
     java.io.StringWriter sw = new java.io.StringWriter();
     in.write(sw);
     requestNavajo = sw.toString();
   }
   return requestNavajo;
 }
Esempio n. 8
0
 private String getMapStack() {
   StringBuffer stackBuffer = new StringBuffer();
   Stack<MappableTreeNode> s = myAccess.getCompiledScript().getTreeNodeStack();
   Iterator<MappableTreeNode> iter = s.iterator();
   while (iter.hasNext()) {
     MappableTreeNode o = iter.next();
     if (o != null && o.myObject != null) {
       stackBuffer.append(o.myObject.getClass().getName() + "\n");
     }
   }
   return stackBuffer.toString();
 }
Esempio n. 9
0
 @SuppressWarnings("rawtypes")
 private String getOutMessageStack() {
   StringBuffer stackBuffer = new StringBuffer();
   Stack s = myAccess.getCompiledScript().getOutMsgStack();
   Iterator iter = s.iterator();
   while (iter.hasNext()) {
     Object o = iter.next();
     if (o != null) {
       stackBuffer.append(o + "\n");
     }
   }
   return stackBuffer.toString();
 }
Esempio n. 10
0
  private String getResponseNavajo() {
    if (responseNavajo == null) {

      Navajo in = myAccess.getOutputDoc().copy();
      if (in.getMessage("__globals__") != null) in.removeMessage("__globals__");
      if (in.getMessage("__parms__") != null) in.removeMessage("__parms__");

      java.io.StringWriter sw = new java.io.StringWriter();
      in.write(sw);
      responseNavajo = sw.toString();
    }
    return responseNavajo;
  }
Esempio n. 11
0
  @Override
  public void store() throws MappableException, UserException {

    if (showDetails) {

      try {
        Message user = getMessage(null, "User");
        addProperty(user, "Starttime", getCreated(), Property.DATE_PROPERTY, 10);
        addProperty(user, "Totaltime", new Integer(getTotaltime()), Property.INTEGER_PROPERTY, 10);
        addProperty(user, "ClientIP", getIpAddress(), Property.STRING_PROPERTY, 50);
        addProperty(user, "ClientHostname", getHost(), Property.STRING_PROPERTY, 50);
        addProperty(user, "User", myAccess.rpcUser, Property.STRING_PROPERTY, 50);
        addProperty(user, "Webservice", myAccess.rpcName, Property.STRING_PROPERTY, 50);
        addProperty(user, "AccessId", myAccess.accessID, Property.STRING_PROPERTY, 50);
        addProperty(
            user,
            "Stacktrace",
            myAccess.getCompiledScript().getStackTrace(),
            Property.MEMO_PROPERTY,
            4096);
        Message currentMap = getMessage(user, "CurrentMap");
        MappableTreeNode currentNode = getCurrentMap();
        if (currentNode != null) {
          showMapDetails(currentMap, currentNode);
        }
        Message requestNavajo = getMessage(user, "RequestNavajo");
        addProperty(requestNavajo, "Document", getRequestNavajo(), Property.MEMO_PROPERTY, -1);
        Message responseNavajo = getMessage(user, "ResponseNavajo");
        addProperty(responseNavajo, "Document", getResponseNavajo(), Property.MEMO_PROPERTY, -1);
        Message outMessagStack = getMessage(user, "OutMessageStack");
        addProperty(outMessagStack, "Stack", getOutMessageStack(), Property.STRING_PROPERTY, -1);
        Message mapStack = getMessage(user, "MapObjectStack");
        addProperty(mapStack, "Stack", getMapStack(), Property.STRING_PROPERTY, -1);

      } catch (Exception ne) {
        logger.error("Error: ", ne);
      }
    }
  }
Esempio n. 12
0
 public AccessMap(Access a) {
   this.myAccess = a;
   this.myScript = a.getCompiledScript();
 }
Esempio n. 13
0
 private MappableTreeNode getCurrentMap() {
   MappableTreeNode current = myAccess.getCompiledScript().getCurrentMap();
   return current;
 }
Esempio n. 14
0
 public String getWaitingFor() {
   return myAccess.getWaitingForPreviousResponse();
 }
Esempio n. 15
0
 public boolean getWaiting() {
   return (myAccess.getWaitingForPreviousResponse() != null);
 }