-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ea 3712 zoho sync addon #19
base: master
Are you sure you want to change the base?
Conversation
(...) and an empty message aborts the commit.
private static final String ACCOUNTS = "Accounts"; | ||
|
||
|
||
public String ZohoBulkCreateJob(String moduleAPIName) throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method can be divided into smaller parts
|
||
} else if (actionResponse instanceof APIException) { | ||
APIException exception = (APIException) actionResponse; | ||
LOG.error("Status: " + exception.getStatus().getValue()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar logging present in the else if block below which can be extracted in method
private static final Logger LOG = Logger.getLogger(ZohoBatchDownload.class); | ||
private static final String COMPLETED = "COMPLETED"; | ||
|
||
public String downloadResult(Long jobId) throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method can be divided into smaller units to reduce the complexity and also multiple if blocks can be combined .
return ""; | ||
} | ||
|
||
public static String unZipFile(String pathToZipFile) throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method can be divided into smaller units of each task and reduce the complexity
return ""; | ||
} | ||
if (response.isExpected()) { | ||
ResponseHandler responseHandler = response.getObject(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here as well we can have code extracted in smaller method to reduce complexity and to segregate tasks
Covers tickets https://europeana.atlassian.net/browse/EA-3711 & https://europeana.atlassian.net/browse/EA-3712