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

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