如何从 Lotus Notes 启动应用程序,然后保存到 Lotus 数据库中?

发布于 2024-10-11 03:24:26 字数 485 浏览 3 评论 0 原文

我所在的团队开发了 Java Swing 应用程序,现在我正在尝试帮助另一个团队将该应用程序集成到 Lotus Notes 中。不幸的是,我对 Notes 不太了解,并且似乎找不到与我们正在尝试做的事情相关的任何文档。

我们想要做的是让用户使用从 Notes 传入的一些数据启动我们的应用程序,让用户使用传入的数据,然后当他们准备好保存时,修改后的数据将保存回 Notes 数据库中。

我们使用 Notes 代理实现的第一部分 - 它能够启动我们的应用程序并传入原始数据 - 问题是保存。代理似乎在调用启动我们的应用程序后完成并“死亡”,因此当用户准备保存时无法获得对会话/数据库的引用。一位 Lotus 开发人员通过在代理中创建一个繁忙的等待循环来使其工作,以在启动应用程序后保持其活动状态 - 但这会产生副作用,会在应用程序打开时阻止对 Lotus Notes 的任何其他使用,因此这并不是一个真正可以接受的解决方案。

有人知道我们正在尝试做的事情是否可能吗?怎么做呢?有关于此的任何示例/文档的链接吗?

I work on a team that's developed a Java Swing application, and now I'm trying to help another team integrate this application into Lotus Notes. Unfortunately, I don't know that much about Notes, and can't seem to find any documentation related to what we're trying to do.

What we want to do is have the user launch our application with some data passed in from Notes, have the user work with the passed in data, then when they are ready to save, the modified data is saved back into the Notes database.

The first part we achieved with a Notes agent - it's able to launch our application and pass the original data in - the problem is saving. The agent seems to complete and "die" after the call to launch our application, so there's no way to get a reference to the session/database later when the user is ready to save. One of the Lotus developers kind of got it to work by making a busy wait loop in the agent to keep it alive after launching the application - but this has the side effect of preventing any other use of Lotus Notes while the application was open, so it's not really an acceptable solution.

Anyone know if what we're trying to do is possible? How to do it? Links to any examples/documentation on this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

趴在窗边数星星i 2024-10-18 03:24:26

一种选择是让 Notes 代理启动 Java 应用程序并允许 Java 应用程序异步运行;然后它可以直接写入 Notes 数据库(使用 Notes Java API)。您可以将客户端配置为与 Notes 客户端共享凭证,因此身份验证不是问题(或者您可以让 Java 应用程序向 Notes 进行身份验证)。 Java API 相当简单 - 它基本上模仿了 LotusScript 中可用的后端类。如果需要将结果写回到特定文档中,可以将 DocumentUniqueID (docid) 从 Notes 代理传递到 Java 应用程序,然后在 Java 应用程序中使用它来写回。 (请参阅Database 类中的GetdocumentByUnid 方法)。

这篇文章有点旧,但我认为仍然有意义:
http://www.ibm.com/developerworks/lotus/library /ls-Java_access_pt1/index.html

One option is to have the Notes agent start the Java app and allow the Java app to run asynchronously; it can then write directly into the Notes database (using the Notes Java API). You can configure the client to share credentials with the Notes client, so authenticating is not an issue (or you can have the Java app authenticate to Notes). The Java API is fairly straightforward - it basically mimics the back-end classes available in LotusScript. If you need to write resuls back into a specific document, you can pass the DocumentUniqueID (docid) to Java app from the Notes agent, and then use that within the Java app to write back. (See the GetdocumentByUnid method in the Database class).

This article is a bit old, but I think still relevant:
http://www.ibm.com/developerworks/lotus/library/ls-Java_access_pt1/index.html

信愁 2024-10-18 03:24:26

您可以通过多种方式将数据恢复到 Lotus Notes 中。我认为最好的选择是使用 Java API 调用 Lotus Notes 并将数据添加回其中。Java API 的一个开源接口可能会让生活变得更轻松,称为 多明戈。否则,请参阅 domino 设计器帮助了解如何使用 Java API。

以下是我在五分钟内能想到的将数据返回 Notes 的所有方法的列表:

  • 使用 COM 或 Java API 调用 Notes 对象和方法 (请参阅 Domino Designer 帮助)
  • 使用 NotesSQL 使用 SQL 命令将数据插入回 Notes。
  • 将 Notes 数据库设置为邮寄数据库并通过电子邮件传递数据
  • 设置计划代理以从指定目录读取数据(让它每两分钟运行一次),并从文件导入数据。
  • 如果您使用 Domino,则可以通过 URL 的查询字符串传递数据并在代理内处理它。

You have a few options to get data back into Lotus Notes. I think the best bet is to use the Java API to call into Lotus Notes and add the data back in. There is an open-source interface to the Java API that might make life easier, called domingo. Otherwise, see the domino designer help on how to use the Java API.

Here is a list of all the ways to get data back into Notes that I can think of in five minutes:

  • use COM or Java API to call Notes objects and methods (see Domino Designer Help).
  • use NotesSQL to INSERT data back into Notes using SQL commands.
  • Setup the Notes database as a mail-in database and pass data via an email
  • Setup a scheduled agent to read from a specified directory (have it run every minute or two), and import the data from a file.
  • If you are using Domino, you can pass data in via a URL's query string and process it within an agent.
不再见 2024-10-18 03:24:26

Lotus Notes 数据库有一个成熟的 Java API。唯一需要注意的是:该 API 是 C 核心的一个薄包装器,并且要求您对 Notes 对象进行垃圾回收的释放。因此,在使用 NotesDocument 后,您需要调用其 .recycle() 方法,否则会耗尽内存。

There is a full fledged Java API for Lotus Notes databases. The only caveat: the API is a thin wrapper around the C core and required that you do the release for garbage collection on the Notes objects. So after using e.g. a NotesDocument you need to call its .recycle() method otherwise you bleed memory.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文