// initialize payload container
DeploymentPayload deploymentPayload = new DeploymentPayload(model.getProject(), deployResources);
deploymentPayload.setDestinationOrgUsername(destinationProject.getUserName());
monitorCheckSubTask(monitor, "Getting connection to destination organization...");
Connection connection = ContainerDelegate.getInstance().getFactoryLocator().getConnectionFactory().getConnection(destinationProject);
monitorWork(monitor);
monitorCheckSubTask(monitor, "Getting permissible object types for destination organization...");
String[] enabledComponentTypes = ContainerDelegate.getInstance().getServiceLocator().getMetadataService().getEnabledComponentTypes(connection, true, true);
if (Utils.isEmpty(enabledComponentTypes)) {
logger.warn("No object types are enabled for " + connection.getLogDisplay());
return deploymentPayload;
}
monitorWork(monitor);
List<String> remoteEnabledComponentTypes = new ArrayList<String>(enabledComponentTypes.length);