Skip to content
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

feat(jans-core): port Gluu ORM-based document store #2506 #2581

Merged
merged 3 commits into from
Oct 11, 2022

Conversation

shekhar16
Copy link
Contributor

@shekhar16 shekhar16 commented Oct 10, 2022

feat(jans-core): port Gluu ORM-based document store #2506

Signed-off-by: shekhar16 <shekharlaad1609@gmail.com>
return false;
}
} catch (Exception e) {
log.error("Failed to rename to destination file '{}'", destinationDisplayName);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something is wrong here. In case of exception, we got further in line 187 and return true even if it's not renamed.
Also we should log exception for easier troubleshooting.

oxDocument.setOxModuleProperty(moduleList);
documentService.addOxDocument(oxDocument);
return true;
} catch (IOException e) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IOException is redundant because it has exactly same statements as super Exception.

@DataEntry(sortBy = { "displayName" })
@ObjectClass(value = "oxDocument")
@JsonInclude(Include.NON_NULL)
public class OxDocument extends Entry implements Serializable {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In jans we removed ox prefix. It's replace with jans prefix instead.
Lets rename OxDocument with just Document. It's inside document.store.service package so it's clear to what functionality it belongs. Object Class can be renamed oxDocument -> jansDocument. Please add changes in jans_schema.json. It seems to be missed in this PR.

private List<String> oxModuleProperty;

@AttributeName
private String oxLevel;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This attribute is not present in jans. As well as other attributes refixed here as ox*. It must be changed. Please check existing schema in jans_schema.json. Lets re-use existing attributes.

"names": [
"jansDocument"
],
"oid": "oxObjectClass",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jansObjClass instead of oxObjectClass?

"jansLevel",
"jansRevision",
"jansEnabled",
"jansAlias"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great to use spaces instead of tabs all over this PR. Otherwise you can see how github represents changes in weird way.

@yuriyz yuriyz merged commit b61df80 into JanssenProject:main Oct 11, 2022
@shekhar16 shekhar16 changed the title feat(jans-core): port Gluu ORM-based document store feat(jans-core): port Gluu ORM-based document store #2506 Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants