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

Introduce @ff.reintroduce and @Reintroduce #131

Merged
merged 11 commits into from
Sep 1, 2022

Conversation

mhdirkse
Copy link
Contributor

No description provided.

@mhdirkse
Copy link
Contributor Author

mhdirkse commented Jul 18, 2022

TODO:

  • Apply @ff.reintroduce as intended by the issue. Check the XSD and the JSON.
  • Update FRANKDOC.md in the F!F and README.md in the Frank!Doc.

@mhdirkse mhdirkse linked an issue Jul 18, 2022 that may be closed by this pull request
@mhdirkse
Copy link
Contributor Author

This is how the Frank!Doc webapp becomes for page SenderPipe. Inheritance is shown:
image

@mhdirkse
Copy link
Contributor Author

And this is how the XSD will be become for SenderPipe:

  <xs:group name="SenderPipeDeclaredChildGroup">
    <xs:sequence>
      <xs:group ref="MessageLogElementGroup" minOccurs="0" maxOccurs="1" />
      <xs:group ref="InputWrapperElementGroup" minOccurs="0" maxOccurs="1" />
      <xs:group ref="InputValidatorElementGroup" minOccurs="0" maxOccurs="1" />
      <xs:group ref="SenderElementGroup" minOccurs="1" maxOccurs="1" />
      <xs:group ref="ListenerElementGroup_2" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:group>
  <xs:group name="SenderPipeCumulativeChildGroup">
    <xs:sequence>
      <xs:group ref="SenderPipeDeclaredChildGroup" />
      <xs:group ref="OutputValidatorElementGroup" minOccurs="0" maxOccurs="1" />
      <xs:group ref="OutputWrapperElementGroup" minOccurs="0" maxOccurs="1" />
      <xs:group ref="AbstractPipeDeclaredChildGroup" />
    </xs:sequence>
  </xs:group>

@mhdirkse
Copy link
Contributor Author

To use the @Reintroduce annotation, please merge the following F!F PR: frankframework/frankframework#3529

@ricardovh
Copy link
Contributor

The webapp page does not look correct, the SenderPipe has messageLog, inputWrapper, inputValidator, sender, listener but no outputValidator and outputWrapper.

I also think that it will confuse people if nested elements are repeated on the page, now the SenderPipe has a list of nested elements, and the MessageSendingPipe from which it inherits has a different list of nested elements. If I look at it as a Frank!Developer, I should not have to care about inheritance, I just want to know for an element which nested elements, attributes and parameters I can set, and ideally each list should be together and only once on the page, but your current print screen makes it look like it will be all over the page with this PR.

@mhdirkse
Copy link
Contributor Author

I had a phone call with @nielsm5. We decided that we will ignore @Reintroduce for the JSON. This will address Ricardo's comment. The @Reintroduce annotation will still have its effect on the XSDs.

@mhdirkse mhdirkse marked this pull request as ready for review August 1, 2022 13:41
@gvanbrakel
Copy link

I agree with @ricardovh that the screen shot above is confusing for developers, BUT this is in the 'show inheritance' view. The default 'hide inheritance' view is what the developer normally wants to see. There the child elements should be displayed in the right order.
To enable this, a reintroduced-attribute must be added to the json for the attributes and config-childs that have the annotation.

@mhdirkse
Copy link
Contributor Author

mhdirkse commented Aug 8, 2022

Ik heb Gerrit's opmerking verwerkt.

@mhdirkse mhdirkse marked this pull request as draft August 8, 2022 13:51
@mhdirkse
Copy link
Contributor Author

mhdirkse commented Aug 8, 2022

ElementChild may be improved by merging isReintroduced tests with technical override. I will try it out.

@mhdirkse mhdirkse marked this pull request as ready for review August 8, 2022 14:00
src/test/java/nl/nn/adapterframework/doc/Reintroduce.java Outdated Show resolved Hide resolved
@@ -272,3 +272,7 @@ The default value is `nl.nn.adapterframework.pipes.SenderPipe` in this example.
**@Optional:** Java annotation that does the same as JavaDoc tag `@ff.optional`.

**@ff.tag:** Add tag to Java class that is shown in the Frank!Doc webapplication. Add the `@ff.tag` JavaDoc tag in the JavaDoc comment above a class. There are two arguments. The first argument is the tag name and the second argument is the tag value.

**@Reintroduce:** Java annotation meant to change the order of config children or attributes in the XSD. The default order is that inherited element children go after declared element children. To have a different order, override an inherited config child setter or attribute setter and add this annotation. The inherited element child is then sorted with the declared element children. Please note that an inherited element child is also sorted with the declared element children if the setter is overridden with a new JavaDoc comment. This annotation is needed if and only if the only modification of the element child is the sort order.

Choose a reason for hiding this comment

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

het sorteren van attributen en config-children is iets interns van de FrankDoc code. Voor de gebruiker is het de volgorde waar in de elementen getoond worden.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nu snap ik het punt. Ik heb je voorgestelde verandering gecommit. De tekst die hier gewijzigd wordt is test code; een kopie van de @Reintroduce annotatie die nodig is voor de unit tests. Ik zal kijken of deze verandering ook toegepast kan worden op het origineel in het iaf project.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ik heb dit naar het iaf project gekopiëerd maar daarna zag ik geen wijziging in de @Reintroduce Java class. Blijkbaar stond de voorgestelde tekst daar al.

Co-authored-by: Gerrit van Brakel <g.vanbrakel@flux-it.nl>
@gvanbrakel gvanbrakel merged commit 35972a5 into frankframework:master Sep 1, 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.

Nested element order should be according to method order
3 participants