Iterator i = targets.iterator();
//TODO : remove all the three while loops and
//convert to a 2 loop - Venu
while (i.hasNext()) {
EncryptionTarget target = (EncryptionTarget)i.next();
boolean contentOnly = target.getContentOnly();
Boolean cOnly = Boolean.valueOf(contentOnly);
if(MessageConstants.PROCESS_ALL_ATTACHMENTS.equals(target.getValue())){
Iterator itr = secureMsg.getAttachments();
while(itr.hasNext()){
AttachmentPart ap = (AttachmentPart)itr.next();
Object[] s = new Object[2];
s[0] = ap;
s[1] = cOnly;
_aparts.add(s);
}
continue;
}
Object mgpart = secureMsg.getMessageParts(target);
//Change this to context.
//TODO :: Venu
ArrayList transforms = target.getCipherReferenceTransforms();
if(mgpart == null){
continue;
} else if (mgpart instanceof AttachmentPart) {
Object[] s = new Object[2];
s[0] = mgpart;