Documenting a Business Service

When you create code, use standard Javadoc practices to document both the business service and the published business service classes. Javadoc comments should be added for member variables for all value objects. Most of this is generated by the value object wizards. However, you are responsible for making sure that the description for exposed fields is added and is in context with the business process that is being supported.

This code is an example of Javadoc for a member variable:

/**
 * Address Line 1
 * Line 1 of the Address.
 * EnterpriseOne Key field: false
 * EnterpriseOne Alias: add1
 * EnterpriseOne field length:  40 
 */
 private String addressLine1 = null;

This documentation is a result of the preceding Javadoc:

Javadoc documentation

You should include Javadoc comments for all public methods. The behavior of the public methods should also be documented.

This code sample shows how to document a method using Javadoc:

  /**
    * Method addAddressBook is used for adding Address Book information 
    * into EnterpriseOne, this includes basic address information plus 
    * phones.  If a phone cannot be added, the Address Book record will 
    * still be added, but warning messages will be returned for the 
    * corresponding phones that caused errors.
    * @param context conditionally provides the connection for the database 
    * operation and logging information
    * @param connection can either be an explicit connection or null. If 
    * null the default connection is used. 
    * @param internalVO represents data that is passed to EnterpriseOne for 
    * processing an AddressBook record.
    * @return an E1Message containing the text of any errors or warnings 
    * that may have occurred
    */
   public static E1MessageList addAddressBook(IContext context,
                                        IConnection connection, 
                                        InternalAddAddressBook internalVO){

This documentation is a result of the preceding Javadoc code:

Generated documentation resulting from Javadoc code