home *** CD-ROM | disk | FTP | other *** search
- package lotus.domino.local;
-
- import java.util.Date;
- import java.util.Vector;
- import lotus.domino.Base;
- import lotus.domino.Database;
- import lotus.domino.DateRange;
- import lotus.domino.DateTime;
- import lotus.domino.DbDirectory;
- import lotus.domino.Document;
- import lotus.domino.DocumentCollection;
- import lotus.domino.International;
- import lotus.domino.Log;
- import lotus.domino.Name;
- import lotus.domino.Newsletter;
- import lotus.domino.NotesException;
- import lotus.domino.NotesFactory;
- import lotus.domino.Registration;
- import lotus.domino.RichTextParagraphStyle;
- import lotus.domino.RichTextStyle;
- import lotus.domino.View;
-
- public class DebugSession extends Session {
- private static String dumpAgentContextFile = "AgentRunner.nsf";
- // $FF: renamed from: s lotus.domino.local.Session
- private Session field_0;
- private String keySrv;
- private String keyDb;
- private String keyAgent;
- private Document doc;
-
- public DebugSession(AgentContext var1) throws NotesException {
- super(1);
- this.dumpAgentContext((Session)NotesFactory.createSession(), var1);
- }
-
- public DebugSession(AgentContext var1, String var2) throws NotesException {
- super(1);
- this.dumpAgentContext((Session)NotesFactory.createSession(), var1, var2);
- }
-
- public DebugSession(String var1, String var2, String var3) throws NotesException {
- super(1);
- this.field_0 = (Session)NotesFactory.createSession();
- this.keySrv = var1;
- this.keyDb = var2;
- this.keyAgent = var3;
- }
-
- public DateRange createDateRange() throws NotesException {
- return this.field_0.createDateRange();
- }
-
- public DateRange createDateRange(DateTime var1, DateTime var2) throws NotesException {
- return this.field_0.createDateRange(var1, var2);
- }
-
- public DateRange createDateRange(Date var1, Date var2) throws NotesException {
- return this.field_0.createDateRange(var1, var2);
- }
-
- public DateTime createDateTime(Date var1) throws NotesException {
- return this.field_0.createDateTime(var1);
- }
-
- public DateTime createDateTime(String var1) throws NotesException {
- return this.field_0.createDateTime(var1);
- }
-
- public Log createLog(String var1) throws NotesException {
- return this.field_0.createLog(var1);
- }
-
- public Name createName(String var1) throws NotesException {
- return this.field_0.createName(var1);
- }
-
- public Name createName(String var1, String var2) throws NotesException {
- return this.field_0.createName(var1, var2);
- }
-
- public Newsletter createNewsletter(DocumentCollection var1) throws NotesException {
- return this.field_0.createNewsletter(var1);
- }
-
- public Registration createRegistration() throws NotesException {
- return this.field_0.createRegistration();
- }
-
- public RichTextStyle createRichTextStyle() throws NotesException {
- return this.field_0.createRichTextStyle();
- }
-
- public RichTextParagraphStyle createRichTextParagraphStyle() throws NotesException {
- return this.field_0.createRichTextParagraphStyle();
- }
-
- public Vector evaluate(String var1) throws NotesException {
- return this.field_0.evaluate(var1);
- }
-
- public Vector evaluate(String var1, Document var2) throws NotesException {
- return this.field_0.evaluate(var1, var2);
- }
-
- public Vector freeTimeSearch(DateRange var1, int var2, Object var3, boolean var4) throws NotesException {
- return this.field_0.freeTimeSearch(var1, var2, var3, var4);
- }
-
- public Vector getAddressBooks() throws NotesException {
- return this.field_0.getAddressBooks();
- }
-
- public lotus.domino.AgentContext getAgentContext() throws NotesException {
- DebugAgentContext var1;
- try {
- Database var2 = this.field_0.getDatabase("", dumpAgentContextFile);
- if (!var2.isOpen()) {
- throw new NotesException(0, "AgentContext database not found");
- }
-
- View var3 = var2.getView("($AgentContexts)");
- if (var3 == null) {
- throw new NotesException(0, "AgentContext view not found");
- }
-
- Vector var4 = new Vector(2, 0);
- var4.addElement((this.keySrv != "" && this.keySrv != "\u0000" ? this.keySrv : "Local") + "!!" + this.keyDb);
- var4.addElement(this.keyAgent);
- this.doc = var3.getDocumentByKey(var4, true);
- if (this.doc == null) {
- throw new NotesException(0, "AgentContext document not found");
- }
-
- var1 = new DebugAgentContext(this.field_0, this.doc);
- } catch (Exception var5) {
- var1 = null;
- System.out.println(((Throwable)var5).getMessage());
- }
-
- return var1;
- }
-
- public String getCommonUserName() throws NotesException {
- return this.field_0.getCommonUserName();
- }
-
- public Database getDatabase(String var1, String var2) throws NotesException {
- return this.field_0.getDatabase(var1, var2);
- }
-
- public Database getDatabase(String var1, String var2, boolean var3) throws NotesException {
- return this.field_0.getDatabase(var1, var2, var3);
- }
-
- public DbDirectory getDbDirectory(String var1) throws NotesException {
- return this.field_0.getDbDirectory(var1);
- }
-
- public String getEnvironmentString(String var1) throws NotesException {
- return this.field_0.getEnvironmentString(var1);
- }
-
- public String getEnvironmentString(String var1, boolean var2) throws NotesException {
- return this.field_0.getEnvironmentString(var1, var2);
- }
-
- public Object getEnvironmentValue(String var1) throws NotesException {
- return this.field_0.getEnvironmentValue(var1);
- }
-
- public Object getEnvironmentValue(String var1, boolean var2) throws NotesException {
- return this.field_0.getEnvironmentValue(var1, var2);
- }
-
- public void setEnvironmentVar(String var1, Object var2) throws NotesException {
- this.field_0.setEnvironmentVar(var1, var2);
- }
-
- public void setEnvironmentVar(String var1, Object var2, boolean var3) throws NotesException {
- this.field_0.setEnvironmentVar(var1, var2, var3);
- }
-
- public International getInternational() throws NotesException {
- return this.field_0.getInternational();
- }
-
- public String getNotesVersion() throws NotesException {
- return this.field_0.getNotesVersion();
- }
-
- public String getPlatform() throws NotesException {
- return this.field_0.getPlatform();
- }
-
- public String getServerName() throws NotesException {
- return this.field_0.getServerName();
- }
-
- public Database getURLDatabase() throws NotesException {
- return this.field_0.getURLDatabase();
- }
-
- public String getUserName() throws NotesException {
- return this.field_0.getUserName();
- }
-
- public Name getUserNameObject() throws NotesException {
- return this.field_0.getUserNameObject();
- }
-
- public boolean isOnServer() throws NotesException {
- return this.field_0.isOnServer();
- }
-
- public Base resolve(String var1) throws NotesException {
- return this.field_0.resolve(var1);
- }
-
- public Vector getUserNameList() throws NotesException {
- return this.field_0.getUserNameList();
- }
-
- public void recycle() throws NotesException {
- this.field_0.recycle();
- }
-
- public String getURL() throws NotesException {
- return this.field_0.getURL();
- }
-
- public void stampAgentContextDoc() throws NotesException {
- try {
- DateTime var1 = this.field_0.createDateTime("");
- var1.setNow();
- this.doc.removeItem("LastRun");
- this.doc.appendItemValue("LastRun", var1);
- this.doc.save();
- } catch (Exception var2) {
- ((Throwable)var2).printStackTrace();
- }
- }
-
- private void dumpAgentContext(Session var1, AgentContext var2) throws NotesException {
- try {
- Database var3 = var1.getDatabase("", dumpAgentContextFile);
- if (!var3.isOpen()) {
- throw new NotesException(0, "AgentContext database not found");
- } else {
- this.doc = var3.createDocument();
- this.doc.appendItemValue("Form", "AgentContext");
- new DebugAgentContext(var1, var2, this.doc);
- this.doc.save();
- this.doc.computeWithForm(false, false);
- this.doc.save();
- System.out.println("AgentContext dumped to file " + dumpAgentContextFile);
- }
- } catch (Exception var4) {
- ((Throwable)var4).printStackTrace();
- }
- }
-
- private void dumpAgentContext(Session var1, AgentContext var2, String var3) throws NotesException {
- try {
- Database var4 = var1.getDatabase("", dumpAgentContextFile);
- if (!var4.isOpen()) {
- throw new NotesException(0, "AgentContext database not found");
- } else {
- this.doc = var4.createDocument();
- this.doc.appendItemValue("Form", "AgentContext");
- this.doc.appendItemValue("ClassName", var3);
- new DebugAgentContext(var1, var2, this.doc);
- this.doc.save();
- this.doc.computeWithForm(false, false);
- this.doc.save();
- System.out.println("AgentContext dumped to file " + dumpAgentContextFile);
- }
- } catch (Exception var5) {
- ((Throwable)var5).printStackTrace();
- }
- }
- }
-