static void doCos(Account acct, Element response) throws ServiceException { Cos cos = Provisioning.getInstance().getCOS(acct); if (cos != null) { Element eCos = response.addUniqueElement(AdminConstants.E_COS); eCos.addAttribute(AdminConstants.A_ID, cos.getId()); eCos.addAttribute(AdminConstants.A_NAME, cos.getName()); } }
private Account createAccount() throws Exception { Domain domain = getDomain(); Cos cos = getCos(); HashMap<String, Object> attrs = new HashMap<String, Object>(); attrs.put(Provisioning.A_zimbraCOSId, cos.getId()); Account acct = prov.createAccount(ACCT_EMAIL, PASSWORD, attrs); assertNotNull(acct); return acct; }