../E63259-01.epub /> ../E63259-01.mobi />
This chapter describes how to expose portal functionality in a Portal Framework application, using the WebCenter Portal API. Through this API, you can create new portals, manage portal membership, retrieve portal information, and more, from your Portal Framework applications. This chapter also describes how to expose information from other applications, such as Portal Framework applications in portals.
This chapter includes the following sections:
Note:
Custom-built task flows that implement the WebCenter Portal API (described in this chapter) can be deployed on Portal Framework applications, but you cannot deploy them to a portal.This section includes the following subsections:
Section 56.1.2, "Case Study 1: Purchasing Application Uses a Portal to Evaluate Suppliers"
Section 56.1.4, "How to Set Up Your Framework Application to Use the WebCenter Portal API"
Section 56.1.5, "Providing WebCenter Portal Functionality in Your Portal Framework Application"
Section 56.1.6, "How to Handle Exceptions Raised by the WebCenter Portal API"
Section 56.1.7, "Finding More Information on the WebCenter Portal API"
Section 56.1.8, "Troubleshooting Issues with the WebCenter Portal API"
While using your Portal Framework application, users may encounter situations where portal functionality would be useful to help them complete a particular task. In such cases, it would be much less disruptive to remain within the context of the current application, rather than having to switch to WebCenter Portal. To this end, WebCenter Portal provides access to a subset of its functionality through an API. Using the API's classes and methods, you can integrate powerful portal functionality into your Framework application.
You can use the WebCenter Portal API to:
Create and manage portals and portal templates. You can create and delete portals, and add custom attributes. For more information, see Section 56.1.5.1, "Managing Portals and Portal Templates."
Manage portal membership. You can add and remove portal members. For more information, see Section 56.1.5.2, "Managing Portal Membership."
Retrieve information about portals and portal templates. For example, you can retrieve a portal's URL or the URL of a specific portal. You can also retrieve portal and portal template metadata. For more information, see Section 56.1.5.3, "Retrieving Information for Portals and Portal Templates."
Portal methods are contained within several classes. Table 56-1 lists the different classes and describes the purpose of the methods within each class.
Table 56-1 WebCenter Portal API Classes
Class | Contains Methods for | More Information |
---|---|---|
|
Creating and managing portals and portal templates Managing portal membership Retrieving portal information |
Section 56.1.5, "Providing WebCenter Portal Functionality in Your Portal Framework Application" |
|
Establishing context before calling other API methods |
Section 56.1.4.4, "Setting Up the WebCenter Portal Client Context" |
|
Managing exceptions raised by the API |
Section 56.1.6, "How to Handle Exceptions Raised by the WebCenter Portal API" |
|
Retrieving information about portal members |
Section 56.1.5.3, "Retrieving Information for Portals and Portal Templates" |
|
Retrieving portal information |
Section 56.1.5.3, "Retrieving Information for Portals and Portal Templates" |
From your perspective, as a Portal Framework developer, here are a couple of case studies describing scenarios where building and working with WebCenter Portal through its API may be useful:
In a purchasing application, a purchasing manager may create a portal to discuss the suitability of a new supplier. For more information, see Section 56.1.2, "Case Study 1: Purchasing Application Uses a Portal to Evaluate Suppliers."
In a Customer Support Center application, a support analyst may create a portal to collaborate with other users about a customer escalation. For more information, see Section 56.1.3, "Case Study 2: Customer Support Center Application Uses a Portal to Discuss Customer Escalations."
Consider a purchasing application built using the WebCenter Portal Framework. This application tracks suppliers, pricing, lead-time requirements, delivery time estimates, and performance history.
Users of the purchasing application must also be able to select and evaluate supplier candidates. Supplier evaluation is a collaborative process; it requires people from various areas of a company. For example, a design engineer and manufacturing representative must verify that an item being purchased meets the required technical specifications; a purchasing agent can negotiate prices, logistics and contractual issues; and a manager or executive has to approve the deal. How could the purchasing application initiate supplier evaluations?
Typically, the purchasing manager receives a purchase requisition from the manufacturing department. Sometimes the purchase order cannot be completed because the requisition cannot be delivered by the usual supplier in the time frame required by manufacturing. Therefore, a new supplier that can meet delivery and pricing requirements must be determined. The purchasing manager can add a candidate supplier into the system but the purchasing manager needs a way to organize and share information, and collaborate with people in and outside his team so that he can assess the supplier.
A portal can provide this collaborative environment. So the purchasing application includes a call to the createGroupSpace
method, and this enables the purchasing manager to click a link (Create a New Portal) that displays a "Create Portal" dialog, directly from the purchasing application, as shown in Figure 56-1.
Figure 56-1 Purchasing Application Includes a Portal Creation Link
When the purchasing manager clicks the link a custom dialog prompts him for some information. The purchasing manager enters a name and description for the portal, and also selects a template (Purchasing Projects) as shown in Figure 56-2. The Purchasing Projects template sets up the portal quickly so it is ready to use right away. For example, the template defines which services are required (events, a document library, and so on) and any custom pages that may be required. Because the API enables you to create your own "Create Portal" dialog, you can apply your own look and feel and terminology.
In this scenario, the purchasing manager chooses the Purchasing Projects template from the template list. Another approach would be to have the purchasing application pass in a default template value. With this additional default, there would be one less thing (determining which template to use) for the purchasing manager to think about. You could even generate the name of the portal from the Supplier ID so that the purchasing manager would not have to enter any details at all. The portal could then be created with just the click of a link.
When the purchasing manager clicks OK, the new Supplier Evaluation portal displays, similar to that shown in Figure 56-3.
Figure 56-3 shows a Home page for the Supplier Evaluation portal, which includes an events calendar, documents the group may find useful, an area for announcements, and so on. Each of these areas was determined by the Purchasing Projects template. In addition a link to the purchasing application transaction instance from which the portal was created is also provided. Clicking this link (Add/Update Vendors) displays the screen Add/Update Vendor Transaction for the supplier Shaker Distribution.
In the portal, the purchasing manager becomes the moderator of the portal automatically. The moderator can add content to the portal, initiate discussions, invite members, and collaborate with interested parties. Once consensus is reached regarding the supplier, the purchasing manager can approve or reject that supplier.
Consider a Customer Support Center application built using the Oracle WebCenter Portal Framework that tracks customer calls and issues.
A support analyst is notified that a customer has escalated the service request that the analyst has been working on. The analyst knows that she can find a quicker resolution to the issue if she can involve other people from different areas of the company. For example:
The project manager whose team implemented the project can provide more in depth knowledge of the project.
An account manager who has been in constant touch with the customer can provide specific information about the implementation of the project at the customer site.
Another support analyst, who has worked on a similar escalation before, can provide information about how that escalation was resolved.
This problem can be solved collaboratively using a portal. The support analyst creates a portal from within the Customer Support Center application and adds the required members. These members are then notified and use the portal to start discussing the customer situation. The support analyst views their updates to the portal inside the support application, navigating to the portal whenever necessary to obtain more specific details. Based on the information she gets from the other members of the portal, she can diagnose the problem and offer the customer a solution very quickly.
Before you can use the WebCenter Portal API you must ensure that WebCenter Portal is up and running and that your project is set up correctly in JDeveloper.
This section includes the following subsections:
Section 56.1.4.1, "Verifying That WebCenter Portal Is Up and Running"
Section 56.1.4.2, "Setting Up WebCenter Portal to Use the WebCenter Portal API"
Section 56.1.4.4, "Setting Up the WebCenter Portal Client Context"
If you want to use the WebCenter Portal API, WebCenter Portal must be up and running.
To verify that WebCenter Portal is up and running:
Start WebCenter Portal. The URL is:
http://host:port/webcenter
You do not need to log in.
Verify that the WebCenter Portal Web service is up and running. The URL is:
http://host:port/webcenter/SpacesWebService?WSDL
You should see a page similar to the one shown in Figure 56-4. If you do not see this page, contact your Fusion Middleware administrator.
For more information about setting up WebCenter Portal, see the "Getting WebCenter Portal Up and Running" chapter in the Oracle Fusion Middleware Administering Oracle WebCenter Portal.
Before you can call the WebCenter Portal API in your Portal Framework application, you must ensure that your application contains the correct libraries and that there is a connection to the WebCenter Portal Web service.
To set up your application to use the WebCenter Portal API:
Start JDeveloper.
In the Application Navigator, expand the application for which you want to provide WebCenter Portal functionality.
The application should be based on the WebCenter Portal Application template.
Right-click the view-controller project and choose Project Properties.
Select Libraries and Classpath.
Check that the following libraries are available in your project, adding any as necessary:
ADF DVT Faces Runtime
ADF Model Generic Runtime
ADF Model Runtime
JAX-RPC Client
JAX-WS Client
JAXB
Oracle JEWT
Portal Client
JDEV_HOME
/jdeveloper/oracle_common/modules/oracle.adf.model_11.1.1/adfm.jar
JDEV_HOME
/jdeveloper/oracle_common/modules/oracle.xdk_11.1.1/xml.jar
Click OK.
In the Application Resources panel of the Application Navigator, right-click Connections and choose New Connection > URL.
In the Name field, enter SpacesWebServiceEndpoint.
In the URL Endpoint field, enter the WebCenter Portal Web service URL:
http://host:port/webcenter/SpacesWebService
Click OK.
The connection information is added to the connections.xml
file in the application's META-INF
directory, for example:
C:\JDeveloper\mywork\mySpacesApplication\.adf\META-INF
If the connections.xml
file does not exist, it is created.
Open the connections.xml
file and verify that the code shown in Example 56-1 appears:
Example 56-1 Portal Web Service Endpoint URL Connection
<Reference name="SpacesWebServiceEndpoint" className="oracle.adf.model.connection.url.HttpURLConnection"> <Factory className="oracle.adf.model.connection.url.URLConnectionFactory"/> <RefAddresses> <XmlRefAddr addrType="SpacesWebServiceEndpoint"> <Contents> <urlconnection name="SpacesWebServiceEndpoint" url="http://host:port/webcenter/SpacesWebService"/> </Contents> </XmlRefAddr> </RefAddresses> </Reference>
If you need to set the WebCenter Portal Web Service endpoint at runtime, you can use the setGroupSpaceWebServiceEndpoint
method (Example 56-2). You can write a wrapper method that takes the endpoint as a parameter and then calls setGroupSpaceWebServiceEndpoint
, passing the parameter. An exception is reported as INFO in the log file if the endpoint is not set in connections.xml
.
Before using the WebCenter Portal API in your Portal Framework application, you must ensure that the communication between the application (the consumer) and WebCenter Portal (the producer) is secure. This is so that the identity of the user invoking the API is propagated to WebCenter Portal in a secure manner where the integrity and confidentiality of the communication is maintained.
To do this, the WebCenter Portal API uses a policy of SAML-based token passing with message protection. Your administrator must create a Java keystore and update the credential store so that WebCenter Portal can verify the authenticity of the security tokens received from your application. You must then register this keystore and update the credential store using JDeveloper.
For information about the steps that the administrator must perform, see the "Securing WebCenter Portal for Applications Consuming WebCenter Portal Client API with WS-Security" section in the Oracle Fusion Middleware Administering Oracle WebCenter Portal.
Before calling any of the WebCenter Portal API methods in your application code, a few setup steps are required.
To set up the WebCenter Portal client context:
Domain-wide configuration settings are used when you call the WebCenter Portal API from an application deployed on WebLogic Server (WLS), unless you specifically choose to override them. To override or set security configuration parameters, use the methods provided by the GroupSpaceWSContext
class.
In particular, you must set the SAML issuer name and the public key alias for WebCenter Portal, which are required for data encryption. If the WebCenter Portal Web service endpoint is not set in the connections.xml
file, you can set this too.
For example:
GroupSpaceWSContext context = new GroupSpaceWSContext(); context.setEndPoint("endPointUrl"); context.setSamlIssuerName("samlIssuer"); context.setRecipientKeyAlias("producer"); groupSpaceWSClient = new GroupSpaceWSClient(context);
Where:
endPointUrl
is the WebCenter Portal Web service endpoint, for example, http://xmlns.oracle.com:8912/webcenter/SpacesWebService
.
samlIssuer
is the issuer URI of the SAML Authority issuing assertions for this SAML Asserting Party, for example, www.oracle.com
. Out-of-the-box, www.oracle.com
is the only trusted SAML issuer.
producer
is the public key alias for WebCenter Portal, for example, orakey
if you are using a simple topology.
For information about the steps that the administrator must perform, see the "Securing WebCenter Portal for Applications Consuming WebCenter Portal Client API with WS-Security" section in the Oracle Fusion Middleware Administering Oracle WebCenter Portal.
For a full list of the methods provided by the GroupSpaceWSContext
class, see Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal.
Initialize the WebCenter Portal client by passing the context. For example:
GroupSpaceWSClient client = new GroupSpaceWSClient(context);
Once you have initialized the client, check everything is set up correctly by calling:
getWebCenterSpacesURL();
If the correct URL is returned, everything is set up correctly and you can start using the WebCenter Portal API.
The WebCenter Portal API enables you to perform common portal-related operations within a Framework application. Most of the API's methods are provided by the GroupSpaceWSClient
class. The WebCenter Portal API methods can be grouped into three main categories:
Table 56-2 lists the methods in the GroupSpaceWSClient
class.
Table 56-2 Methods for Performing Common Portal Operations
Portal Methods | Category | Description |
---|---|---|
|
Managing Portals and Portal Templates |
Creates a new portal based on a template. See Section 56.1.5.1.1, "Creating a Portal." |
|
Managing Portals and Portal Templates |
Creates one or more custom attributes for a portal. See Section 56.1.5.1.2, "Creating a Custom Attribute." |
|
Managing Portals and Portal Templates |
Permanently removes a portal from Portal. See Section 56.1.5.1.4, "Deleting a Portal." |
|
Managing Portals and Portal Templates |
Creates a new portal template based on an existing portal. See Section 56.1.5.1.3, "Creating a Portal Template." |
|
Managing Portal Membership |
Makes a user (or a group) a portal member with a specific role. See Section 56.1.5.2.1, "Adding Members to a Portal." |
|
Managing Portal Membership |
Invites a list of users to become members of a portal. See Section 56.1.5.2.2, "Inviting Users to Join a Portal." |
|
Managing Portal Membership |
Revokes portal membership. See Section 56.1.5.2.3, "Removing Members from a Portal." |
|
Managing Portal Membership |
Retrieves all the roles for a given portal. See Section 56.1.5.2.4, "Retrieving Role Information." |
|
Retrieving Information for Portals and Portal Templates |
Retrieves a list of portals for a given query string. See Section 56.1.5.3.1, "Retrieving a List of Portals." |
|
Retrieving Information for Portals and Portal Templates |
Retrieves a list of public portals for a given query string. See Section 56.1.5.3.2, "Retrieving a List of Public Portals." |
|
Retrieving Information for Portals and Portal Templates |
Retrieves a list of discoverable portals for a given query string. See Section 56.1.5.3.3, "Retrieving a List of Discoverable Portals." |
|
Retrieving Information for Portals and Portal Templates |
Retrieves information (metadata) about the portal. See Section 56.1.5.3.4, "Retrieving Portal Metadata." |
|
Retrieving Information for Portals and Portal Templates |
Retrieves information (metadata) about a portal given the portal's GUID. See Section 56.1.5.3.4, "Retrieving Portal Metadata." |
|
Retrieving Information for Portals and Portal Templates |
Retrieves a list of portal templates for a given query string. See Section 56.1.5.3.5, "Retrieving a List of Portal Templates." |
|
Retrieving Information for Portals and Portal Templates |
Retrieves information (metadata) about the portal template. See Section 56.1.5.3.6, "Retrieving Portal Template Metadata." |
|
Retrieving Information for Portals and Portal Templates |
Retrieves information (metadata) about the portal template given the template's GUID. See Section 56.1.5.3.6, "Retrieving Portal Template Metadata." |
|
Retrieving Information for Portals and Portal Templates |
Retrieves the Portal application URL. See Section 56.1.5.3.7, "Retrieving the Portal URL." |
|
Retrieving Information for Portals and Portal Templates |
Retrieves a portal URL. See Section 56.1.5.3.8, "Retrieving a Portal URL." |
|
Retrieving Information for Portals and Portal Templates |
Retrieves RSS feed URLs for the specified portal service. |
|
Retrieving Information for Portals and Portal Templates |
Retrieves RSS feed URL for a given portal by GUID and a given service. |
Use the following WebCenter Portal API methods to manage your portals and portal templates:
createGroupSpace
setCustomAttribute
createGroupSpaceTemplate
deleteGroupSpace
Before using any of these methods, you must complete all the steps listed in Section 56.1.4, "How to Set Up Your Framework Application to Use the WebCenter Portal API."
This section includes the following subsections:
Use the createGroupSpace
method to create a portal that is based on an existing portal template.
To use this method, specify:
The internal name of the new portal. This name can contain blank spaces.
A display name for the new portal.
A description of the portal. Although this is not mandatory, we recommend that you provide a description to help users identify the portal's purpose.
The name of the portal template you want to use. This should be the internal name of the template, not the display name.
Optionally, you can provide a comma separated list of keywords to help users locate the portal in searches.
Example 56-3 creates a portal with the name Databases that is based on the CommunityofInterest template. The example also specifies two search keywords (databases and Oracle).
Example 56-3 Creating a Portal
//create the portal GroupSpaceWSMetadata gsMetadata = client.createGroupSpace("Databases", "Databases" "A community for people interested in databases", "databases, oracle", "CommunityofInterest"); //print the portal GUID to provide confirmation of creation System.out.println("GUID: " + gsMetadata.getGuid());
For an example of how to provide custom attributes for a new portal, see Section 56.1.5.1.2, "Creating a Custom Attribute."
Every portal comes with built-in attributes such as name, description, date created, icon, and so on. In addition, you can define custom attributes that store additional information (metadata) that is unique to the portal and its characteristics.
Use the setCustomAttribute
method to specify a custom attribute for a portal. To use this method, specify the name of the portal and a name, description, type, and value for the custom attribute.
Example 56-4 creates the Databases portal and then creates a custom attribute for that portal. The attribute is named Vendors, with the description List of vendors. It takes string values of Oracle and IBM.
Example 56-4 Creating a Custom Attribute
//create the portal client.createGroupSpace("Databases", "Databases", "A community for people interested in databases", null, "CommunityofInterest"); //create the custom attribute client.setCustomAttribute("Databases", "Vendors", "List of vendors", "java.lang.String", "Oracle, IBM");
Use the createGroupSpaceTemplate
method to create a portal template based on an existing portal. To use this method specify a name, display name, and description for the template, and the name of the portal to use to create the template.
Example 56-5 creates a portal template based on the Databases portal.
Example 56-5 Creating a Portal Template
GroupSpaceWSMetadata templMetadata = client.createGroupSpaceTemplate("DatabasesTemplate", "Databases Template", "A template based on the Databases portal", "Databases"); //print the template GUID to provide confirmation of creation System.out.println("GUID: " + templMetadata.getGuid());
Use the deleteGroupSpace
method to permanently delete a portal from WebCenter Portal. To use this method, specify the name of the portal to delete. The method returns a boolean value to indicate whether the deletion was successful.
Example 56-6 deletes the portal with the name Databases. The example uses the boolean value returned by the method to print a message about the success or failure of the operation.
Use the following WebCenter Portal API methods to manage portal membership:
addMember
inviteMember
removeMember
getRoles
Before using any of these methods, you must complete all the steps listed in Section 56.1.4, "How to Set Up Your Framework Application to Use the WebCenter Portal API."
This section includes the following subsections:
Use the addMember
method to give users (and groups) portal membership and assign the new members to a specific role. To use this method, specify the name of the portal, and a list of users/groups. The list must contain objects of type GroupSpaceWSMembers
that specify the user/group name and the role to give that user/group in the portal.
You must specify the name of a valid user or user group that exists in the WebCenter Portal identity store. For the role, choose one of the default roles (Moderator, Participant, Viewer) or a custom role (if any). To retrieve a list of the available roles for a portal, use the getRoles
method. For more information, see Section 56.1.5.2.4, "Retrieving Role Information." For more information about roles, see the "Managing Roles and Permissions for a Portal" section in Oracle Fusion Middleware Using Oracle WebCenter Portal.
Example 56-7 makes users (of type GroupSpaceWSMembers
) named Pat and Vicki and everyone in the Sales and Marketing user group, members of the Databases portal. Pat and everyone in Sales and Marketing are granted the Viewer role. Vicki is assigned the Participant role.
Note:
UsesetGroup(true)
to indicate when you are adding a group of users.Example 56-7 Adding Members to a Portal
//create the list of users List addMem = new ArrayList(); //create the GroupSpaceWSMembers objects GroupSpaceWSMembers mem1 = new GroupSpaceWSMembers("pat", "Viewer"); GroupSpaceWSMembers mem2 = new GroupSpaceWSMembers("vicki", "Participant"); GroupSpaceWSMembers grp1 = new GroupSpaceWSMembers("Sales", "Viewer"); grp1.setGroup(true); GroupSpaceWSMembers grp2 = new GroupSpaceWSMembers("Marketing", Viewer"); grp2.setGroup(true); //add the GroupSpaceWSMembers objects to the list of users addMem.add(mem1); addMem.add(mem2); addMem.add(grp1); addMem.add(grp2); //add the users to the Portal client.addMember("Databases", addMem); //print a list of members to confirm the new members were added GroupSpaceWSMetadata memMetData = client.getGroupSpaceMetadata("Databases"); for (GroupSpaceWSMembers mems: memMetData.getMembers()) { System.out.println(mems.getMember()); System.out.println(mems.getRole()); }
Use the inviteMember
method to invite users to become members of a portal. To use this method, specify the name of the portal and a list of users to invite. The list must contain objects of type GroupSpaceWSMembers
that specify the user name and the role to give that user in the portal. An invitation to join the portal is sent to each user, and each user can then accept or reject that invitation.
You must specify a valid user name that exists in the WebCenter Portal identity store. For the role, choose one of the default roles (Moderator, Participant, Viewer) or a custom role (if any). To retrieve a list of the available roles for a portal, use the getRoles
method. For more information, see Section 56.1.5.2.4, "Retrieving Role Information." For more information about roles, see the "Managing Roles and Permissions for a Portal" section in Oracle Fusion Middleware Using Oracle WebCenter Portal.
Example 56-8 invites users (of type GroupSpaceWSMembers
) named Pat and Vicki to become members of the Databases portal with Viewer and Participant roles respectively.
Example 56-8 Inviting Users to Join a Portal
//create the list of users List inviteMem = new ArrayList(); //create the GroupSpaceWSMembers objects GroupSpaceWSMembers mem1 = new GroupSpaceWSMembers("pat", "Viewer"); GroupSpaceWSMembers mem2 = new GroupSpaceWSMembers("vicki", "Participant"); //add the GroupSpaceWSMembers objects to the list of users inviteMem.add(mem1); inviteMem.add(mem2); //invite the list of users to join the portal client.inviteMember("Databases", inviteMem);
Use the removeMember
method to revoke portal membership. To use this method, specify the name of the portal, and a list of users. The list must contain objects of type GroupSpaceWSMembers
that specify the user name. To obtain a list of current portal members, use the getGroupSpaceMetadata
method. For more information, see Section 56.1.5.3.4, "Retrieving Portal Metadata."
Example 56-9 removes users (of type GroupSpaceWSMembers
) Pat and Vicki from the membership of the Databases portal.
Example 56-9 Removing Members from a Portal
//create the list of users List remMem = new ArrayList(); //create the GroupSpaceWSMembers objects GroupSpaceWSMembers mem1 = new GroupSpaceWSMembers("pat"); GroupSpaceWSMembers mem2 = new GroupSpaceWSMembers("vicki"); 2 lines //add the GroupSpaceWSMembers objects to the list of users remMem.add(mem1); remMem.add(mem2); //remove the users from the portal client.removeMember("Databases", remMem); //print a list of members to confirm the members were removed GroupSpaceWSMetadata memMetData = client.getGroupSpaceMetadata("Databases"); for (GroupSpaceWSMembers mems: memMetData.getMembers()) { System.out.println(mems.getMember()); System.out.println(mems.getRole()); }
Use the getRoles
method to retrieve all the roles for a given portal. This is useful for determining which roles are available when adding or inviting members to a portal. Roles include out-of-the box roles (Moderator, Participant, Viewer) and also custom roles (if any). To use this method, specify the name of the portal.
Example 56-10 retrieves and displays role information for the Databases portal.
Use the following Portal methods to retrieve portal information:
getGroupSpaces
getPublicGroupSpaces
getDiscoverableGroupSpaces
getGroupSpaceMetadata
getGroupSpaceMetadataByGuid
getGroupSpaceTemplates
getGroupSpaceTemplateMetadata
getGroupSpaceTemplateMetadataByGuid
getWebCenterSpacesURL
getGroupSpaceURL
Before using the WebCenter Portal API methods, you must complete all the steps listed in Section 56.1.4, "How to Set Up Your Framework Application to Use the WebCenter Portal API."
This section includes the following subsections
Use the getGroupSpaces
method to obtain a list of portals that match a given query string. To use this method, specify a query string. A null value query string returns a list of all portals that are accessible to the current user.
The method returns portals that are accessible to the current user, up to a maximum of 500.
Example 56-11 returns a list of portals containing the string Database.
Example 56-11 Retrieving a List of Specific Portals
List<String> allGroupSpaces = client.getGroupSpaces("Database");
Example 56-12 returns a list of all portals to which the current user has access. This is achieved by specifying a null query string.
Use the getPublicGroupSpaces
method to obtain a list of public portals that match a given query string. To use this method, specify a query string. A null value query string returns a list of all public portals.
The method returns portals that are accessible to all users, even those who are not logged in to the WebCenter Portal application, up to a maximum of 500.
Example 56-13 returns a list of public portals containing the string Database.
Example 56-13 Retrieving a List of Specific Public Portals
List<String> allPublicGroupSpaces = client.getPublicGroupSpaces("Database");
Example 56-14 returns a list of all public portals. This is achieved by specifying a null query string.
Use the getDiscoverableGroupSpaces
method to obtain a list of discoverable portals that match a given query string. To use this method, specify a query string. A null value query string returns a list of all discoverable portals.
The method returns portals that are accessible to all users who are logged into WebCenter Portal, up to a maximum of 500.
Example 56-13 returns a list of discoverable portals containing the string Database.
Example 56-15 Retrieving a List of Discoverable portals
List<String> allDiscoverableGroupspaces = client.getDiscoverableGroupspaces("Database");
Example 56-14 returns a list of all discoverable portals. This is achieved by specifying a null query string.
Use the getGroupSpaceMetadata
or getGroupSpaceMetadataByGuid
methods to obtain information (metadata) about a particular portal. This includes information such as the description of the portal, the name of the user who created it, the date on which it was last updated, and so on.
To use the getGroupSpaceMetadata
method, specify the name of the portal. To use the getGroupSpaceMetadataByGuid
method, specify the GUID of the portal. Note that while the portal name may be changed during the existence of the portal, the GUID always remains the same. You can obtain the GUID of a portal as follows:
getGroupSpaceMetadata("spaceName").getGuid();
Both methods return a bean object that contains more methods that you can then use for retrieving the portal metadata. These methods are provided by the GroupSpaceWSMetadata
class. Table 56-3 lists the methods returned by the bean object:
Table 56-3 Methods for Retrieving Portal Metadata
Portal Methods | Description |
---|---|
|
Returns the name of the person who created the portal. |
|
Returns the custom attributes for a portal. |
|
Returns the description of the portal. |
|
Returns the display name of the portal. |
|
Returns the state of the portal: active, offline, deleted. |
|
Returns the GUID of the portal. |
|
Returns the location of the portal icon. |
|
Returns a comma separated list of keywords used to describe the portal. |
|
Returns the date the portal was last updated. |
|
Returns the location of the portal logo. |
|
Returns the mailing list for the portal. |
|
Returns the current list of portal members. |
|
Returns the internal name of the portal. |
|
Returns if the portal is returned in searches made by users who are not members of the portal. |
|
Returns if the portal is available to users who are not logged in. |
Example 56-17 retrieves the Description, Keywords, and Last Updated Date information for the Databases portal given the portal's name.
Example 56-17 Retrieving Portal Metadata Using the Portal Name
//get the exact name of the portal List<String> myGroupSpace = client.getGroupSpaces("Databases"); //check that the API returns a single result if(myGroupSpace.size() == 1) { //retrieve the metadata GroupSpaceWSMetadata metadata = client.getGroupSpaceMetadata(myGroupSpace); //get portal description System.out.println("Description: " + metadata.getDescription()); //get portal keywords System.out.println("Keywords: " + metadata.getKeywords()); //get the date the portal was last updated System.out.println("Last Updated Date: "+ metadata.getLastUpdated().toString()); }
Example 56-18 retrieves the Display Name, Creator, and Last Updated Date information for the Databases portal given the portal GUID.
Example 56-18 Retrieving Portal Metadata Using Portal GUID
GroupSpaceWSMetadata metadata = client.getGroupSpaceMetadataByGuid("Guid"); //get portal display name System.out.println("Display Name: " + metadata.getDisplayName()); //get the name of the user who created the portal System.out.println("Created By: " + metadata.getCreatedBy()); //get the date the portal was last updated System.out.println("Last Updated Date: " + metadata.getLastUpdated().toString());
Example 56-19 retrieves the Name, Description, Type, and Value for every custom attribute associated with the Databases portal.
Example 56-19 Retrieving Custom Attribute Metadata
//get the exact name of the portal List<String> myGroupSpace = client.getGroupSpaces("Databases"); //check that the API returns a single result if(myGroupSpace.size() == 1) { //retrieve the metadata GroupSpaceWSMetadata metadata = client.getGroupSpaceMetadata(myGroupSpace); //get list of custom attributes List<GSCustomAttribute> attributes = metadata.getCustomAttributes(); //get name, description, type, and value for each custom attribute for(GSCustomAttribute attribute: attributes) { System.out.println("Name :" + attribute.getName()); System.out.println("Description :" + attribute.getDescription()); System.out.println("Type :" + attribute.getType()); System.out.println("value.toString() :" + attribute.getValue().toString()); } }
Example 56-20 retrieves a list of members of the Databases portal.
Example 56-20 Retrieving Membership Information
//get the exact name of the portal List<String> myGroupSpace = client.getGroupSpaces("Databases"); //check that the API returns a single result if(myGroupSpace.size() == 1) { //retrieve the metadata GroupSpaceWSMetadata metadata = client.getGroupSpaceMetadata(myGroupSpace); //get the list of members for(String member: metadata.getMembers()) { System.out.println("Member UID: " + member); } }
Use the getGroupSpaceTemplates
method to obtain a list of portal templates that match a given query string. To use this method, specify a query string. A null value query string returns a list of all templates that are accessible to the current user.
The method returns templates that are accessible to the current user, up to a maximum of 500.
Example 56-21 returns a list of portal templates containing the string Interest.
Example 56-21 Retrieving a List of Specific Portal Templates
List<String> allGroupSpaceTemplates = client.getGroupSpaceTemplates("Interest");
Example 56-22 returns a list of all portal templates to which the current user has access. This is achieved by specifying a null query string.
Use the getGroupSpaceTemplateMetadata
and getGroupSpaceTemplateMetadataByGuid
methods to obtain information (metadata) about a particular portal template. This includes information such as the description of the template, the name of the user who created it, and so on.
To use the getGroupSpaceTemplateMetadata
method, specify the name of the template. To use the getGroupSpaceTemplateMetadataByGuid
method, specify the GUID of the template. Note that while the portal template name may be changed during the existence of the template, the GUID always remains the same.
Both methods return a bean object that contains more methods that you can then use for retrieving the portal template metadata. These methods are provided by the GroupSpaceWSMetadata
class. Table 56-4 lists the methods returned by the bean object:
Table 56-4 Methods for Retrieving Portal Template Metadata
Portal Methods | Description |
---|---|
|
Returns the name of the person who created the template. |
|
Returns the description of the template. |
|
Returns the display name of the template. |
|
Returns the GUID of the template. |
|
Returns the location of the template icon. |
|
Returns a comma separated list of keywords used to describe the template. |
|
Returns the location of the template logo. |
|
Returns the internal name of the template. |
Example 56-23 retrieves the GUID, Description, and Created By information for the CommunityofInterest portal template given the template name.
Example 56-23 Retrieving Template Metadata Using the Template Name
GroupSpaceWSMetadata metadata = client.getGroupSpaceTemplateMetadata(myGroupSpaceTemplate); //get the exact name of the portal template List<String> myGroupSpaceTemplate = client.getGroupSpaceTemplates("CommunityofInterest"); //check that the API returns a single result if(myGroupSpaceTemplate.size() == 1) { //retrieve the metadata -- get GUID System.out.println("GUID: " + metadata.getGuid()); //get template description System.out.println("Description: " + metadata.getDescription()); //get name of user who created the template System.out.println("Keywords: " + metadata.getCreatedBy()); }
Example 56-24 retrieves the name of a portal template given the template GUID.
Use the getWebCenterSpacesURL
method to obtain the URL of the WebCenter Portal instance.
Example 56-25 retrieves the URL of the currently running instance of WebCenter Portal.
Use the getGroupSpaceURL
method to obtain the URL of a specific portal. This is useful for when you want to construct a hyperlink for a portal or you have a relative URL that you need to make into an absolute URL. To use this method, specify the name of the portal.
Example 56-26 retrieves the URL of the Databases portal.
Example 56-26 Retrieving a Portal URL
String myGroupSpaceURL = client.getGroupSpaceURL("Databases");
Example 56-27 prints a list of portals as hyperlinks.
Example 56-27 Printing a List of Portals as Hyperlinks
//get the list of portals List<String> spaces = client.getGroupSpaces(""); //print the list of portals as hyperlinks for (String spaceName : spaces) { print("<a href =""" + client.getGroupSpaceURL(spaceName) + "">" + spaceName + "</a><br>"); }
To construct the URL of a particular page in a portal, retrieve the portal URL and then add the page information. For information about how to create pretty URLs for portal pages, see the "WebCenter Portal Pretty URLs" section in Oracle Fusion Middleware Building Portals with Oracle WebCenter Portal.
WebCenter Portal members can find out what is happening in a portal through various RSS news feeds. The following portal RSS feeds are available:
Announcements RSS - View portal announcements
Discussions RSS - Track contributions to discussion forums
Lists RSS - Watch for revisions to lists
Recent Activity RSS - Monitor recent activities
You can retrieve the RSS feed URLs from WebCenter Portal, using the following WebCenter Portal API methods:
getServiceRSSFeedURL
getServiceRSSFeedURLbyGuid
To obtain an RSS feed URL, you must identify the portal (by name or GUID) and specify the service required (using a service ID). Service IDs are available as constants in GroupSpaceWSClient
as follows:
Announcements - GroupSpaceWSClient.ANNOUNCEMENT_SERVICE_ID
Discussions - GroupSpaceWSClient.DISCUSSION_FORUM_SERVICE_ID
Lists - GroupSpaceWSClient.LIST_SERVICE_ID
Recent Activities - GroupSpaceWSClient.RECENT_ACTIVITY_SERVICE_ID
Retrieving Portal RSS News Feed URLs Using getServiceRSSFeedURL
Use the getServiceRSSFeedURL
method to obtain service-related RSS news feed URLs for a particular portal by specifying the portal name.
To retrieve the RSS news feed URL for a service using getServiceRSSFeedURL
, use the following:
String service_URL = client.getServiceRSSFeedURL("groupspace_name",service_ID);
Where:
service_URL refers to the service parameter being retrieved
groupspace_name is the name of the portal
service_ID is the ID of the service for which you want to retrieve the RSS news feed URL. Use one of the following: ANNOUNCEMENT_SERVICE_ID
, DISCUSSION_FORUM_SERVICE_ID
, RECENT_ACTIVITY_SERVICE_ID
, or LIST_SERVICE_ID
.
Therefore, depending on the service required, you can use the following:
String
service_URL
= client.getServiceRSSFeedURL(
"groupspace_name
", GroupSpaceWSClient.ANNOUNCEMENT_SERVICE_ID)
String
service_URL
= client.getServiceRSSFeedURL("
groupspace_name
", GroupSpaceWSClient.DISCUSSION_FORUM_SERVICE_ID)
String
service_URL
= client.getServiceRSSFeedURL("
groupspace_name
", GroupSpaceWSClient.LIST_SERVICE_ID)
String
service_URL
= client.getServiceRSSFeedURL("
groupspace_name
", GroupSpaceWSClient.RECENT_ACTIVITY_SERVICE_ID)
Example 56-28 retrieves the recent activity RSS feed URL for a portal named Finance_Project:
Example 56-28 Retrieving the RSS Feed URL for Recent Activity
String recentActivityURL = client.getServiceRSSFeedURL("Finance_Project", GroupSpaceWSClient.RECENT_ACTIVITY_SERVICE_ID);
Retrieving RSS News Feed URLs Using GetServiceRSSFeedURLbyGuid
Use the getServiceRSSFeedURLbyGuid
method to obtain service-related RSS news feed URLs for a particular portal by specifying the portal's GUID.
To retrieve the RSS news feed URL for a service using getServiceRSSFeedURLbyGuid
, use the following:
String service_URL = client.getServiceRSSFeedURLbyGuid("groupspace_GUID",service_ID);
Where:
service_URL refers to the service parameter being retrieved
groupspace_GUID is a portal GUID. For information about obtaining a portal's GUID, see Section 56.1.5.3.4, "Retrieving Portal Metadata."
service_ID is the ID of the service for which you want to retrieve the RSS news feed URL. Use one of the following: ANNOUNCEMENT_SERVICE_ID
, DISCUSSION_FORUM_SERVICE_ID
, RECENT_ACTIVITY_SERVICE_ID
, or LIST_SERVICE_ID
.
Example 56-29 retrieves the recent activity RSS feed URL for a portal with the GUID: s2201fa44_b441_4bdd_950e_47307f6f9800:
The GroupSpaceWSException
class provides methods for handling exceptions raised by WebCenter Portal API methods.
Table 56-5 Portal Methods in the GroupSpaceWSException Class
Method | Class | Description |
---|---|---|
|
GroupSpaceWSException |
Composes the localized error message. |
|
GroupSpaceWSException |
Prints the exception and its back trace to the standard error stream. |
This section includes the following subsections:
Sometimes you may find that the default error messages provided by the WebCenter Portal API is not specific enough for your particular application. In these cases you can provide your own error messages.
Use the getLocalizedMessage
method to compose application-specific error messages.
Example 56-30 shows a servlet that includes code to create a portal. If any exceptions are raised during the creation process, a localized message is printed.
Example 56-30 Printing a Localized Error Message
servlet1.java doGet() { ... print("<b>Output</b>"); try { GroupSpaceWSClient client = new GroupSpaceWSClient(context); client.createGroupSpace("Databases", "Databases, "A community for people interested in databases", "databases, oracle", "CommunityofInterest"); print("Successfully created portal"); } catch(GroupSpaceWSException ex) //For example: { if(ex instanceof GroupSpaceNameNullException) print(ex.getLocalizedMessage()); else if (ex instanceof GroupSpaceDescNullException) print(ex.getLocalizedMessage()); } ... }
For debugging purposes, it is often useful to see which errors ultimately led to the failure of a particular operation to discover the underlying cause of the problem. Use the printStackTrace
method to list all the errors that caused a particular exception.
Example 56-31 prints the exception and all the errors leading up to it.
Example 56-31 Listing the Error Stack
servlet1.java doGet() { ... print("<b>Output</b>"); try { GroupSpaceWSClient client = new GroupSpaceWSClient(context); client.createGroupSpace("Databases", "Databases", "A community for people interested in databases", "databases, oracle", "CommunityofInterest"); print("Successfully created portal"); } catch(GroupSpaceWSException ex) { ex.printStackTrace(); } ... }
API Reference Documentation |
---|
For detailed syntax information for the WebCenter Portal API, see Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal. |
If you experience issues with the WebCenter Portal API, check the following:
Verify that the credential stores for both WebCenter Portal and the client Framework application are configured correctly.
See the "Configuring the Policy and Credential Store" section in Oracle Fusion Middleware Administering Oracle WebCenter Portal.
Ensure the WebCenter Portal client context is set up correctly in the Portal Framework application by checking the alias passed in the context.setRecipientKeyAlias
. The alias should be the public key alias of the producer (Portal), for example:
GroupspaceWSContext context = new GroupspaceWSContext();
context.setEndPoint(endPointUrl);
context.setRecipientKeyAlias("orakey");
groupspaceInternalWSClient = new GroupspaceWSInternalClient(context);
In this example, the public key alias of the producer is orakey. See also, Section 56.1.4.4, "Setting Up the WebCenter Portal Client Context."
Check that keystores exist at both ends of the connection. For example:
- webcenter.jks
(copied to Portal end)
- clientapi.jks
(copied to Portal Framework application end)
For example, the following commands generate clientapi.jks
and webcenter.jks
for a simple topology:
keytool -genkeypair -keyalg RSA -dname "cn=spaces,dc=example,dc=com" -alias orakey -keypass mypassword -keystore webcenter.jks -storepass mypassword -validity 360keytool -exportcert -v -alias orakey -keystore webcenter.jks -storepass mypassword -rfc -file webcenter.cerkeytool -importcert -alias webservice_client_api -file webcenter.cer -keystore clientapi.jks -storepass mypasswordkeytool -genkeypair -keyalg RSA -dname "cn=clientapi,dc=example,dc=com" -alias clientapi -keypass mypassword -keystore clientapi.jks -storepass mypassword -validity 360 keytool -exportcert -v -alias clientapi -keystore clientapi.jks -storepass mypassword -rfc -file clientapi.cer keytool -importcert -alias clientapi -file clientapi.cer -keystore webcenter.jks -storepass mypassword
WebCenter Portal provides a REST API to support various portal-related operations. You can use REST API methods to perform the following actions in the portal:
List all portals in the application, list public portals only, list joined portals, list discoverable portals.
View details for a single portal.
List members of a portal.
List role assignments for portal members.
List custom attributes defined for a portal.
View the details of a particular custom attribute.
View and add lists for a portal.
View and update list items (rows) for a list.
View, update, and delete list item details (columns).
This section describes the Portal REST API. It contains the following subsections:
For an introduction to the REST API, see Section 53, "Using Oracle WebCenter Portal REST APIs."
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 WebCenter Portal REST API, find the link element with a resourceType
of:
urn:oracle:webcenter:spaces
The corresponding href
or template
element provides the URI entry point which returns a list of portals accessible to the current user. The client sends HTTP requests to this entry point to work with WebCenter Portal.
For more information about the Resource Index, see Section 53.5.1, "Using the Resource Index".
For more information about resource types, see Section 53.5.2.1, "Resource Type."
When the client has identified the entry point, it can then 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 56.2.4, "Portal Resource Types."
The taxonomy for Portal is:
urn:oracle:webcenter:spaces urn:oracle:webcenter:spaces:siteresources urn:oracle:webcenter:spaces:resource:templates urn:oracle:webcenter:spaces:resource:template urn:oracle:webcenter:space:attributes urn:oracle:webcenter:space:roles urn:oracle:webcenter:space urn:oracle:webcenter:space:icon urn:oracle:webcenter:space:members urn:oracle:webcenter:space:member urn:oracle:webcenter:space:attributes urn:oracle:webcenter:space:attribute urn:oracle:webcenter:space:roles urn:oracle:webcenter:space:role urn:oracle:webcenter:space:resourceindex urn:oracle:webcenter:space:lists urn:oracle:webcenter:space:list urn:oracle:webcenter:space:rows urn:oracle:webcenter:space:row urn:oracle:webcenter:space:columns urn:oracle:webcenter:space:column
There are no specific security considerations for this service. For general security considerations, see Section 53.8, "Security Considerations for WebCenter Portal REST APIs."
The following sections provide all the information you need to know about each resource type:
Section 56.2.4.3, "urn:oracle:webcenter:spaces:resource:templates"
Section 56.2.4.5, "urn:oracle:webcenter:space:resourceindex"
Section 56.2.4.17, "urn:oracle:webcenter:space:list:columns"
Use this resource type to identify the URI to use to view a list of portals (GET
) and to create a new portal (POST
). The response from a GET
operation includes each portal, and each portal includes links to operate on that portal.
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces
The following methods are supported by this resource:
GET
– Returns information on all portal.
request - body: None
query parameters:
startIndex
itemsPerPage
projection
- Allowed values are summary
and details
. The default is summary
.
visibility
- Determines which portals are included in the list: all portals, public portals only, joined portals, or discoverable portals.
Allowed values are all
, public
, joined
and discoverable
. The default is joined
.
response - body: collection of portals
POST
– Creates a new portal.
request - body: space
<space> <name>aName</name> <description>aDescription</description> <templateName>aTemplate</templateName> </space>
Note:
ThetemplateName
parameter must be a valid template name returned from urn:oracle:webcenter:spaces:resource:templates. For example, the default template names are:
Basic CommunityOfInterest ProjectSpace
Resource Types Linked to from spaces
Table 56-6 lists the resource types that the client can link to from this resource.
Use this resource type to identify the URI to use to retrieve a list of Site Resources (GET
). The response from a GET
operation includes a list of all site resource names. The main purpose of retrieving site resource names is to know what all resources is available in the portal.
The returned list includes the resources that are found under the Resources tab of the WebCenter Portal Administration console, and include resources like page templates, navigations, skins, page styles, and others.
Navigation Paths to siteresources
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces siteresources
Supported Methods for siteresources
The following methods are supported by this resource:
GET
request - body: None
query parameters:
projection
- Allowed values are summary
and details
. The default is summary
.
q
- You can search on siteResourceType
and/or seeded
.
If siteResourceType
is specified, the query returns all site resource names for that site resource type.
The format is: q
= siteResourceType:equals:<
value>
The possible values are siteTemplate
, contentPresenter
, pageStyle
, navigation
, resourceCatalog
, or skin
.
Example:
q=siteResourceType:equals:siteTemplate
If seeded
is specified as true
, the query returns all site resources names that are seeded.
The format is: q=seeded:equals:<
value>
.
The possible values are true
or false
.
Example:
q=seeded:equals:false
(returns all non-seeded resources)
If a non-seeded site template is required, the query is:
siteResourceType:equals:siteTemplate;
seeded:equals:false
response - body: list of all site resource names for all the site resource types for the specified scope. If the siteResourceType
is specified, returns all the site resource names for that site resource type.
Read-Only Elements for siteresources
Table 56-7 lists the read-only elements for siteresources.
Table 56-7 Read-Only Elements for urn:oracle:webcenter:siteresources
Element | Type | Description |
---|---|---|
guid |
String |
Global ID for the site resource. |
displayName |
String |
Name of the site resource as displayed to end users. |
name |
String |
The name of the site resource. A complete list of all of the site resources, by name, is provided in Table 56-8. |
description |
String |
Description of the site resource. |
siteResourceType |
String |
Type of the site resource. |
scopeName |
String |
Either the name of the space or the default scope at the application level. |
seeded |
Boolean |
Set to true if the site resource is pre-populated. |
visible |
Boolean |
Set to true if this site resource is visible in the user interface. |
createdBy |
String |
Username of the user who created the site resource. |
createdDate |
Date |
Date the site resource was created. |
modifiedBy |
String |
Username of the user who updated the site resource. |
modifiedDate |
Date |
Date on which the site resource was modified. |
version |
String |
Version of the site resource. |
List of Site Resources by Name
Table 56-8 lists the site resources by name, and gives the type and description of each resource.
Table 56-8 List of Site Resources by Name Provided by WebCenter Portal
Name | Type | Description |
---|---|---|
Accordion View |
contentPresenter |
Displays multiple content items in an accordion (stacked) format. When an item is clicked, the other items collapse to reveal the selected items details. |
Blank |
pageStyle |
Blank Page Style |
Blank |
taskFlowStyle |
Blank |
Blog |
pageStyle |
Blog Page Style |
Bulleted View |
contentPresenter |
Displays multiple content items as a bulleted list. Only content items are displayed; sub-folders are omitted. |
Bulleted with Folder Label View |
contentPresenter |
Displays multiple content items as a bulleted list. The name of the parent folder is displayed as a label above the list. Only content items are displayed; sub-folders are omitted. |
Carousel View |
contentPresenter |
Displays multiple content items in a carousel format. Users browse through items using a slider bar from left to right. |
Default Document Details View |
contentPresenter |
Displays detailed information about a single content item, including creation date, modification date, creator, user who last modified the item, and path, as well as any comments. |
Default Home Portal Catalog |
resourceCatalog |
Used when editing application-level pages and task flows in your Home portal. |
Default List Item View |
contentPresenter |
Used by a single content item view to display a single line with an icon and item name as a link that either displays or downloads the item when clicked. |
Default List Item View for Folders |
contentPresenter |
Used by a single content item view to display a single line with an icon and item name as a link that either displays or downloads the item when clicked. |
Default Page Template Catalog |
resourceCatalog |
Used when editing page templates |
Default Portal Catalog |
resourceCatalog |
Used when editing portal-level pages and task flows |
Default View |
contentPresenter |
Displays a single content item. Image and HTML content items are displayed directly in the browser. For other item types, details are displayed, along with a link to download the associated file. |
Fusion FX |
skin |
|
Fusion Side Navigation |
siteTemplate |
Stretching Page Layout with Side Navigation. Use Fusion FX Skin. |
Fusion Top Navigation |
siteTemplate |
Stretching Page Layout with Top Navigation. Use Fusion FX Skin. |
Home Page |
pageStyle |
Home Page style |
Icon View |
contentPresenter |
Displays multiple content items in a tiled format, using icons to represent sub-folders and content items. |
Left Narrow |
pageStyle |
Left Narrow Page Style |
List View |
contentPresenter |
Displays multiple content items in a simple list. |
List with Details Panel View |
contentPresenter |
Displays multiple content items in a list on the left. A panel on the right displays the details of a selected item. |
Parameter Form |
taskFlowStyle |
|
Right Narrow |
pageStyle |
|
Sortable Table View |
contentPresenter |
Displays multiple content items in a sortable table that includes the document name, date created, and date modified. |
Html Page |
pageStyle |
HTML page style |
Spaces Default Navigation Model |
navigation |
Navigation model that displays current pages in a portal |
Portals Navigation with Blogs/Wikis/Lists Submenus |
navigation |
Navigation model that displays current pages and submenus for blogs, wikis and lists |
Stretch |
taskFlowStyle |
|
Tabbed View |
contentPresenter |
Displays multiple content items as tabs. Clicking a tab displays the associated item's details. |
Three Column |
pageStyle |
Three Column Page Style |
Web Page |
pageStyle |
Web Page Page Style |
Public-Pages Template |
siteTemplate |
Default Page Template for Public pages. |
Collaborative with Top Navigation |
siteTemplate |
Page Template for Collaborative Portals, with Flowing Layout and Top Navigation. Use WebCenter Portals FX Skin. |
Portal FX |
skin |
Portal FX Skin |
Portal-centric with Top Navigation |
siteTemplate |
Page Template for Portal-centric Sites, with Flowing Layout and Top Navigation. Use Portal FX Skin. |
Side Navigation |
siteTemplate |
Flowing Page Layout with Side Navigation. Use Portal FX Skin. |
Side Navigation (Stretch) |
siteTemplate |
Stretching Page Layout with Side Navigation. Use Portal FX Skin. |
Top Navigation |
siteTemplate |
Default Page Template with Flowing Layout and Top Navigation. Use Portal FX Skin. |
Top Navigation (Stretch) |
siteTemplate |
Stretching Page Layout with Top Navigation. Use Portal FX Skin. |
Wiki |
pageStyle |
Wiki Page Style |
Writeable Elements for siteresources
There are no writeable elements for this resource.
Use this resource type to identify the URI to use to retrieve a list of portal templates (GET
). The response from a GET
operation includes a list of template names. The main purpose of retrieving template names is to provide a value for the templateName
parameter for the create portal command.
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces resource templates
Supported Methods for templates
The following methods are supported by this resource:
GET
request - body: None
query parameters:
startIndex
projection
- Allowed values are summary
and details
. The default is summary
.
q
- Performs searches.
itemsPerPage
response - body: list of template names
For more information about query parameters, see Section 53.5.2.5, "Templates."
Resource Types Linked to from templates
Table 56-9 lists the resource types that the client can link to from this resource.
Use this resource type to identify the URI to use to view details for a single portal (GET
), create a nested portal (POST
), or delete a portal (DELETE
). The response from a GET
operation includes the specific portal identified by the URI, including its creator, description, members, and custom attributes.
Note:
The response from this resource also includes a link to the portal's message board.This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces space
The following methods are supported by this resource:
GET
request - body: None
query parameters:
projection
- Allowed values are summary
, and details
. The default is details
. Choose summary
to exclude member and custom attribute details.
response - body: Space
POST
– Creates a new portal that is a child of the named portal (a subportal). This feature supports creating hierarchical or nested portals.
request - body: Space
<space> <name>FooSpace</name> <description>foobar</description> <templateName>CommunityOfInterest</templateName> </space>
Note:
ThetemplateName
parameter must be a valid template name returned from urn:oracle:webcenter:spaces:resource:templates. For example, the default template names are:
Basic CommunityOfInterest ProjectSpace
DELETE
– Deletes the named portal.
request - body: None
On delete, a 204 status code is returned. If the portal does not exist or the user does not have permissions to delete the portal, a 403 Forbidden status is returned.
For more information about query parameters, see Section 53.5.2.5, "Templates."
Table 56-10 lists the writable elements for this resource.
Table 56-10 Writable Elements for urn:oracle:webcenter:space
Element | Type | Description |
---|---|---|
|
String |
Description of the portal. |
|
String |
Internal name for the portal. |
|
String |
Must be a valid template name returned from urn:oracle:webcenter:spaces:resource:templates. For example, the default template names are: Basic CommunityOfInterest ProjectSpace |
Table 56-11 lists the read-only elements for this resource.
Table 56-11 Read-only Elements for urn:oracle:webcenter:space
Element | Type | Description |
---|---|---|
|
String |
Global ID for the portal. |
|
String |
ID of the user who created the portal. |
|
User information about the user who created the portal, including GUID, ID, display name, and a link to the profile icon (same user as |
|
|
String |
Name of the portal as displayed to members. |
|
String |
Fully qualified URL for the portal's icon image. |
|
String |
Relative URL for the portal's logo image. |
|
Boolean |
Indicates whether the portal is offline or online. |
|
Boolean |
Specifies whether the portal is discoverable. |
|
Boolean |
Specifies whether the portal is public. |
|
String |
Lists keywords for the portal. |
|
String |
Lists the mailing list email for the portal if it has one. |
|
String |
Shows the parent display name if the portal is a child portal and has a parent. In this case, there will also be an |
|
String |
List of service ids whose data is to be copied to new portals/templates when created based off this portal. |
|
String |
The default language. |
|
String |
URI to the portal landing page if specified. |
|
Boolean |
Specifies whether or not this is a Template. |
|
Boolean |
Specifies whether or not you need approval to unsubscribe. |
|
Boolean |
Specifies whether or not the portal has an associated RSS feed. |
|
Boolean |
Specifies whether or not the portal is closed. |
|
Boolean |
Specifies whether or not all access to portal is blocked (not sure how this happens). |
|
String |
Returns the members element for the portal. |
|
String |
Returns the attributes element for the portal. |
Resource Types Linked to from space
Table 56-12 lists the resource types that the client can link to from this resource.
Use this resource type to identify the URI to use to view the Portal resource index.
Navigation Paths to resourceindex
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces space
Supported Methods for resourceindex
The following methods are supported by this resource:
GET
request - body: None
query parameters: None
response - body: resource index
Resource Types Linked to From resourceindex
Table 56-13 lists the resource types that the client can link to from this resource.
Use this resource type to get a list of roles for the named portal (GET
). The results returned from this call can be used to add a new member to a portal with urn:oracle:webcenter:space:members.
Navigation Paths to space:roles
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces space roles
The following methods are supported by this resource:
GET
– Returns the list of roles assigned to the named portal.
Resource Types Linked to from roles
Table 56-14 lists the resource types that the client can link to from this resource.
Use this resource type to get a named role (GET
).
Use this resource type to get a list of roles for the named portal (GET
). The results returned from this call can be used to add a new member to a portal with urn:oracle:webcenter:space:members.
Navigation Paths to space:role
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces space role
The following methods are supported by this resource:
GET
– Returns the named role.
Resource Types Linked to from role
Table 56-14 lists the resource types that the client can link to from this resource.
Use this resource type to get the icon used for the named portal (GET
).
Note:
This resource type is used for portal references, not for portal responses. This resource can be used anywhere a portal is referenced, like in an activity stream or a portal event.Navigation Paths to space:icon
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces space icon
The following methods are supported by this resource:
GET
– Returns the icon used for the named portal.
Resource Types Linked to from icon
Table 56-14 lists the resource types that the client can link to from this resource.
Use this resource type to identify the URI to use to view a list of custom attributes defined for a portal (GET
). The response from a GET
operation includes each custom attribute for the portal, and each attribute includes links to operate on that attribute. Also use this resource type to add custom attributes to a portal (POST
).
Navigation Paths to attributes
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces space attributes
Supported Methods for attributes
The following methods are supported by this resource:
GET
request - body: None
query parameters: None
response - body: collection of attributes
POST
– Adds a custom attribute to the named portal.
request - body:
<attribute> <name>anAttribute</name> <value>aValue</value> </attribute>
Writeable Elements for attributes
Table 56-17 lists the writeable elements for this resource.
Table 56-17 Writeable Resources for space:attributes
Element | Type | Description |
---|---|---|
name |
String |
Attribute name. |
value |
String |
Attribute value. |
Resource Types Linked to From attributes
Table 56-18 lists the resource types that the client can link to from this resource.
Use this resource type to identify the URI to use to view the name and value of single portal attribute (GET
). The response from a GET
operation includes the specific attribute identified by the URI.
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces space attributes
Supported Methods for attribute
The following methods are supported by this resource:
GET
request - body: None
query parameters: None
response - body: attribute
Read-only Elements for attribute
Table 56-19 lists the read-only elements for this resource.
Table 56-19 Read-only Elements for urn:oracle:webcenter:space:attribute
Element | Type | Description |
---|---|---|
name |
String |
Name of the custom attribute. |
description |
String |
Description of the custom attribute. |
type |
String |
Data type of the custom attribute. |
value |
String |
Value of the custom attribute. |
Resource Types Linked to From attribute
Table 56-20 lists the resource types that the client can link to from this resource.
Use this resource type to identify the URI to use to view a list of members for the portal (GET
). The response from a GET
operation includes each member of the portal, each member includes links to operate on that member.
Note:
You can only list or add users who are portal members using the REST APIs. Adding or listing of the enterprise groups that are members of the portal are not supported in this release.This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces space
The following methods are supported by this resource:
GET
request - body: None
query parameters: None
response - body: collection of members
POST
– Adds a member to the portal.
request - body: member
<member> <name>vicki</name> <role>Participant</role> </member>
DELETE
– Removes the named member from the portal. You can obtain the member guid with urn:oracle:webcenter:space:member.
request - body: None
DELETE http://hostname:portnum/rest/api/spaces/spacename/members/member_guid
Writeable Elements of spaces:space:members
Table 56-21 Writeable Elements of spaces:space:members
Element | Type | Description |
---|---|---|
name |
String |
The member's name. |
role |
String |
The member's role. Obtain this value from urn:oracle:webcenter:space:roles. |
Resource Types Linked to From members
Table 56-22 lists the resource types that the client can link to from this resource.
Use this resource type to identify the URI to use to view details for a portal member and their current role assignments (GET
). The response from a GET
operation includes the specific member identified by the URI, including a hyperlink to the member's profile.
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces space members
The following methods are supported by this resource:
GET
request - body: None
query parameters: None
response - body: member
Table 56-23 lists the read-only elements for this resource.
Table 56-23 Read-only Elements for urn:oracle:webcenter:space:member
Element | Type | Description |
---|---|---|
guid |
String |
Global ID for the portal member. |
name |
String |
User ID of the portal member. |
role |
String |
Role assigned to the member. |
displayName |
String |
Display name of the member. |
Resource Types Linked to From member
Table 56-24 lists the resource types that the client can link to from this resource.
Use this resource type to identify the URI to use to view (GET
) and add (POST
) lists for the portal. The response from a GET
operation includes each list in the portal, and each list includes links used to operate on that list. The response from a POST
operation includes the list that was created in this collection of lists and a link to operate on that list.
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces resourceindex space lists
The following methods are supported by this resource:
GET
request - body: None
query parameters:
startIndex
itemsPerPage
q
You can search on name
, title
, description
, creator
, created
, modifier
, and modified
.
For string type elements (that is, name
, title
, description
, creator
, and modifier
), you can use the following supported operands: equals
, not.equals
, and contains
. For example:
q=name:contains:issues q=creator:equals:monty
For date type elements (that is, created
and modified
), you can use the following supported operands: equals
, not.equals
, greater.than
, greater.than.or.equals
, less.than
, less.than.or.equals
. For example:
q=created:greater.than:10-SEP-2009
projection
- Allowed values are summary
and details
. The default is summary
.
response - body: collection of lists
POST
request - body: list
response - body: list
For more information about query parameters, see Section 53.5.2.5, "Templates."
Resource Types Linked to From lists
Table 56-25 lists the resource types that the client can link to from this resource.
Use this resource type to identify the URI to use to view (GET
), update (PUT
), and delete (DELETE
) a list belonging to a portal. The response from a GET
operation includes the specific list identified by the URI. The response from a PUT
operation includes the modified version of the list identified by the URI. The response to a DELETE
operation is a 204 status code.
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces resourceindex lists list
The following methods are supported by this resource:
GET
request - body: None
query parameters: None
response - body: list
PUT
request - body: list
response - body: list
DELETE
request - body: None
response - body: None
Table 56-26 lists the writable elements for this resource.
Table 56-26 Writable Elements for urn:oracle:webcenter:space:list
Element | Type | Required | Constraints | Description |
---|---|---|---|---|
name |
String |
Yes |
1 or more characters |
Name of the portal list. |
description |
String |
No |
0 or more characters |
Description of the list. |
columns |
Yes |
1 or more characters |
Columns that make up the list. |
Table 56-27 lists the read-only elements for this resource.
Table 56-27 Read-only Elements for urn:oracle:webcenter:list
Element | Type | Description |
---|---|---|
id |
String |
ID of the list. |
name |
String |
Name of the list. |
description |
String |
Description of the list. |
scopeguid |
String |
Global ID of the parent portal. |
scopename |
String |
Name of the parent portal. |
creator |
String |
ID of the user that created the list. |
author |
User information about the user that created the list, including GUID, ID, display name, and a link to the profile icon (same user as |
|
created |
Date |
Date the list was created. |
modifier |
String |
ID of the user that last modified the list. |
modifiedByUser |
User information about the user that last modified the list, including GUID, ID, display name, and a link to the profile icon (same user as |
|
modified |
Date |
Date the list was last modified. |
columns |
String |
Columns that make up the list. |
Resource Types Linked to From list
Table 56-28 lists the resource types that the client can link to from this resource.
Use this resource type to identify the URI to use to view (GET
) and create (POST
) list rows (list items). The response from a GET
operation includes each row in this list, each row includes links to operate on that row. The response from a POST
operation includes the row that was created in this list and a link to operate on that row.
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces resourceindex lists list rows
The following methods are supported by this resource:
GET
request - body: None
query parameters:
startIndex
itemsPerPage
q
You can search on name
, title
, description
, creator
, created
, modifier
, and modified
.
For string type elements (that is, name
, title
, description
, creator
, and modifier
), you can use the following supported operands: equals
, not.equals
, contains
, and starts.with
. For example:
q=name:contains:issues q=creator:equals:monty
For date type elements (that is, created
and modified
), you can use the following supported operands: equals
, not.equals
, greater.than
, greater.than.or.equals
, less.than
, less.than.or.equals
. For example:
q=created:greater.than:10-SEP-2009
response - body: collection of rows
POST
request - body: row
response - body: row
For more information about query parameters, see Section 53.5.2.5, "Templates."
Resource Types Linked to From rows
Table 56-29 lists the resource types that the client can link to from this resource.
Use this resource type to identify the URI to use to view (GET
), update (PUT
), and delete (DELETE
) a list row (list item). The response to a GET
operation includes the specific row identified by the URI. The response to a PUT
operation includes the modified version of the row identified by the URI. The response to a DELETE
operation is a 204 status code.
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces resourceindex lists list rows row
The following methods are supported by this resource:
GET
request - body: None
query parameters: None
response - body: row
PUT
request - body: row
response - body: row
DELETE
request - body: None
response - body: None
For more information about query parameters, see Section 53.5.2.5, "Templates."
Table 56-30 lists the writable elements for this resource.
Table 56-30 Writable Elements for urn:oracle:webcenter:space:list:row
Element | Type | Required | Constraints | Description |
---|---|---|---|---|
columns.column.id |
String |
Yes |
1 or more characters |
ID of the column (containing list item detail). |
columns.column.name |
String |
No |
1 or more characters |
Name of the column. |
columns.column.value |
String |
Yes |
1 or more characters |
Value of the column. |
Table 56-31 lists the read-only elements for this resource.
Table 56-31 Read-only Elements for urn:oracle:webcenter:space:list:row
Element | Type | Description |
---|---|---|
id |
String |
ID of the row (list item). |
listId |
String |
ID of the list. |
scope |
String |
Global ID of the parent portal. |
creator |
String |
ID of the user that created the list item. |
author |
User information about the user that created the list item, including GUID, ID, display name, and a link to the profile icon (same user as |
|
created |
Date |
Date the list item was created. |
modifier |
String |
ID of the user that last modified the list item. |
modifiedByUser |
User information about the user that last modified the list item, including GUID, ID, display name, and a link to the profile icon (same user as |
|
modified |
Date |
Date the list item was last modified. |
Resource Types Linked to From row
Table 56-32 lists the resource types that the client can link to from this resource.
Use this resource type to identify the URI to use to view (GET
) and create (POST
) list columns (list item detail). The response from a GET
operation includes each column in this list, each column includes link to operate on that column. The response from a POST
operation includes the column created in this list and a link to operate on that column.
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces resourceindex lists list columns
The following methods are supported by this resource:
GET
request - body: None
query parameters:
startIndex
itemsPerPage
q
- Search parameters STARTS.WITH
and END.WITH
are not supported.
response - body: collection of columns
POST
request - body: column
response - body: column
For more information about query parameters, see Section 53.5.2.5, "Templates."
Resource Types Linked to From columns
Table 56-33 lists the resource types that the client can link to from this resource.
Use this resource type to identify the URI to use to view (GET
), update (PUT
), and delete (DELETE
) a list column (list item detail). The response from a GET
operation includes the specific column identified by the URI. The response from a PUT
operation includes the modified version of the column identified by the URI. The response from a DELETE
operation is a 204 status code.
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces resourceindex lists list columns column
The following methods are supported by this resource:
GET
request - body: None
query parameters: None
response - body: column
PUT
request - body: column
response - body: column
DELETE
request - body: None
response - body: None
Table 56-34 lists the writable elements for this resource.
Table 56-34 Writable Elements for urn:oracle:webcenter:space:list:column
Element | Type | Required | Constraints | Description |
---|---|---|---|---|
columns.column.id |
String |
Yes |
1 or more characters |
ID of the column (containing list item detail). |
columns.column.name |
String |
No |
1 or more characters |
Name of the column. |
columns.column.value |
String |
Yes |
1 or more characters |
Value of the column. |
Table 56-35 lists the read-only elements for this resource.
Table 56-35 Read-only Elements for urn:oracle:webcenter:space:list:column
Element | Type | Description |
---|---|---|
id |
String |
ID of the column (list item detail). |
Resource Types Linked to From column
Table 56-28 lists the resource types that the client can link to from this resource.
You can expose various enterprise applications inside a portal, including:
Portal Framework applications—applications developed using the WebCenter Portal Framework.
Other portals in the WebCenter Suite—for example, Oracle Portal.
Oracle Applications Unlimited products—for example, E-Business Suite, Siebel, PeopleSoft, and JDEdwards.
Other custom applications—applications developed using non-Oracle platforms.
Technologies such as WSRP, Oracle JSF Portlet Bridge, ADF task flows, and WebCenter Portal support for external applications, enable the WebCenter Portal to consume and present application data in a unified way. The following sections tell you how.
This section includes the following subsections:
Section 56.3.1, "Exposing Portal Framework Applications in Portals"
Section 56.3.2, "Exposing Non-Oracle Applications in Portals"
You can expose Portal Framework applications, built using the WebCenter Portal Framework, as portlets and task flows in a portal:
Portlets: Web components that are deployed inside a container and generate dynamic content. For more information, see Chapter 57, "Introduction to Portlets."
Oracle JSF Portlet Bridge: A technology that enables you to easily expose existing ADF applications and task flows as JSR 168 portlets. For more information, see Chapter 58, "Creating Portlets from JSF Applications Using the Oracle JSF Portlet Bridge."
Task flows: ADF navigational components that define the transition between states and activities using call methods on managed beans, evaluating an EL expression, and so on. For more information see the "Getting Started with ADF Task Flows" section in Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.
You can expose Web applications developed using non-Oracle platforms in the WebCenter Portal, as follows:
Support for external applications: External applications enable credential stores to pass mapped user identities to Web applications that require their own authentication. For more information, see the "Registering External Applications" section in Oracle Fusion Middleware Administering Oracle WebCenter Portal, and the "Working with External Applications" chapter in Oracle Fusion Middleware Using Oracle WebCenter Portal.
Composer iframe-level integration: The Composer Web Page page style and component displays any Web page content, including pages from applications built using a different Web technology. For more information, see the "Working with the Web Page Component" section in Oracle Fusion Middleware Building Portals with Oracle WebCenter Portal.
Raw HTML markup injection in Composer: The Composer HTML Markup layout component injects HTML or JavaScript snippets into pages in Portal. You can use this component to display content from an external source. For more information see the "Working with the HTML Markup Component" section in Oracle Fusion Middleware Building Portals with Oracle WebCenter Portal.
OmniPortlet: A portlet that publishes data from various data sources using a variety of layouts. For more information, see Chapter 64, "Creating Portlets with OmniPortlet."