Skip Headers
Oracle® Application Development Framework Developer's Guide For Forms/4GL Developers
10g (10.1.3.1.0)

Part Number B25947-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

8.7 Creating an Application Module Diagram for Your Business Service

Since your business service's data model and service interface are a key asset to your team, it is often convenient to visualize it using a UML model. JDeveloper supports easily creating a diagram for your application module that you and your colleagues can use for reference.

8.7.1 How to Create an Application Module Diagram

To create a diagram of your application module:

  1. Open the Create Business Components Diagram dialog from the New Gallery in the Business Tier > ADF Business Components category.

  2. The dialog prompts you for a diagram name, and a package name in which the diagram will be created. Enter a diagram name like "SRService Data Model" and a package name like devguide.model.design.

    clicking OK creates the empty diagram and opens the diagrammer.

  3. To add your existing application module to the diagram, select them all in the Application Navigator and drop them onto the diagram surface.

  4. Use the property inspector to:

    • Hide the package name,

    • Change the font

    • Turn off the grid and page breaks

    • Turn off the display of the role names on the view links ("Master"/"Detail")

After completing these steps, the diagram looks like what you see in: Figure 8-11

Figure 8-11 UML Diagram of Application Module in a Drag and Drop and a Few Clicks

Image shows UML diagram for application module

8.7.2 What Happens When You Create an Application Module Diagram

When you create a business components diagram, JDeveloper creates an XML file representing the diagram in a subdirectory of the project's model path that matches the package name in which the diagram resides. For the Business Domain Objects diagram above, it would create a matching *.oxd_bc4j file in the ./devguide/model/design subdirectory of the model path. By default the Application Navigator unifies the display of the project contents paths so that ADF components and Java files in the source path appear in the same package tree as the UML model artefacts in the project model path. You can use the Toggle Directories toolbar icon in the Application Navigator to switch between the unified directory view and seeing the distinct project content path folders.

8.7.3 What You May Need to Know About Application Module Diagrams

You can do a number of tasks directly on the diagram, such as editing the application module, controlling display options, filtering methods names, showing related objects and files, publishing the application, and launching the Business Components Browser.

8.7.3.1 Using the Diagram for Editing the Application Module

The UML diagram of business components is not just a static picture that reflects the point in time when you dropped the application module onto the diagram. Rather, it is a UML-based rendering of the current component definitions so it will always reflect the current state of affairs. The UML diagram is both a visualization aid and a visual navigation and editing tool. You can bring up the Application Module Editor for any application module in a diagram by selecting Properties... from the right-mouse context menu (or double-clicking). You can also perform some application module editing tasks directly on the diagram like renaming view object instances, dropping view object definitions onto the data model to create a new view object instance, and removing view object instances by pressing the Delete key.

8.7.3.2 Controlling Display Options

After selecting the application module in the diagram, use the Property Inspector to control its display options. In the Display category, toggle properties like the following:

  • Show Stereotype — to display the type of object (e.g. "<<application module>>")

  • Show Operations — to display service methods

  • Show Package — to display the package name


Note:

The term operation is a more generic, UML name for methods.

In the Operations category, you will typically consider changing the following properties depending on the amount of detail you want to provide in the diagram:

  • Show Method Parameters

  • Show Return Types

  • Show Visibility (public, private, etc.)

On the right-mouse context menu, you can also select to View As:

  • Standard — to show service operations

  • Expanded — to show operations and data model (default)

  • Compact — to show only the icon and the name

8.7.3.3 Filtering Method Names

Initially, if you show the operations for the application module the diagram displays all the methods. Any method it recognizes as overridden framework methods display in the <<Framework>> operations category. The rest display in the <<Business>> methods category.

The Exclude Operations Filter property is a regular expression that you can use to filter out methods you don't want to display on the diagram. For example, by setting the Exclude Operations Filter property to

findLoggedInUser.*|retrieveService.*|get.*

you can filter out all of the following application module methods:

  • findLoggedInUserByEmailInStaff

  • retrieveServiceRequestById

  • All the generated view object getter methods

8.7.3.4 Show Related Objects and Implementation Files

After selecting the application module on the diagram — or any set of individual view object instances in its data model — you can choose Show > Related Elements from the right-mouse context menu to display related component definitions on the diagram. In a similar fashion, selecting Show > Implementation Files includes the files that implement the application module on the diagram. You can repeat these options on the additional diagram elements that appear until the diagram includes the level of detail you want to convey.


Note:

Deleting components from the diagram only removes their visual representation on the diagram surface. The components and classes remain on the file system and in the Application Navigator.

Figure 8-12 illustrates what you'll see if you include the implementation files for the devguide.model.SRService application module, showing the related elements for the SRServiceImpl class, and drawing an additional dependency line between the SRService application module and the SRServiceImpl class. Note the generated SRService client interface that you used above.

Figure 8-12 Adding Detail to a Diagram Using Show Related Elements and Show Implementation Files

Image of UML diagram

8.7.3.5 Publishing the Application Module Diagram

To publish the diagram to PNG, JPG, SVG, or compressed SVG format, choose Publish Diagram... from the right-mouse context menu on the diagram surface.

8.7.3.6 Testing the Application Module From the Diagram

To launch the Business Components Browser for an application module in the diagram, choose Test... from the right-mouse context menu.