/** * Construct the AckDistributionEnvelope as an acknowledgment to the given * DistributionEnvelope. */ public AckDistributionEnvelope(DistributionEnvelope d) : base() { Address[] a = new Address[1]; a[0] = d.getSender(); setTo(a); String id = null; String snd = null; try { Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); id = config.AppSettings.Settings[AUDIT_ID_PROPERTY].Value; snd = config.AppSettings.Settings[SENDER_PROPERTY].Value; } catch (Exception e) { throw new DistributionEnvelopeException("SYST-0000", "Configuration manager exception", e.ToString()); } Address sndr = new Address(snd); Identity[] auditId = new Identity[1]; auditId[0] = new Identity(id); setAudit(auditId); setSender(sndr); setService(SERVICE); setTrackingId(d.getTrackingId()); serviceRef = d.getService(); }
/** * Called by the DistributionEnvelopeHelper to set the audit identity list * after it has been parsed out of the received DistributionEnvelope * XML. * * @param t[] Audit Identity instances. */ internal void setAudit(Identity[] id) { if (id == null) { return; } for (int i = 0; i < id.Length; i++) { identities.Add(id[i]); } }
private Entity makeEntity(bool addr, String[] f) { Entity e = null; if (addr) { if (f[1].Length > 0) { e = new Address(f[2], f[1]); } else { e = new Address(f[2]); } } else { if (f[1].Length > 0) { e = new Identity(f[2], f[1]); } else { e = new Identity(f[2]); } } return e; }
/** * Used by senders to add sender identities. Any identity type may * be entered, described by the appropriate OID. Where the OID is * null, the default "ITK identity" is supplied. * * @param oid OID for the identity type, or null * @param id Address */ public void addIdentity(String oid, String id) { Identity ident = null; if (oid == null) { ident = new Identity(id); } else { ident = new Identity(id, oid); } identities.Add(ident); }