public void copy() throws Exception {
LOGGER.log(Level.INFO, "Starting synchronization from ArcGIS Server "+source.getRestUrl()+" into Portal for ArcGIS "+destination.getConnection().getHost());
RequestContext requestContext = RequestContext.extract(null);
try {
ArcGISQueryBuilder qb = new ArcGISQueryBuilder(new IterationContext() {
@Override
public void onIterationException(Exception ex) {
LOGGER.log(Level.SEVERE, "Error iterating through AGS resources.", ex);
}
}, source);