Open topic with navigation

TIBCO® Enterprise Administrator 2.4.2

# Adding Developer Notes

Within agent code, agent developers can include developer notes for GUI developers. For example, when changing the agent, the agent developer can include a developer note so the GUI developer can change the GUI accordingly. We recommend mentioning the version in which each such change occurs.

Developer notes appear when viewing API documentation in developer mode.

Procedure Add developer notes at any level within the agent code.
The form for adding a note depends on the level to which the note applies.

Level | Description
--- | ---
TeaAgentServer | Call the method withDocumentation on your agent's server instance (before registering the instance). Supply your notes as a string argument.
TeaAgentServlet | In your class that extends TeaAgentServlet, override the getDeveloperNotes method to return your notes as a string.
TeaObjectType Interface Style | In your class that extends BaseTeaObject, implement the withDocumentation interface. Code the getDeveloperNotes method to return your notes as a string.
TeaObjectType Annotation Style | In the annotation @TeaObjectType, supply the attribute `developerNotes="my_notes"`.
TeaOperation | In the annotation @TeaOperation, supply the attribute `developerNotes="my_notes"`.
TeaParam | In the annotation @TeaParam, supply the attribute `developerNotes="my_notes"`.

        private static void setupTomcatAgent(final TomcatAgentConfig tomcatAgentConfig)
                throws Exception {
            final TeaAgentServer server = new TeaAgentServer("tomcat", "7.0.42",
                    tomcatAgentConfig.getAgentInfo(), tomcatAgentConfig.getPort(),
                    "/tomcatagent", true);
            server.withDocumentation("Compiled and tested against agent libr V5.");
            server.registerInstance(new TomcatAgent(tomcatAgentConfig, server));
            server.registerInstance(new TomcatServer(tomcatAgentConfig, server));
            ...

    @TeaObjectType(name = TomcatAgentUtil.SERVER,
        concept = TeaConcept.PROCESS, description = "Tomcat Server",
        developerNotes="Unchanged in V5.")
    public class TomcatServer {

        private final TomcatAgentConfig tomcatAgentConfig;
        private final TeaAgentServer teaAgentServer;

        public TomcatServer(final TomcatAgentConfig tomcatAgentConfig,
                            final TeaAgentServer server) {
            this.tomcatAgentConfig = tomcatAgentConfig;
            this.teaAgentServer = server;
        }

        // http://host:port/tomcatagent/server/{key}/changeport?port=8080
        @Customize(value = "label:Change port;icon:edit_16x16.png")
            @TeaOperation(name = "changePort", objectType = "server",
                    description = "Change the server port",
                 developerNotes="From v4 onward, throws IOException.")
        @TeaRequires(value = { TomcatAgent.UPDATE_PERMISSION })
        public void changePort(@KeyParam final String key,
            @TeaParam(name = "port", description = "",
                developerNotes="In V5, added validation that value is in range [1000-2000].")
            @Customize(value = "label=Port") final int port)

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO® Enterprise Administrator

Copyright © 1996-2025. Cloud Software Group, Inc. All Rights Reserved.