Out of Office Agent Lotus Domino

怎甘沉沦 提交于 2020-01-17 04:49:10

问题


I need to Change Subject Of Out Of Office Message through Java. At the same time I wish to enable Out of Office through java. I tried something by myself like this :

Document dc = db.getProfileDocument("OutOfOfficeProfile", s.getUserName());
Vector vc = dc.getItems();
for(int i=0;i<vc.size();i++){
  Item it = (Item) vc.get(i);
  System.out.println(it.toString()+":::::::>>>>>>"
                   + dc.getItemValueString(it.toString()));
}

I got the Item names as :

$Name:::::::>>>>>>$profile_018outofofficeprofile_cn=sachin jain/o=tcsapp 
$UpdatedBy:::::::>>>>>>CN=Sachin Jain/O=TCSAPP
$NoPurge:::::::>>>>>> 
$ConflictAction:::::::>>>>>>2

I had searched for it a lot. I came across OutOfOffice Agent though Domino Designer. But I don't know how I can change the Subject and Body Of OOO Message and how can I enable it through Java?


回答1:


The OutOfOfficeProfile profile document contains all necessary data for the OutOfOffice agent to run. So if you change data in this profile document, the changes will be reflected when the OutOfOffice agent runs.

I suggest that you look at the OutOfOffice agent and see what fields it uses - and thereby what fields you need to modify to change the subject for the Out Of Office mail. A quick look in the agent tells me that the field GeneralSubject is used for the general OoO messages while the field SpecialSubject is used for the special OoO messages.

With Java you can change the profile data using the Document class (as you have alrady started to use). Remember to call dc.Save() when you change the NotesDocument fields.

With Java you can enable the agent using the Agent class and agent.setEnabled(true);.

Look in the Domino Designer Help database for more information on the classes, properties and methods.



来源:https://stackoverflow.com/questions/9126965/out-of-office-agent-lotus-domino

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!