home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 April / DPPCPRO0499.ISO / April / Notes / 50b2wic.exe / DATA1.CAB / NotesProgramFilesJavaSupport / Notes.jar / lotus / domino / local / Log.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-11-15  |  3.9 KB  |  301 lines

  1. package lotus.domino.local;
  2.  
  3. import java.util.Vector;
  4. import lotus.domino.NotesException;
  5. import lotus.notes.JavaString;
  6.  
  7. public class Log extends NotesBase implements lotus.domino.Log {
  8.    private transient Session session;
  9.  
  10.    private native void NopenNotesLog(String var1, String var2);
  11.  
  12.    private native void NopenFileLog(String var1);
  13.  
  14.    private native void NopenMailLog(Vector var1, String var2);
  15.  
  16.    private native void NopenAgentLog();
  17.  
  18.    private native void NlogAction(String var1);
  19.  
  20.    private native void NlogError(int var1, String var2);
  21.  
  22.    private native void NlogEvent(String var1, String var2, int var3, int var4);
  23.  
  24.    private native void Nclose();
  25.  
  26.    protected Log() throws NotesException {
  27.    }
  28.  
  29.    protected Log(Session var1, int var2) throws NotesException {
  30.       super(var2, 12);
  31.       if (var1 == null) {
  32.          throw new NotesException(4404, JavaString.resource.getString("missing_session_object"));
  33.       } else {
  34.          this.session = var1;
  35.          var1.AddObject(this);
  36.       }
  37.    }
  38.  
  39.    protected void InternalFinalize() throws NotesException {
  40.       super.finalize();
  41.    }
  42.  
  43.    public void finalize() throws NotesException {
  44.       this.session.RemoveObject(this);
  45.       this.InternalFinalize();
  46.    }
  47.  
  48.    public void recycle() throws NotesException {
  49.       try {
  50.          this.session.RemoveObject(this);
  51.       } catch (NotesException var5) {
  52.       } finally {
  53.          super.Recycle();
  54.       }
  55.  
  56.    }
  57.  
  58.    public void openNotesLog(String var1, String var2) throws NotesException {
  59.       ((NotesBase)this).CheckObject();
  60.       synchronized(this){}
  61.  
  62.       try {
  63.          this.NopenNotesLog(var1, var2);
  64.       } catch (Throwable var5) {
  65.          throw var5;
  66.       }
  67.  
  68.    }
  69.  
  70.    public void openFileLog(String var1) throws NotesException {
  71.       ((NotesBase)this).CheckObject();
  72.       synchronized(this){}
  73.  
  74.       try {
  75.          this.NopenFileLog(var1);
  76.       } catch (Throwable var4) {
  77.          throw var4;
  78.       }
  79.  
  80.    }
  81.  
  82.    public void openMailLog(Vector var1, String var2) throws NotesException {
  83.       ((NotesBase)this).CheckObject();
  84.       synchronized(this){}
  85.  
  86.       try {
  87.          this.NopenMailLog(var1, var2);
  88.       } catch (Throwable var5) {
  89.          throw var5;
  90.       }
  91.  
  92.    }
  93.  
  94.    public void openAgentLog() throws NotesException {
  95.       ((NotesBase)this).CheckObject();
  96.       synchronized(this){}
  97.  
  98.       try {
  99.          this.NopenAgentLog();
  100.       } catch (Throwable var3) {
  101.          throw var3;
  102.       }
  103.  
  104.    }
  105.  
  106.    public void logAction(String var1) throws NotesException {
  107.       ((NotesBase)this).CheckObject();
  108.       synchronized(this){}
  109.  
  110.       try {
  111.          this.NlogAction(var1);
  112.       } catch (Throwable var4) {
  113.          throw var4;
  114.       }
  115.  
  116.    }
  117.  
  118.    public void logError(int var1, String var2) throws NotesException {
  119.       ((NotesBase)this).CheckObject();
  120.       synchronized(this){}
  121.  
  122.       try {
  123.          this.NlogError(var1, var2);
  124.       } catch (Throwable var5) {
  125.          throw var5;
  126.       }
  127.  
  128.    }
  129.  
  130.    public void logEvent(String var1, String var2, int var3, int var4) throws NotesException {
  131.       ((NotesBase)this).CheckObject();
  132.       synchronized(this){}
  133.  
  134.       try {
  135.          this.NlogEvent(var1, var2, var3, var4);
  136.       } catch (Throwable var7) {
  137.          throw var7;
  138.       }
  139.  
  140.    }
  141.  
  142.    public void close() throws NotesException {
  143.       ((NotesBase)this).CheckObject();
  144.       synchronized(this){}
  145.  
  146.       try {
  147.          this.Nclose();
  148.       } catch (Throwable var3) {
  149.          throw var3;
  150.       }
  151.  
  152.    }
  153.  
  154.    public boolean isLogErrors() throws NotesException {
  155.       ((NotesBase)this).CheckObject();
  156.       synchronized(this){}
  157.  
  158.       boolean var1;
  159.       try {
  160.          var1 = ((NotesBase)this).PropGetBool(1311);
  161.       } catch (Throwable var5) {
  162.          throw var5;
  163.       }
  164.  
  165.       return var1;
  166.    }
  167.  
  168.    public void setLogErrors(boolean var1) throws NotesException {
  169.       ((NotesBase)this).CheckObject();
  170.       synchronized(this){}
  171.  
  172.       try {
  173.          ((NotesBase)this).PropSetBool(1311, var1);
  174.       } catch (Throwable var4) {
  175.          throw var4;
  176.       }
  177.  
  178.    }
  179.  
  180.    public boolean isLogActions() throws NotesException {
  181.       ((NotesBase)this).CheckObject();
  182.       synchronized(this){}
  183.  
  184.       boolean var1;
  185.       try {
  186.          var1 = ((NotesBase)this).PropGetBool(1312);
  187.       } catch (Throwable var5) {
  188.          throw var5;
  189.       }
  190.  
  191.       return var1;
  192.    }
  193.  
  194.    public void setLogActions(boolean var1) throws NotesException {
  195.       ((NotesBase)this).CheckObject();
  196.       synchronized(this){}
  197.  
  198.       try {
  199.          ((NotesBase)this).PropSetBool(1312, var1);
  200.       } catch (Throwable var4) {
  201.          throw var4;
  202.       }
  203.  
  204.    }
  205.  
  206.    public int getNumActions() throws NotesException {
  207.       ((NotesBase)this).CheckObject();
  208.       synchronized(this){}
  209.  
  210.       int var1;
  211.       try {
  212.          var1 = ((NotesBase)this).PropGetInt(1313);
  213.       } catch (Throwable var5) {
  214.          throw var5;
  215.       }
  216.  
  217.       return var1;
  218.    }
  219.  
  220.    public int getNumErrors() throws NotesException {
  221.       ((NotesBase)this).CheckObject();
  222.       synchronized(this){}
  223.  
  224.       int var1;
  225.       try {
  226.          var1 = ((NotesBase)this).PropGetInt(1314);
  227.       } catch (Throwable var5) {
  228.          throw var5;
  229.       }
  230.  
  231.       return var1;
  232.    }
  233.  
  234.    public boolean isOverwriteFile() throws NotesException {
  235.       ((NotesBase)this).CheckObject();
  236.       synchronized(this){}
  237.  
  238.       boolean var1;
  239.       try {
  240.          var1 = ((NotesBase)this).PropGetBool(1315);
  241.       } catch (Throwable var5) {
  242.          throw var5;
  243.       }
  244.  
  245.       return var1;
  246.    }
  247.  
  248.    public void setOverwriteFile(boolean var1) throws NotesException {
  249.       ((NotesBase)this).CheckObject();
  250.       synchronized(this){}
  251.  
  252.       try {
  253.          ((NotesBase)this).PropSetBool(1315, var1);
  254.       } catch (Throwable var4) {
  255.          throw var4;
  256.       }
  257.  
  258.    }
  259.  
  260.    public String getProgramName() throws NotesException {
  261.       ((NotesBase)this).CheckObject();
  262.       synchronized(this){}
  263.  
  264.       String var1;
  265.       try {
  266.          var1 = ((NotesBase)this).PropGetString(1316);
  267.       } catch (Throwable var5) {
  268.          throw var5;
  269.       }
  270.  
  271.       return var1;
  272.    }
  273.  
  274.    public void setProgramName(String var1) throws NotesException {
  275.       ((NotesBase)this).CheckObject();
  276.       synchronized(this){}
  277.  
  278.       try {
  279.          ((NotesBase)this).PropSetString(1316, var1);
  280.       } catch (Throwable var4) {
  281.          throw var4;
  282.       }
  283.  
  284.    }
  285.  
  286.    public String toString() {
  287.       String var1;
  288.       try {
  289.          var1 = this.getProgramName();
  290.       } catch (Exception var2) {
  291.          var1 = null;
  292.       }
  293.  
  294.       return var1;
  295.    }
  296.  
  297.    public lotus.domino.Session getParent() throws NotesException {
  298.       return this.session;
  299.    }
  300. }
  301.