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

Java plugin docu #524

Merged
merged 33 commits into from
Dec 13, 2023
Merged

Java plugin docu #524

merged 33 commits into from
Dec 13, 2023

Conversation

rjayasinghe
Copy link
Contributor

No description provided.

@rjayasinghe rjayasinghe marked this pull request as draft November 7, 2023 15:53
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Linting Errors

  • java/plugin_concept.md:117 Fenced code blocks should have a language specified

Spelling Mistakes

  • ./java/plugin_concept.md:25:12 Unknown word "reuasable"
  • ./java/plugin_concept.md:74:28 Unknown word "indepently"
  • ./java/plugin_concept.md:78:455 Unknown word "addded"
  • ./java/plugin_concept.md:95:98 Unknown word "reigstration"

Generally, for each spelling mistake there are 2 ways to fix it:

  1. Fix the spelling mistake and commit it.
  2. The word is incorrectly reported as misspelled → put the word on the project-words.txt list, located in the root project directory.

java/plugin_concept.md Outdated Show resolved Hide resolved
java/plugin_concept.md Outdated Show resolved Hide resolved
java/plugin_concept.md Outdated Show resolved Hide resolved
java/plugin_concept.md Outdated Show resolved Hide resolved
java/plugin_concept.md Outdated Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Spelling Mistakes

  • ./java/plugin_concept.md:129:380 Unknown word "HCQL"

Generally, for each spelling mistake there are 2 ways to fix it:

  1. Fix the spelling mistake and commit it.
  2. The word is incorrectly reported as misspelled → put the word on the project-words.txt list, located in the root project directory.

java/plugin_concept.md Outdated Show resolved Hide resolved
@rjayasinghe rjayasinghe requested review from dimamost and removed request for beckermarc and BraunMatthias November 15, 2023 07:58
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Spelling Mistakes

  • ./java/plugin_concept.md:25:12 Unknown word "Reuasable"
  • ./java/plugin_concept.md:78:28 Unknown word "indepently"
  • ./java/plugin_concept.md:84:132 Unknown word "addded"
  • ./java/plugin_concept.md:101:98 Unknown word "reigstration"
  • ./java/plugin_concept.md:137:380 Unknown word "HCQL"

Generally, for each spelling mistake there are 2 ways to fix it:

  1. Fix the spelling mistake and commit it.
  2. The word is incorrectly reported as misspelled → put the word on the project-words.txt list, located in the root project directory.

java/plugin_concept.md Outdated Show resolved Hide resolved
java/plugin_concept.md Outdated Show resolved Hide resolved
java/plugin_concept.md Outdated Show resolved Hide resolved
java/plugin_concept.md Outdated Show resolved Hide resolved
java/plugin_concept.md Outdated Show resolved Hide resolved
java/plugin_concept.md Outdated Show resolved Hide resolved
java/plugin_concept.md Outdated Show resolved Hide resolved
rjayasinghe and others added 5 commits November 21, 2023 16:59
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Spelling Mistakes

  • ./java/plugin_concept.md:84:128 Unknown word "addded"

Generally, for each spelling mistake there are 2 ways to fix it:

  1. Fix the spelling mistake and commit it.
  2. The word is incorrectly reported as misspelled → put the word on the project-words.txt list, located in the root project directory.

java/plugin_concept.md Outdated Show resolved Hide resolved
@rjayasinghe rjayasinghe marked this pull request as ready for review November 21, 2023 16:07
Copy link
Contributor

@beckermarc beckermarc left a comment

Choose a reason for hiding this comment

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

Some additional comments from my side :)

java/plugin_concept.md Outdated Show resolved Hide resolved
java/plugin_concept.md Outdated Show resolved Hide resolved
java/plugin_concept.md Outdated Show resolved Hide resolved
java/plugin_concept.md Outdated Show resolved Hide resolved
java/plugin_concept.md Outdated Show resolved Hide resolved
t-bonk
t-bonk previously requested changes Nov 27, 2023
Copy link
Contributor

@t-bonk t-bonk left a comment

Choose a reason for hiding this comment

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

Please add a remark, that the groupId com.sap.cds shall not be used by 3rd party plugins, adapters etc.

github-actions[bot]

This comment was marked as resolved.

github-actions[bot]

This comment was marked as outdated.

@rjayasinghe
Copy link
Contributor Author

Please add a remark, that the groupId com.sap.cds shall not be used by 3rd party plugins, adapters etc.

fixed!

@rjayasinghe
Copy link
Contributor Author

Please add a remark, that the groupId com.sap.cds shall not be used by 3rd party plugins, adapters etc.

I added a section for that.

Copy link
Contributor

@t-bonk t-bonk left a comment

Choose a reason for hiding this comment

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

LGTM

@renejeglinsky
Copy link
Contributor

Should I rename the file from plugin-concept to just plugins? Or sth else?


### Reference the Reuse Model in an Existing CAP Java Project

Projects wanting to import the content simply add a Maven dependency to the reuse package to their `pom.xml` in the `<dependencies>` section.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it the parent pom in this case?

Suggested change
Projects wanting to import the content simply add a Maven dependency to the reuse package to their `pom.xml` in the `<dependencies>` section.
Projects wanting to import the content simply add a Maven dependency to the reuse package to their `./pom.xml` in the `<dependencies>` section.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It‘s the srv/pom.xml

Copy link
Contributor

Choose a reason for hiding this comment

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

Do I consume that, until this point locally? If yes, I guess the location of the new artifact is in parallel to my CAP project, as it is also for Node.js, right?
Or do we need a "Publish to Maven" step in between this and the previous step?

</executions>
</plugin>
```
> Please be ware that the module that uses the reuse module needs to be a Maven module itself or a submodule to a Maven module that declares the dependency to the Maven module. Usually you would declare the dependency in the `srv` module of your CAP Java project and use the reuse model in the service's CDS files then. In case you want to use the reuse model in your `db` module you need to make sure that your `db` module is a Maven module and include it to the project's parent `pom.xml` file.
Copy link
Contributor

@renejeglinsky renejeglinsky Dec 11, 2023

Choose a reason for hiding this comment

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

How do I declare the dependency? In the srv/pom.xml?

Suggested change
> Please be ware that the module that uses the reuse module needs to be a Maven module itself or a submodule to a Maven module that declares the dependency to the Maven module. Usually you would declare the dependency in the `srv` module of your CAP Java project and use the reuse model in the service's CDS files then. In case you want to use the reuse model in your `db` module you need to make sure that your `db` module is a Maven module and include it to the project's parent `pom.xml` file.
> Please be aware that the module that uses the reuse module needs to be a Maven module itself or a submodule to a Maven module that declares the dependency to the Maven module. Usually you would declare the dependency in the _srv/pom.xml_ of your CAP Java project and use the reuse model in the service's CDS files then. In case you want to use the reuse model in your `db` module you need to make sure that there's a _db/pom.xml_ in your _db_ folder to declare as a Maven module and include this module then to the project's parent `pom.xml` file.


## Custom Protocol Adapters {#protocol-adapter}

In CAP Java, the protocol adapter is the mechanism to implement inbound communication (another service or the UI) to the CAP service in development. The task of a protocol adapter is to translate any incoming requests of a defined protocol to CQL statements that then can be executed on locally defined CDS services. CAP Java comes with 3 protocol adapters (OData V2 and V4, and HCQL) but can be extended with custom implementations. In this section we'll have a deeper look on how such a protocol adapter can be built and registered with the CAP Java runtime.
Copy link
Contributor

Choose a reason for hiding this comment

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

How about shortening this intro and link to https://cap.cloud.sap/docs/java/architecture#protocol-adapters? This chapter about protocol adapters would need an update then, I guess?

@renejeglinsky
Copy link
Contributor

Will merge this and go over some points with Robin later.

@renejeglinsky renejeglinsky merged commit 31e8b5a into main Dec 13, 2023
4 checks passed
@renejeglinsky renejeglinsky deleted the java_plugin_docu branch December 13, 2023 09:56
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.

5 participants