示例#1
0
 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());
   }
 }
示例#2
0
  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;
  }