Class VersionResource
java.lang.Object
org.apache.juneau.rest.server.servlet.RestResource
org.apache.juneau.rest.server.convention.VersionResource
Child-resource flavor of the
VersionMixin version/build-metadata capability.
Mounts as a routed child via @Rest(children=VersionResource.class)
under a parent at the subtree /version and serves the same deployment-introspection JSON map
as the mixin by delegating to a shared flavor-neutral VersionProvider worker bean — so the forms
cannot drift.
Whereas the VersionMixin mixin pins its op at /version for composition into a host at
/, this child declares the subtree at the class level
(@Rest(path="/version")) and pins the op at /*.
See Also:
- Since:
- 10.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.juneau.rest.server.servlet.RestResource
RestResource.Builder<R extends RestResource,SELF extends RestResource.Builder<R, SELF>>, RestResource.DefaultBuilder<R extends RestResource> -
Constructor Summary
ConstructorsModifierConstructorDescriptionNo-arg constructor — uses a defaultVersionProviderworker.protectedVersionResource(VersionProvider worker) Worker constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidgetInfo(RestResponse res) [GET /*] — emit the assembled metadata as a JSON map.Methods inherited from class org.apache.juneau.rest.server.servlet.RestResource
builder, doLog, getContext, getPaths, getRequest, getResponse, getRestBuilder, log, log, setContext
-
Constructor Details
-
VersionResource
public VersionResource()No-arg constructor — uses a defaultVersionProviderworker. -
VersionResource
Worker constructor.- Parameters:
worker- The shared flavor-neutral version worker this child delegates to. Must not benull.
-
-
Method Details
-
getInfo
[GET /*] — emit the assembled metadata as a JSON map.- Parameters:
res- The current REST response.- Throws:
IOException- If an I/O error occurs while writing the response.
-