for (String recipient : shoutAttachmentPanel.getRecipients()) {
entry.addRecipient(atomFactory.reply(null, recipient, null, null));
}
// setup access control
AclRule rule = service.getAclFactory().aclRule();
rule.addAction(service.getAclFactory().aclAction(AclAction.ACTION_VIEW,
AclAction.PERMISSION_GRANT));
// check privacy settings
String visibilityValue = privacyAttachmentPanel.getPrivacyValue();
if (visibilityValue.equals(uiText.Everyone())) {
rule.addSubject(service.getAclFactory().aclSubject(null,
AclSubject.EVERYONE));
} else {
rule.addSubject(service.getAclFactory().aclSubject(visibilityValue,
AclSubject.GROUP));
}
entry.addAclRule(rule);
// we got everything we need -> clean up UI