davsclaus opened a new pull request, #30972:
URL: https://github.com/apache/camel/pull/30972

   # Description
   
   Part of [CAMEL-23832](https://issues.apache.org/jira/browse/CAMEL-23832). 
The umbrella ticket stays open.
   
   ## Summary
   
   This PR rewrites the component description and 3 option texts of `cron`: 1 
component option (`cronService`) and 2
   endpoint options (`name`, `schedule`). The component has no headers.
   
   - The component description said "A generic interface for ..."; it now says 
what the component does and names the
     cron implementations (camel-quartz, camel-spring).
   - `cronService` said "the id of the CamelCronService". The code looks it up 
as a bean name in the registry, not by the
     id of the service (`quartz`, `spring`). The text now says this and how the 
service is found when the option is not
     set: the only `CamelCronService` in the registry, or else the one that a 
module on the classpath provides.
   - `schedule` now gives the five to seven parts, that a five-part expression 
has no seconds and follows the Unix cron
     syntax, and that a `+` in the value is read as a space.
   - `name` now says that camel-quartz uses it as the (unique) name of the 
Quartz trigger, and that `group/name` also sets
     the trigger group.
   
   Sources: the Camel code of camel-cron, `CamelQuartzCronService` 
(camel-quartz) and `CamelSpringCronService`
   (camel-spring).
   
   ### Found, not changed
   
   - `cronService`: when it is set but no bean of that name is in the registry, 
the component does not fail; it falls back
     to the service found on the classpath, without a warning.
   - `cronService`: the `getId()` of a `CamelCronService` (`quartz`, `spring`) 
is not used for the lookup, so
     `cronService=quartz` only works if a bean is bound under that name. With 
both camel-quartz and camel-spring on the
     classpath and no bean bound, the first 
`META-INF/services/org/apache/camel/cron/cron-service` found wins.
   - `schedule`: the component accepts a seven-part expression (with a year), 
but the spring cron service passes it on to
     Spring's `CronExpression`, which accepts only six fields, so a year works 
only with camel-quartz.
   
   ## Tests
   
   - There is no new test, as only description text changes.
   - A script compared the component JSON with the parent commit: only 
`description` fields changed (4 texts).
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [x] I ran the formatter and built the module, then regenerated the catalog 
copy, `dsl/camel-endpointdsl` and `dsl/camel-componentdsl`, and committed all 
generated changes.
   
   # AI-assisted contributions
   
   - [x] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to