-
Notifications
You must be signed in to change notification settings - Fork 1
Ea 3584 new zoho update #279
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
Conversation
| performDeprecation(zohoSyncReport, operation); | ||
| } | ||
| else { | ||
| logger.debug( |
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.
this should be logged with info level
| // deprecate | ||
| performDeprecation(zohoSyncReport, operation); | ||
| // deprecate if not already deprecated | ||
| if(! operation.getEntityRecord().isDisabled()) { |
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.
should change to condition to avoid using the ! operation (likely to be indicated in the code quality checks as well)
| BatchOperations operations, String zohoId, Record zohoOrg, EntityRecord entityRecord) { | ||
|
|
||
| String entityId = EntityRecordUtils.buildEntityIdUri(EntityTypes.Organization, zohoId); | ||
|
|
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.
The use of the buildEntityIdUri method needs to be replaced, as the value is now taken from the "Europeana ID" field
| } | ||
| } else { | ||
| //even though there must be a Europeana_ID here, we check it to avoid strange zoho entries | ||
| } else if(Europeana_ID != null) { |
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 we have to first check if the EuropeanaID is null, if so, the records does not exists and a create operation needs to be instantiated
| //even though there must be a Europeana_ID here, we check it to avoid strange zoho entries | ||
| } else if(Europeana_ID != null) { | ||
| // entity record not null, update or deletion | ||
| if (!hasDpsOwner || markedForDeletion) { |
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.
this part needs to be separated, marked for deletion must be own else if statement implementing the requirements:
Check if the “Scheduled for deletion field”
If marked and no value is indicated in the “Europeana ID” field
Do nothing (ignore the entry)
If marked and the “Europeana ID” is not empty
Mark as deprecated in the API (if it isn't already) and apply an update workflow
| } | ||
|
|
||
| List<String> entitiesToUpdate = performEntityRegistration(createOperations, zohoSyncReport); | ||
|
|
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.
performEntityRegistration for the individual entities needs to be updated, and the code that beuild the EntityId based on ZohoId needs to be removed. Instead the identifier needs to be generated as for the other entities using the sequence. The update of ZohoRecord with the EuropeanaID needs to be invoked during the creation, before saving the EntityRecord into the database
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.
see requirements:
Creation workflow:
generate a new Europeana identifier using the same approach as for other entities (sequential)
Set the value of the new “Europeana ID” field in Zoho with the newly generated identifier for the entity
Keep the Zoho URL as ID of the Zoho Proxy (as it is currently done)
Update the entity data
No description provided.