|Oracle® Fusion Middleware Developer's Guide for Oracle WebCenter
11g Release 1 (188.8.131.52.0)
Part Number E10148-16
|PDF · Mobi · ePub|
This chapter explains how to integrate the Links service in a WebCenter Portal application at design time.
For more information about managing and including links, see:
This chapter includes the following sections:
This section provides overview information about the Links service features and requirements. It includes the following subsections:
The Links service provides a way to view, access, and associate related information. For example, in a list of project assignments, you can link to the specifications relevant to each assignment. In a discussion thread about a problem with a particular task, you can link to a document that provides a detailed description of how to perform that task.
The Links service provides a means for the application developer to set up source objects (for example, the Discussions service) and target objects (for example, a document), thus enabling your users to create links between the two objects.
There are three actions associated with the Links service: create, delete, and manage. The manage action includes the create and delete actions.
The following custom JSF components are included in the service:
Links Detail Button: This displays an icon and (optionally) a hyperlink that users click to open the Links Panel. To use the Links Detail Button, you must also include the Links - Dialog task flow as a region on the page.
Links Detail Menu Item: This adds a menu item that opens the Links Panel. You can embed this item in an ADF menu. To use the Links Detail Menu Item, you must also include the Links - Dialog task flow as a region on the page.
The gray Links icon (Figure 42-1) indicates that no links are present in the Links dialog.
Figure 42-1 The Links Icon (No Links Present)
The gold Links icon (Figure 42-2) indicates that links are present in the Links dialog.
Figure 42-2 The Links Icon (Links Present)
Any object that has a custom JSF component (such as the Links Detail button) bound to it
Note:The Lists and Notes services are available in WebCenter Spaces only.
Links are not available for the other WebCenter services, such as Mail and People Connections.
The Links service supports bidirectional links between objects. For example, when you create a link from a discussion topic to a document, a link from the document back to the discussion topic also is created. Similarly, when you delete the link from the discussion topic to a document, the link from the document back to the discussion topic is automatically deleted. Bidirectional linking is not available for URLs, notes, and specific list rows.
Links automatically recognize any WebCenter service in your application. After you have configured a service in your application, you can add links. However, links work only on secured pages. Links icons do not appear on unsecured pages. For more information, see Section 42.2.3, "Setting Security for the Links Service."
Linking provides an easy way for you to share information with your social network. Linking can help you realize a significant reduction of wasted time and effort normally spent looking for information.
Figure 42-3 Links Dialog
With the Links service, you can do the following:
Link an object (such as a page) to an existing object (such as a discussion topic) by clicking the Link icon, selecting Link to Existing, choosing the resource Discussions. Optionally, you can choose a specific forum and click the topic title to choose a link.
Link an object (such as a discussion topic) to a new object (such as a new note or URL) by clicking the Link icon for discussion topic, selecting Link to New, and choosing either Note or URL.
Create multiple links from one object.
Delete a link.
For more information about the Links service at runtime, see Oracle Fusion Middleware User's Guide for Oracle WebCenter Spaces.
This section describes the steps required for adding the Links service to your application. It includes the following subsections:
The Links service requires a connection to the database where the WebCenter schema is installed. The link map (that is, relationship information such as what object is linked to what other object) is stored in the database.
For details about setting up a database connection, see Section 7.2.2, "Setting Up a Database Connection."
This section explains a basic incorporation of the Links service. It includes the following subsections:
The Links service includes one task flow: Links Dialog.
To add the Links Dialog task flow to your WebCenter Portal application:
Follow the steps described in Chapter 3, "Preparing Your Development Environment" to create a customizable page in your application.
Ensure that you have set up the database connection to a database with the WebCenter schema installed (Section 42.2.1).
Open the page on which you want to add the Links service.
In the Component Palette, click WebCenter Links Service.
Drag and drop the Links Detail Button component onto your page inside the
The button is placed inside of a
panelGroupLayout for the purposes of this example only. It is not required that you always place the button inside a
In the Insert Links Detail Button dialog (Figure 42-4), enter a unique object description, ID, and name.
Figure 42-4 Insert Links Detail Button Wizard
The properties in this dialog include:
objectDescription: The description of the object to which you are binding the Links Detail Button
objectId: A unique ID that identifies the object to which you are binding the Links Detail Button
objectName: The name of the object to which you are binding the Links Detail Button
serviceId: An application-wide ID that identifies your application
In the ServiceId field, enter
Note:The Links service combines the
objectIdto uniquely identify the object to which you bind the Links Detail Button.
The new button displays in your page source (Figure 42-5).
Figure 42-5 The Link Detail Button in Your Page Source
In the Resource Palette, open My Catalogs, then open the Task Flows folder.
Drag and drop the Links Dialog task flow next to the Link Detail button on your page, and select Region from the context menu.
Save and run your page to the browser.
ADF security is configured by default if you created your application using the WebCenter Portal Application template. For information about configuring ADF security, see Section 67.3, "Configuring ADF Security."
The Links icon does not appear.
The Links service requires a database connection to the WebCenter schema, where links information is stored. Make sure that you have created the connection to the database and made it available in the Application Resources panel of the Application Navigator. If the connection is available in the Resource Palette but not in Application Resources, then simply drag the connection from the Resource Palette to the Connections folder in Application Resources.
Existing links appear, but you are not able to create new links or delete existing links.
RelationshipPermission permission is automatically granted to authorized users when a service is consumed. Verify that this permission has been granted. For information, see Section 67.3.2, "Automated Security Grants for WebCenter Services."
This section describes optional features available with this service. It includes the following subsection:
Oracle WebCenter provides REST APIs to support the Links service. Use the Links service REST APIs to post links between two objects. For example, you could create a link between an event and a document in a Space.
This section describes the REST APIs associated with the Links service. It includes the following subsections:
For an introduction to the REST APIs, see Chapter 55, "Using Oracle WebCenter REST APIs."
Note:REST APIs do not work out of the box. Before you can use REST APIs, you must take the configuration steps outlined in the following section: Section 55.2, "Before You Begin: Performing Required Configurations."
Each REST service has a link element within the resource index that provides the entry point for that service. To find the entry point for the Links service, find the link element with a
template element provides the URI entry point. The client sends HTTP requests to this entry point to work with the Links service.
For more information about the resource index, see Section 55.6.1, "The Resource Index."
For more information about resource types, see Section 184.108.40.206, "Resource Type."
When the client has identified the entry point, it then can navigate through the resource type taxonomy to perform the required operations. For more information about the individual resource types, see the appropriate section in Section 220.127.116.11, "Resource Type."
The taxonomy for the Links service is:
Beyond the service entry points, URL templates allow clients to pass query parameters to customize their requests and control the form of returned data.
Authentication is required before using Links REST API methods.
For general security considerations, see Section 55.9, "Security Considerations for WebCenter REST APIs."
This section provides information about each resource type. It includes the following subsection:
Use this resource type to identify the URI to use to create (
POST) a link between two objects
The request is represented by the URL, and the response is a link, each with metadata to help the end user choose an item to drill down and cross links to the owning REST services, if available. If the owning REST service is unavailable, then an HREF link is provided.
Navigation Paths to results
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex links results
resourceindex spaces spaces:resourceindex spaces:links results
Supported Methods for results
The following method is supported by this resource:
request - body: a source and a target object, each of which has a
resourceName; if the target is a URL link, then the target object also contains a
response - body: Status of "204 No Content" if successful, or "403 Forbidden" if the user has no permission to create a link
Optional: The service ID of the item, such as
The resource ID, such as
The resource name, such as
For more information, see Section 18.104.22.168, "Templates."
Resource Types Linked to From results
Table 42-1 lists the resource types that the client can link to from this resource.
Table 42-1 Related Resource Types for links