@Test public void testBadLogin() { final PartnerConnection badConn = getConnectionBundle(USER, PASSWORD + "x").getPartnerConnection(); try { badConn.getServerTimestamp(); fail(); } catch (ApiException e) { assertEquals("Bad credentials for user '" + USER + "'", e.getMessage()); assertEquals(USER, e.getUsername()); assertEquals(ExceptionCode.INVALID___LOGIN, e.getApiFaultCode()); assertEquals("Invalid username, password, security token; or user locked out.", e.getApiFaultMessage()); assertEquals(e.getClass().getName() + ": " + e.getMessage() + " {username='" + e.getUsername() + "', faultCode=" + e.getApiFaultCode().value() + ", faultMessage='" + e.getApiFaultMessage() + "', row=null, column=null}", e.toString()); } }
@Nonnull @Override public synchronized DateTime getServerTimestamp() throws ApiException { logger.entry(); GetServerTimestamp param = new GetServerTimestamp(); GetServerTimestampResponse response; GetServerTimestampOp op = this.new GetServerTimestampOp(); response = op.execute(param); GetServerTimestampResultType result = response.getResult(); XMLGregorianCalendar serverTime = result.getTimestamp(); DateTime time = ApiUtils.convertSFTimeToDateTime(serverTime); logger.exit(time); return time; }
PartnerConnectionImpl extends AbstractSalesforceConnection implements PartnerConnection { @Nonnull @Override public synchronized DateTime getServerTimestamp() throws ApiException { logger.entry(); GetServerTimestamp param = new GetServerTimestamp(); GetServerTimestampResponse response; GetServerTimestampOp op = this.new GetServerTimestampOp(); response = op.execute(param); GetServerTimestampResultType result = response.getResult(); XMLGregorianCalendar serverTime = result.getTimestamp(); DateTime time = ApiUtils.convertSFTimeToDateTime(serverTime); logger.exit(time); return time; } }
PartnerConnectionImpl extends AbstractSalesforceConnection implements PartnerConnection { @Nonnull @Override public synchronized DateTime getServerTimestamp() throws ApiException { logger.entry(); GetServerTimestamp param = new GetServerTimestamp(); GetServerTimestampResponse response; GetServerTimestampOp op = this.new GetServerTimestampOp(); response = op.execute(param); GetServerTimestampResultType result = response.getResult(); XMLGregorianCalendar serverTime = result.getTimestamp(); DateTime time = ApiUtils.convertSFTimeToDateTime(serverTime); logger.exit(time); return time; } private  PartnerConnectionImpl(@Nonnull CallSemaphore semaphore, @Nonnull ConnectionBundleImpl bundle,
            MetricRegistry metricRegistry); }
PartnerConnectionImpl extends AbstractSalesforceConnection implements PartnerConnection { @Nonnull @Override public synchronized DateTime getServerTimestamp() throws ApiException { logger.entry(); GetServerTimestamp param = new GetServerTimestamp(); GetServerTimestampResponse response; GetServerTimestampOp op = this.new GetServerTimestampOp(); response = op.execute(param); GetServerTimestampResultType result = response.getResult(); XMLGregorianCalendar serverTime = result.getTimestamp(); DateTime time = ApiUtils.convertSFTimeToDateTime(serverTime); logger.exit(time); return time; } private  PartnerConnectionImpl(@Nonnull CallSemaphore semaphore, @Nonnull ConnectionBundleImpl bundle,
            MetricRegistry metricRegistry); @Override synchronized int count(@Nonnull String sObjectType, @Nonnull String condition); @Override synchronized int count(@Nonnull String sObjectType); @Override synchronized int countAll(@Nonnull String sObjectType, @Nonnull String condition); @Override synchronized int countAll(@Nonnull String sObjectType); @Nonnull @Override synchronized List<SaveResult> create(@Nonnull List<SObject> sObjects); @Nonnull @Override synchronized List<DeleteResult> delete(@Nonnull List<Id> ids); @Nonnull @Override synchronized DescribeGlobalResult describeGlobal(); @Nonnull @Override synchronized SObjectDescription describeSObject(@Nonnull String sObjectType); @Nonnull @Override synchronized List<SObjectDescription> describeSObjects(@Nonnull List<String> sObjectTypes); @Nonnull @Override synchronized List<EmptyRecycleBinResult> emptyRecycleBin(@Nonnull List<Id> ids); @Nonnull @Override synchronized DateTime getServerTimestamp(); @Nonnull @Override synchronized UserInfo getUserInfo(); @Nonnull @Override synchronized PartnerQueryResult query(@Nonnull String queryStr); @Nonnull @Override synchronized PartnerQueryResult queryAll(@Nonnull String queryStr); @Nonnull @Override synchronized PartnerQueryResult queryMore(@Nonnull PartnerQueryLocator locator); @Nonnull @Override synchronized List<SObject> retrieve(@Nonnull String sObjectType, @Nonnull List<Id> ids,
            @Nonnull List<String> fieldList); @Nonnull @Override synchronized Map<Id, SObject> retrieveExtended(@Nonnull String sObjectType, @Nonnull List<Id> ids,
            @Nonnull List<String> fields,
            int maxFieldNameChunkSize); @Nonnull @Override synchronized List<UndeleteResult> undelete(@Nonnull List<Id> ids); @Nonnull @Override synchronized List<SaveResult> update(@Nonnull List<SObject> sObjects); @Nonnull @Override synchronized List<UpsertResult> upsert(@Nonnull String externalIdFieldName, @Nonnull List<SObject> sObjects); }
PartnerConnectionImpl extends AbstractSalesforceConnection implements PartnerConnection { @Nonnull @Override public synchronized DateTime getServerTimestamp() throws ApiException { logger.entry(); GetServerTimestamp param = new GetServerTimestamp(); GetServerTimestampResponse response; GetServerTimestampOp op = this.new GetServerTimestampOp(); response = op.execute(param); GetServerTimestampResultType result = response.getResult(); XMLGregorianCalendar serverTime = result.getTimestamp(); DateTime time = ApiUtils.convertSFTimeToDateTime(serverTime); logger.exit(time); return time; } private  PartnerConnectionImpl(@Nonnull CallSemaphore semaphore, @Nonnull ConnectionBundleImpl bundle,
            MetricRegistry metricRegistry); @Override synchronized int count(@Nonnull String sObjectType, @Nonnull String condition); @Override synchronized int count(@Nonnull String sObjectType); @Override synchronized int countAll(@Nonnull String sObjectType, @Nonnull String condition); @Override synchronized int countAll(@Nonnull String sObjectType); @Nonnull @Override synchronized List<SaveResult> create(@Nonnull List<SObject> sObjects); @Nonnull @Override synchronized List<DeleteResult> delete(@Nonnull List<Id> ids); @Nonnull @Override synchronized DescribeGlobalResult describeGlobal(); @Nonnull @Override synchronized SObjectDescription describeSObject(@Nonnull String sObjectType); @Nonnull @Override synchronized List<SObjectDescription> describeSObjects(@Nonnull List<String> sObjectTypes); @Nonnull @Override synchronized List<EmptyRecycleBinResult> emptyRecycleBin(@Nonnull List<Id> ids); @Nonnull @Override synchronized DateTime getServerTimestamp(); @Nonnull @Override synchronized UserInfo getUserInfo(); @Nonnull @Override synchronized PartnerQueryResult query(@Nonnull String queryStr); @Nonnull @Override synchronized PartnerQueryResult queryAll(@Nonnull String queryStr); @Nonnull @Override synchronized PartnerQueryResult queryMore(@Nonnull PartnerQueryLocator locator); @Nonnull @Override synchronized List<SObject> retrieve(@Nonnull String sObjectType, @Nonnull List<Id> ids,
            @Nonnull List<String> fieldList); @Nonnull @Override synchronized Map<Id, SObject> retrieveExtended(@Nonnull String sObjectType, @Nonnull List<Id> ids,
            @Nonnull List<String> fields,
            int maxFieldNameChunkSize); @Nonnull @Override synchronized List<UndeleteResult> undelete(@Nonnull List<Id> ids); @Nonnull @Override synchronized List<SaveResult> update(@Nonnull List<SObject> sObjects); @Nonnull @Override synchronized List<UpsertResult> upsert(@Nonnull String externalIdFieldName, @Nonnull List<SObject> sObjects);  }