public void duplicateEnvironment(String id) throws NotesException, IOException {
Document d = ExtLibUtil.getCurrentDatabase().getDocumentByID(id);
Document newDoc = ExtLibUtil.getCurrentDatabase().createDocument();
d.replaceItemValue("name", StringUtil.format("Copy of {0}", d.getItemValueString("Name")));
d.copyAllItems(newDoc, true);
newDoc.save();
}
public void copyEnvironment(DominoDocument doc, String name) throws NotesException, IOException {
View v = ExtLibUtil.getCurrentDatabase().getView("AllEnvironments");
ViewEntry ve = v.getEntryByKey(name);
if(ve!=null) {