});
MenuItem storeAnnotationsItems = new MenuItem("Store annotations");
storeAnnotationsItems.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent actionEvent) {
PrivateDataManager privateDataManager = xmppSession.getExtensionManager(PrivateDataManager.class);
try {
List<Annotation.Note> notes = new ArrayList<>();
notes.add(new Annotation.Note("Hallo", item.contact.get().getJid()));
privateDataManager.storeData(new Annotation(notes));
} catch (XmppException e) {
e.printStackTrace();
}
}
});
MenuItem getAnnotationsItems = new MenuItem("Get annotations");
getAnnotationsItems.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent actionEvent) {
PrivateDataManager privateDataManager = xmppSession.getExtensionManager(PrivateDataManager.class);
try {
Annotation annotations = privateDataManager.getData(Annotation.class);
int i = 0;
} catch (XmppException e) {
e.printStackTrace();
}
}