private void setStatus(boolean success) throws ServiceException {
   Date now = new Date();
   DataSource ds = getDataSource();
   Map<String, Object> attrs = new HashMap<String, Object>();
   String attr =
       success
           ? Provisioning.A_zimbraGalLastSuccessfulSyncTimestamp
           : Provisioning.A_zimbraGalLastFailedSyncTimestamp;
   attrs.put(attr, DateUtil.toGeneralizedTime(now));
   Provisioning.getInstance().modifyDataSource(ds.getAccount(), ds.getId(), attrs);
 }
示例#2
0
 public GalSearchParams(DataSource ds) throws ServiceException {
   this(ds.getAccount());
   mDataSource = ds;
   mConfig = GalSearchConfig.create(mDataSource);
 }