Oracle® Fusion Middleware Developer's Guide for Oracle WebCenter 11g Release 1 (11.1.1.5.0) Part Number E10148-15 |
|
|
View PDF |
This chapter describes how to expose Oracle WebCenter Spaces functionality in a WebCenter Portal application, using WebCenter Spaces APIs. Through these APIs, you can create new Spaces, manage Space membership, retrieve Space information, and more, from your WebCenter Portal applications.
The chapter also describes how to expose information from other applications, such as WebCenter Portal applications in WebCenter Spaces.
This chapter includes the following sections:
Note:
Custom-built task flows that implement WebCenter Spaces APIs (described in this chapter) can be deployed on WebCenter Portal applications, but you cannot deploy them to WebCenter Spaces.Audience
This section is intended for developers who want to expose WebCenter Spaces functionality in their WebCenter Portal applications.
WebCenter Spaces is a Web-based application, built using the Oracle WebCenter Framework, WebCenter services, and Oracle Composer. WebCenter Spaces furnishes all the tools you require to rapidly create portals, communities, and social sites capable of accommodating thousands of users and encompassing diverse populations with differing languages. Figure 54-1 shows a typical WebCenter Spaces home page.
Out of the box, WebCenter Spaces offers a configurable work environment that enables individuals and groups to work and collaborate more effectively. The application is a self-service solution for managing individual and group interactions. It also provides intuitive tools that allow business users to come together and share information by adding pages and resources such as documents, charts, reports, portlets, business applications, services, and other ADF resources or views.
WebCenter Spaces provides two work environments within a single application: the Home Space and Group Spaces. The Home Space provide each user with a private work area for storing personal content, viewing and responding to business process assignments, maintaining a list of online buddies, and performing many other tasks relevant to his or her unique working day. Group Spaces (from hereon referred to as Spaces) support discrete work areas organized around an area of interest or a common goal.
Spaces support the formation and collaboration of project teams and communities of interest. Spaces bring people together in a virtual environment for ongoing interaction and information sharing—in essence, forming a social network. Figure 54-2 shows an example of a Space.
Figure 54-2 Standards - Sample Group Space
Structurally, Spaces comprise pages, many of which are dedicated to a particular service. For example, a Lists page provides the means to create and publish multicolumn lists. A Documents page provides a central library for uploading, organizing, and managing group content. A Search page includes features for saving searches and managing search results. In addition to these and other default pages, a Space supports custom pages created by authorized users. Page creation is easy with a wide selection of predefined layouts. With little effort, users can provide pages neatly tailored to the unique needs of their team or community. For more information about Spaces, see the Oracle Fusion Middleware User's Guide for Oracle WebCenter Spaces.
WebCenter provides various services that Spaces can use to offer a wide variety of functionality in support of group objectives. For example, a Documents service provides features for uploading and managing content; a Discussions service provides features for creating, managing, and participating in discussion forums. Some other examples of these services include Events, Lists, Announcements, and Search. These services are what helps to make Spaces a productive, collaborative working environment. Services expose subsets of their features and functionality through task flows. A task flow is a reusable view that may expose all or a subset of the features available from a particular service. For example, a Recent Documents task flow provides a subset of the functionality offered through the Documents service by listing documents that have recently been opened, added, or affected in some way.
To help users get Spaces up and running quickly, they can be based on out-of-the-box templates. Additionally, WebCenter Spaces allows users to turn any Space into a template, so they can design Spaces to suit specific audiences and offer them up as templates for others to use. For information about creating templates, see "Creating Custom Space Templates" in the Oracle Fusion Middleware User's Guide for Oracle WebCenter Spaces.
WebCenter Spaces can consume portlets from any WSRP, Oracle PDK-Java, or Pagelet producer if the producer is registered first. Therefore, any portlets you create for WebCenter Portal applications can be used in WebCenter Spaces too. For more information, see the "Managing Portlet Producers" chapter in the Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter.
This section includes the following subsections:
Case Study 1: Purchasing Application Uses a Space to Evaluate Suppliers
Case Study 2: Customer Support Center Application Uses a Space to Discuss Customer Escalations
How to Set Up Your WebCenter Portal Application to Use the WebCenter Spaces APIs
How to Provide Space Functionality in WebCenter Portal Applications
While using your WebCenter Portal application, users may encounter situations where a Space 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 the WebCenter Spaces application. To this end, WebCenter Spaces provides access to a subset of its Space functionality through several APIs. Using these APIs, you can integrate powerful Space functionality into your WebCenter Portal application.
You can use WebCenter Spaces APIs to:
Create and manage Spaces and Space templates. You can create and delete Spaces, and add custom attributes. For more information, see Section 54.2.5.1, "Managing Spaces and Space Template."
Manage Space membership. You can add and remove Space members. For more information, see Section 54.2.5.2, "Managing Space Membership."
Retrieve information about Spaces and Space templates. For example, you can retrieve the WebCenter Spaces URL or the URL of a specific Space. You can also retrieve Space and Space template metadata. For more information, see Section 54.2.5.3, "Retrieving Information for Spaces and Space Templates."
WebCenter Spaces APIs are contained within several classes. Table 54-1 lists the different classes and describes the purpose of the APIs within each class.
Table 54-1 WebCenter Spaces API Classes
Class | Contains APIs for | More Information |
---|---|---|
|
Creating and managing Spaces and Space templates Managing Space membership Retrieving Space information |
Section 54.2.5, "How to Provide Space Functionality in WebCenter Portal Applications" |
|
Establishing context before calling the APIs |
Section 54.2.4.4, "Setting Up the WebCenter Spaces Client Context" |
|
Managing exceptions raised by the APIs |
Section 54.2.6, "How to Handle Exceptions Raised by WebCenter Spaces APIs" |
|
Retrieving information about Space members |
Section 54.2.5.3, "Retrieving Information for Spaces and Space Templates" |
|
Retrieving Space information |
Section 54.2.5.3, "Retrieving Information for Spaces and Space Templates" |
Spaces can have many different applications. From your perspective, as a WebCenter Portal application developer, here are a couple of case studies describing scenarios where building and working with Spaces through the APIs might come in useful:
In a purchasing application, a purchasing manager may create a Space to discuss the suitability of a new supplier. For more information, see Section 54.2.2, "Case Study 1: Purchasing Application Uses a Space to Evaluate Suppliers."
In a Customer Support Center application, a support analyst may create a Space to collaborate with other users about a customer escalation. For more information, see Section 54.2.3, "Case Study 2: Customer Support Center Application Uses a Space to Discuss Customer Escalations."
Consider a purchasing application built using the Oracle WebCenter 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 Space can provide this collaborative environment. So the purchasing application includes a call to the createGroupSpace
API, and this enables the purchasing manager to click a link (Create a New Space) that displays a "Create Space" dialog, directly from the purchasing application, as shown in Figure 54-3.
Figure 54-3 Purchasing Application Includes a Space 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 Space, and also selects a template (Purchasing Projects) as shown in Figure 54-4. The Purchasing Projects template sets up the Space 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 APIs enable you to create your own "Create Space" 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 Space from the Supplier ID so that the purchasing manager would not have to enter any details at all. The Space could then be created with just the click of a link.
When the purchasing manager clicks OK, WebCenter Spaces displays the new Supplier Evaluation Space in WebCenter Spaces, similar to that shown in Figure 54-5.
Figure 54-5 shows a Home page for the Supplier Evaluation Space, 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 Space was created is also provided. Clicking this link (Add/Update Vendors) displays the screen Add/Update Vendor transaction for the supplier Shaker Distribution.
In WebCenter Spaces, the purchasing manager becomes the moderator of the Space automatically. The moderator can add content to the Space, initiate discussions, invite members, and collaborate with interested parties. Once consensus is reached regarding the supplier, the purchasing manager is can approve or reject the supplier concerned.
Consider a Customer Support Center application built using the Oracle WebCenter 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 Space. The support analyst creates a Space from within the Customer Support Center application and adds the required members. These members are then notified and use the Space to start discussing the customer situation. The support analyst views their updates to the Space inside the support application, navigating to the Space whenever necessary to obtain more specific details. Based on the information she gets from the other members of the Space, she can diagnose the problem and offer the customer a solution very quickly.
Before you can use the WebCenter Spaces APIs you must ensure that the WebCenter Spaces application is up and running and that your project is set up correctly in JDeveloper.
This section includes the following subsections:
Setting Up the WebCenter Portal Application to Use WebCenter Spaces APIs
Securing the Connection Between the Application and WebCenter Spaces
If you want to use the WebCenter SpacesAPIs, the WebCenter Spaces application must be up and running.
To verify that WebCenter Spaces is up and running:
Start WebCenter Spaces. The URL is:
http://host:port/webcenter
You do not need to log in.
Verify that the WebCenter Spaces 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 54-6. If you do not see this page, contact your Fusion Middleware administrator.
For more information about setting up WebCenter Spaces, see the "Getting WebCenter Spaces Up and Running" chapter in the Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter.
Before you can call the WebCenter Spaces APIs in your WebCenter Portal application, you must ensure that your application contains the correct libraries and that there is a connection to the WebCenter Spaces Web service.
To set up your application to use the WebCenter Spaces APIs:
Start JDeveloper.
In the Application Navigator, expand the application for which you want to provide Space functionality.
The application should be based on the WebCenter 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
WebCenter Spaces 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 Spaces 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 54-1 appears:
Example 54-1 WebCenter Spaces 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 Spaces Web service endpoint at runtime, you can use the setGroupSpaceWebServiceEndpoint
API (Example 54-2). You can write a wrapper API 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 Spaces APIs in your WebCenter Portal application, you must ensure that the communication between the application (the consumer) and WebCenter Spaces (the producer) is secure. This is so that the identity of the user invoking the APIs is propagated to WebCenter Spaces in a secure manner where the integrity and confidentiality of the communication is maintained.
To do this, the WebCenter Spaces APIs use 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 Spaces 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 "Securing WebCenter Spaces for Applications Consuming Spaces Client APIs with WS-Security" in the Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter.
Before calling any of the WebCenter Spaces APIs in your application code, a few setup steps are required.
To set up the WebCenter Spaces client context
Domain-wide configuration settings are used when you call WebCenter Spaces APIs from an application deployed on WebLogic Server (WLS), unless you specifically choose to override them. To override or set security configuration parameters, use the APIs provided by the GroupSpaceWSContext
class.
In particular, you must set the SAML issuer name and the public key alias for WebCenter Spaces, which are required for data encryption. If the WebCenter Spaces 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 Spaces Web service endpoint, for example, http://server.example.com:8912/webcenter/SpacesWebService
.
samlIssuer
is the issuer URI of the SAML Authority issuing assertions for this SAML Asserting Party, for example, http://www.oracle.com
. Out-of-the-box, http://www.oracle.com
is the only trusted SAML issuer.
producer
is the public key alias for WebCenter Spaces, for example, orakey
if you are using a simple topology.
For information about the steps that the administrator must perform, see "Securing WebCenter Spaces for Applications Consuming Spaces Client APIs with WS-Security" in the Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter.
For a full list of the APIs provided by the GroupSpaceWSContext
class, see the Oracle Fusion Middleware Java API Reference for Oracle WebCenter.
Initialize the WebCenter Spaces 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 Spaces APIs.
The WebCenter Spaces APIs enable you to perform common Space-related operations within a WebCenter Portal application. Most of these APIs are provided by the GroupSpaceWSClient
class. The APIs can be grouped into three main categories:
Table 54-2 lists the APIs in the GroupSpaceWSClient
class.
Table 54-2 APIs for Performing Common WebCenter Spaces Operations
WebCenter Spaces API | Category | Description |
---|---|---|
|
Managing Spaces and Space Templates |
Creates a new Space based on a template. See Section 54.2.5.1.1, "Creating a Space." |
|
Managing Spaces and Space Templates |
Creates one or more custom attributes for a Space. See Section 54.2.5.1.2, "Creating a Custom Attribute." |
|
Managing Spaces and Space Templates |
Permanently removes a Space from WebCenter Spaces. See Section 54.2.5.1.4, "Deleting a Space." |
|
Managing Spaces and Space Templates |
Creates a new Space template based on an existing Space. See Section 54.2.5.1.3, "Creating a Space Template." |
|
Managing Space Membership |
Makes a user (or a group) a Space member with a specific role. See Section 54.2.5.2.1, "Adding Members to a Space." |
|
Managing Space Membership |
Invites a list of users to become members of a Space. See Section 54.2.5.2.2, "Inviting Users to Join a Space." |
|
Managing Space Membership |
Revokes Space membership. See Section 54.2.5.2.3, "Removing Members from a Space." |
|
Managing Space Membership |
Retrieves all the roles for a given Space. See Section 54.2.5.2.4, "Retrieving Role Information." |
|
Retrieving Information for Spaces and Space Templates |
Retrieves a list of Spaces for a given query string. See Section 54.2.5.3.1, "Retrieving a List of Spaces." |
|
Retrieving Information for Spaces and Space Templates |
Retrieves a list of public Spaces for a given query string. See Section 54.2.5.3.2, "Retrieving a List of Public Spaces." |
|
Retrieving Information for Spaces and Space Templates |
Retrieves a list of discoverable Spaces for a given query string. See Section 54.2.5.3.3, "Retrieving a List of Discoverable Spaces." |
|
Retrieving Information for Spaces and Space Templates |
Retrieves information (metadata) about the Space. See Section 54.2.5.3.4, "Retrieving Space Metadata." |
|
Retrieving Information for Spaces and Space Templates |
Retrieves information (metadata) about a Space given the Space's GUID. See Section 54.2.5.3.4, "Retrieving Space Metadata." |
|
Retrieving Information for Spaces and Space Templates |
Retrieves a list of Space templates for a given query string. See Section 54.2.5.3.5, "Retrieving a List of Space Templates." |
|
Retrieving Information for Spaces and Space Templates |
Retrieves information (metadata) about the Space template. See Section 54.2.5.3.6, "Retrieving Space Template Metadata." |
|
Retrieving Information for Spaces and Space Templates |
Retrieves information (metadata) about the Space template given the template's GUID. See Section 54.2.5.3.6, "Retrieving Space Template Metadata." |
|
Retrieving Information for Spaces and Space Templates |
Retrieves the WebCenter Spaces URL. See Section 54.2.5.3.7, "Retrieving the WebCenter Spaces URL." |
|
Retrieving Information for Spaces and Space Templates |
Retrieves a Space URL. See Section 54.2.5.3.8, "Retrieving a Space URL." |
|
Retrieving Information for Spaces and Space Templates |
Retrieves RSS feed URLs for the specified Space service. |
|
Retrieving Information for Spaces and Space Templates |
Retrieves RSS feed URL for a given Space by GUID and a given service. |
Use the following WebCenter Spaces APIs to manage your Spaces and Space templates:
createGroupSpace
setCustomAttribute
createGroupSpaceTemplate
deleteGroupSpace
Before you begin
Before using any of these APIs, you must complete all the steps listed in Section 54.2.4, "How to Set Up Your WebCenter Portal Application to Use the WebCenter Spaces APIs."
This section includes the following subsections
Use the createGroupSpace
API to create a Space that is based on an existing Space template.
To use this API, specify:
The internal name of the new Space. This name can contain blank spaces.
A display name for the new Space.
A description of the Space. Although this is not mandatory, we recommend that you provide a description to help users identify the Space's purpose.
The name of the Space 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 Space in searches.
Example 54-3 creates a Space with the name Databases that is based on the CommunityofInterest template. The example also specifies two search keywords (databases and Oracle).
Example 54-3 Creating a Space
//create the Space GroupSpaceWSMetadata gsMetadata = client.createGroupSpace("Databases", "Databases" "A community for people interested in databases", "databases, oracle", "CommunityofInterest"); //print the Space GUID to provide confirmation of creation System.out.println("GUID: " + gsMetadata.getGuid());
For an example of how to provide custom attributes for a new Space, see Section 54.2.5.1.2, "Creating a Custom Attribute."
Every Space 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 Space and its characteristics.
Use the setCustomAttribute
API to specify a custom attribute for a Space. To use this API, specify the name of the Space and a name, description, type, and value for the custom attribute.
Example 54-4 creates the Databases Space and then creates a custom attribute for that Space. The attribute is named Vendors, with the description List of vendors. It takes string values of Oracle and IBM.
Example 54-4 Creating a Custom Attribute
//create the Space 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
API to create a Space template based on an existing Space. To use this API specify a name, display name, and description for the template, and the name of the Space to use to create the template.
Example 54-5 creates a Space template based on the Databases Space.
Example 54-5 Creating a Space Template
GroupSpaceWSMetadata templMetadata = client.createGroupSpaceTemplate("DatabasesTemplate", "Databases Template", "A template based on the Databases Space", "Databases"); //print the template GUID to provide confirmation of creation System.out.println("GUID: " + templMetadata.getGuid());
Use the deleteGroupSpace
API to permanently delete a Space from WebCenter Spaces. To use this API, specify the name of the Space to delete. The API returns a boolean value to indicate whether the deletion was successful.
Example 54-6 deletes the Space with the name Databases. The example uses the boolean value returned by the API to print a message about the success or failure of the operation.
Use the following WebCenter Spaces APIs to manage Space membership:
addMember
inviteMember
removeMember
getRoles
Before you begin
Before using any of these APIs, you must complete all the steps listed in Section 54.2.4, "How to Set Up Your WebCenter Portal Application to Use the WebCenter Spaces APIs."
This section includes the following subsections:
Use the addMember
API to give users (and groups) Space membership and assign the new members to a specific role. To use this API, specify the name of the Space, 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 Space.
You must specify the name of a valid user or user group that exists in the WebCenter Spaces 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 Space, use the getRoles
API. For more information, see Section 54.2.5.2.4, "Retrieving Role Information." For more information about roles, see the "Managing Roles and Permissions for a Space" section in the Oracle Fusion Middleware User's Guide for Oracle WebCenter Spaces.
Example 54-7 makes users (of type GroupSpaceWSMembers
) named Pat and Vicki and everyone in the Sales and Marketing user group, members of the Databases Space. 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 54-7 Adding Members to a Space
//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 Space 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
API to invite users to become members of a Space. To use this API, specify the name of the Space 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 Space. An invitation to join the Space 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 Spaces 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 Space, use the getRoles
API. For more information, see Section 54.2.5.2.4, "Retrieving Role Information." For more information about roles, see the "Managing Roles and Permissions for a Space" section in the Oracle Fusion Middleware User's Guide for Oracle WebCenter Spaces.
Example 54-8 invites users (of type GroupSpaceWSMembers
) named Pat and Vicki to become members of the Databases Space with Viewer and Participant roles respectively.
Example 54-8 Inviting Users to Join a Space
//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 Space client.inviteMember("Databases", inviteMem);
Use the removeMember
API to revoke Space membership. To use this API, specify the name of the Space, and a list of users. The list must contain objects of type GroupSpaceWSMembers
that specify the user name. To obtain a list of current Space members, use the getGroupSpaceMetadata
API. For more information, see Section 54.2.5.3.4, "Retrieving Space Metadata."
Example 54-9 removes users (of type GroupSpaceWSMembers
) Pat and Vicki from the membership of the Databases Space.
Example 54-9 Removing Members from a Space
//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 Space 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
API to retrieve all the roles for a given Space. This is useful for determining which roles are available when adding or inviting members to a Space. Roles include out-of-the box roles (Moderator, Participant, Viewer) and also custom roles (if any). To use this API, specify the name of the Space.
Example 54-10 retrieves and displays role information for the Databases Space.
Use the following WebCenter Spaces APIs to retrieve Space information:
getGroupSpaces
getPublicGroupSpaces
getDiscoverableGroupSpaces
getGroupSpaceMetadata
getGroupSpaceMetadataByGuid
getGroupSpaceTemplates
getGroupSpaceTemplateMetadata
getGroupSpaceTemplateMetadataByGuid
getWebCenterSpacesURL
getGroupSpaceURL
Before you begin
Before using any of these APIs, you must complete all the steps listed in Section 54.2.4, "How to Set Up Your WebCenter Portal Application to Use the WebCenter Spaces APIs."
This section includes the following subsections
Use the getGroupSpaces
API to obtain a list of Spaces that match a given query string. To use this API, specify a query string. A null value query string returns a list of all Spaces that are accessible to the current user.
The API returns Spaces that are accessible to the current user, up to a maximum of 500.
Example 54-11 returns a list of Spaces containing the string Database.
Example 54-11 Retrieving a List of Specific Spaces
List<String> allGroupSpaces = client.getGroupSpaces("Database");
Example 54-12 returns a list of all Spaces to which the current user has access. This is achieved by specifying a null query string.
Use the getPublicGroupSpaces
API to obtain a list of public Spaces that match a given query string. To use this API, specify a query string. A null value query string returns a list of all public Spaces.
The API returns Spaces that are accessible to all users, even those who are not logged in to WebCenter Spaces, up to a maximum of 500.
Example 54-13 returns a list of public Spaces containing the string Database.
Example 54-13 Retrieving a List of Specific Public Spaces
List<String> allPublicGroupSpaces = client.getPublicGroupSpaces("Database");
Example 54-14 returns a list of all public Spaces. This is achieved by specifying a null query string.
Use the getDiscoverableGroupSpaces
API to obtain a list of discoverable Spaces that match a given query string. To use this API, specify a query string. A null value query string returns a list of all discoverable Spaces.
The API returns Spaces that are accessible to all users who are logged in to WebCenter Spaces, up to a maximum of 500.
Example 54-13 returns a list of discoverable Spaces containing the string Database.
Example 54-15 Retrieving a List of Discoverable Spaces
List<String> allDiscoverableGroupSpaces = client.getDiscoverableGroupSpaces("Database");
Example 54-14 returns a list of all discoverable Spaces. This is achieved by specifying a null query string.
Use the getGroupSpaceMetadata
or getGroupSpaceMetadataByGuid
APIs to obtain information (metadata) about a particular Space. This includes information such as the description of the Space, the name of the user who created it, the date on which it was last updated, and so on.
To use the getGroupSpaceMetadata
API, specify the name of the Space. To use the getGroupSpaceMetadataByGuid
API, specify the GUID of the Space. Note that while the Space name may be changed during the existence of the Space, the GUID always remains the same. You can obtain the GUID of a Space as follows:
getGroupSpaceMetadata("spaceName").getGuid();
Both APIs return a bean object that contains more APIs that you can then use for retrieving the Space metadata. These APIs are provided by the GroupSpaceWSMetadata
class. Table 54-3 lists the APIs returned by the bean object:
Table 54-3 APIs for Retrieving Space Metadata
Example 54-17 retrieves the Description, Keywords, and Last Updated Date information for the Databases Space given the Space's name.
Example 54-17 Retrieving Space Metadata Using the Space Name
//get the exact name of the Space 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 Space description System.out.println("Description: " + metadata.getDescription()); //get Space keywords System.out.println("Keywords: " + metadata.getKeywords()); //get the date the Space was last updated System.out.println("Last Updated Date: "+ metadata.getLastUpdated().toString()); }
Example 54-18 retrieves the Display Name, Creator, and Last Updated Date information for the Databases Space given the Space GUID.
Example 54-18 Retrieving Space Metadata Using Space GUID
GroupSpaceWSMetadata metadata = client.getGroupSpaceMetadataByGuid("Guid"); //get Space display name System.out.println("Display Name: " + metadata.getDisplayName()); //get the name of the user who created the Space System.out.println("Created By: " + metadata.getCreatedBy()); //get the date the Space was last updated System.out.println("Last Updated Date: " + metadata.getLastUpdated().toString());
Example 54-19 retrieves the Name, Description, Type, and Value for every custom attribute associated with the Databases Space.
Example 54-19 Retrieving Custom Attribute Metadata
//get the exact name of the Space 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<GSCustomMetadata.Attribute> attributes = metadata.getCustomAttributes(); //get name, description, type, and value for each custom attribute for(GSCustomMetadata.Attribute 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 54-20 retrieves a list of members of the Databases Space.
Example 54-20 Retrieving Membership Information
//get the exact name of the Space 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
API to obtain a list of Space templates that match a given query string. To use this API, specify a query string. A null value query string returns a list of all templates that are accessible to the current user.
The API returns templates that are accessible to the current user, up to a maximum of 500.
Example 54-21 returns a list of Space templates containing the string Interest.
Example 54-21 Retrieving a List of Specific Space Templates
List<String> allGroupSpaceTemplates = client.getGroupSpaceTemplates("Interest");
Example 54-22 returns a list of all Space templates to which the current user has access. This is achieved by specifying a null query string.
Use the getGroupSpaceTemplateMetadata
and getGroupSpaceTemplateMetadataByGuid
APIs to obtain information (metadata) about a particular Space 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
API, specify the name of the template. To use the getGroupSpaceTemplateMetadataByGuid
API, specify the GUID of the template. Note that while the Space template name may be changed during the existence of the template, the GUID always remains the same.
Both APIs return a bean object that contains more APIs that you can then use for retrieving the Space template metadata. These APIs are provided by the GroupSpaceWSMetadata
class. Table 54-4 lists the APIs returned by the bean object:
Table 54-4 APIs for Retrieving Space Template Metadata
WebCenter Spaces API | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
Returns a comma separated list of keywords used to describe the template. |
|
|
|
Example 54-23 retrieves the GUID, Description, and Created By information for the CommunityofInterest Space template given the template name.
Example 54-23 Retrieving Template Metadata Using the Template Name
GroupSpaceWSMetadata metadata = client.getGroupSpaceTemplateMetadata(myGroupSpaceTemplate); //get the exact name of the Space 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 54-24 retrieves the name of a Space template given the template GUID.
Use the getWebCenterSpacesURL
API to obtain the URL of WebCenter Spaces.
Example 54-25 retrieves the URL of the currently running instance of WebCenter Spaces.
Use the getGroupSpaceURL
API to obtain the URL of a specific Space. This is useful for when you want to construct a hyperlink for a Space or you have a relative URL that you need to make into an absolute URL. To use this API, specify the name of the Space.
Example 54-26 retrieves the URL of the Databases Space.
Example 54-27 prints a list of Spaces as hyperlinks.
Example 54-27 Printing a List of Spaces as Hyperlinks
//get the list of Spaces List<String> spaces = client.getGroupSpaces(""); //print the list of Spaces as hyperlinks for (String spaceName : spaces) { print("<a href =""" + client.getGroupSpaceURL(spaceName) + "">" + spaceName + "</a><br>"); }
To construct the URL of a particular Space page, retrieve the Space URL and then add the page information. For information about how to create pretty URLs for Space pages, see "WebCenter Spaces Pretty URLs" in the Oracle Fusion Middleware User's Guide for Oracle WebCenter Spaces.
In WebCenter Spaces, Space members can find out what is happening in a Space through various RSS news feeds. The following Space RSS feeds are available:
Announcements RSS - View Space 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 for these Space services, from a WebCenter Portal application, using the following WebCenter Spaces APIs:
getServiceRSSFeedURL
getServiceRSSFeedURLbyGuid
To obtain an RSS feed URL, you must identify the Space (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 Space RSS News Feed URLs Using getServiceRSSFeedURL
Use the getServiceRSSFeedURL
API to obtain service-related RSS news feed URLs for a particular Space by specifying the Space 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 Space
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 54-28 retrieves the recent activity RSS feed URL for a Space named Finance_Project:
Example 54-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
API to obtain service-related RSS news feed URLs for a particular Space by specifying the Space'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 Space GUID. For information about obtaining a Space's GUID, see Section 54.2.5.3.4, "Retrieving Space 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 54-29 retrieves the recent activity RSS feed URL for a Space with the GUID: s2201fa44_b441_4bdd_950e_47307f6f9800:
The GroupSpaceWSException
class provides APIs for handling exceptions raised by WebCenter Spaces APIs.
Table 54-5 WebCenter Spaces APIs in the GroupSpaceWSException Class
API | 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 APIs are not specific enough for your particular application. In these cases you can provide your own error messages.
Use the getLocalizedMessage
API to compose application-specific error messages.
Example 54-30 shows a servlet that includes code to create a Space. If any exceptions are raised during the creation process, a localized message is printed.
Example 54-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 Space"); } catch(GroupSpaceWSException ex) { 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
API to list all the errors that caused a particular exception.
Example 54-31 prints the exception and all the errors leading up to it.
Example 54-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 Space"); } catch(GroupSpaceWSException ex) { ex.printStackTrace(); } ... }
API Reference Documentation |
---|
For detailed syntax information for each API, see the Oracle Fusion Middleware Java API Reference for Oracle WebCenter. |
If you experience issues with WebCenter Spaces APIs, check the following:
Verify that the credential stores for both WebCenter Spaces and the client WebCenter Portal application are configured correctly.
See "Updating the Credential Stores" in the Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter.
Ensure the WebCenter Spaces client context is set up correctly in the WebCenter Portal application by checking the alias passed in the context.setRecipientKeyAlias
. The alias should be the public key alias of the producer (WebCenter Spaces), 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, Setting Up the WebCenter Spaces Client Context.
Check that keystores exist at both ends of the connection. For example:
- webcenter.jks
(copied to WebCenter Spaces end)
- clientapi.jks
(copied to WebCenter Portal 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
See also, Securing the Connection Between the Application and WebCenter Spaces.
Oracle WebCenter provides REST APIs to support various Space-related operations. You can use REST APIs to perform the following actions in WebCenter Spaces:
List all Spaces in WebCenter Spaces, list public Spaces only, list joined Spaces, list discoverable Spaces.
View details for a single Space.
List members of a Space.
List role assignments for Space members.
List custom attributes defined for a Space.
View the details of a particular custom attribute.
View and add lists for a Space.
View and update list items (rows) for a list.
View, update, and delete list item details (columns).
This section describes the WebCenter Spaces REST APIs. It contains the following subsections:
For an introduction to the REST APIs, see Section 55, "Using Oracle WebCenter 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 WebCenter Spaces REST APIs, 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 Spaces accessible to the current user. The client sends HTTP requests to this entry point to work with WebCenter Spaces.
For more information about the Resource Index, see Section 55.6.1, "The Resource Index".
For more information about resource types, see Section 55.6.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 54.3.4, "WebCenter Spaces Resource Types".
The taxonomy for WebCenter Spaces is:
urn:oracle:webcenter:spaces 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 55.9, "Security Considerations for WebCenter REST APIs."
The following sections provide all the information you need to know about each resource type:
Use this resource type to identify the URI to use to view a list of Spaces (GET
) and to create a new Space (POST
). The response from a GET
operation includes each Space, and each Space includes links to operate on that Space.
Navigation Paths to spaces
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces
Supported Methods for spaces
The following methods are supported by this resource:
GET
– Returns information on all Spaces.
request - body: None
query parameters:
startIndex
itemsPerPage
projection
- Allowed values are summary
and details
. The default is summary
.
visibility
- Determines which Spaces are included in the list: all Spaces, public Spaces only, joined Spaces, or discoverable Spaces.
Allowed values are all
, public
, joined
and discoverable
. The default is joined
.
response - body: collection of Spaces
POST
– Creates a new Space.
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 54-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 Space 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 Space command.
Navigation Paths to templates
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 55.6.2.5, "Templates."
Resource Types Linked to from templates
Table 54-7 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 Space (GET
), create a nested Space (POST
), or delete a Space (DELETE
). The response from a GET
operation includes the specific Space identified by the URI, including its creator, description, members, and custom attributes.
Note:
The response from this resource also includes a link to the Space's message board.Navigation Paths to space
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces space
Supported Methods for 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 Space that is a child of the named Space. This feature supports creating hierarchical or nested Spaces.
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 Space.
request - body: None
On delete, a 204 status code is returned whether or not the Space existed.
For more information about query parameters, see Section 55.6.2.5, "Templates."
Writable Elements for space
Table 54-8 lists the writable elements for this resource.
Table 54-8 Writable Elements for urn:oracle:webcenter:space
Element | Type | Description |
---|---|---|
|
String |
Description of the Space. |
|
String |
Internal name for the Space. |
|
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 |
Read-only Elements for space
Table 54-9 lists the read-only elements for this resource.
Table 54-9 Read-only Elements for urn:oracle:webcenter:space
Element | Type | Description |
---|---|---|
|
String |
Global ID for the Space. |
|
String |
ID of the user who created the Space. |
|
User information about the user who created the Space, including GUID, ID, display name, and a link to the profile icon (same user as |
|
|
String |
Name of the Space as displayed to members. |
|
String |
Fully qualified URL for the Space's icon image. |
|
String |
Relative URL for the Space's logo image. |
|
Boolean |
Indicates whether the Space is offline or online. |
|
Boolean |
Specifies whether the space is discoverable. |
|
Boolean |
Specifies whether the space is public. |
|
String |
Lists keywords for the space. |
|
String |
Lists the mailing list email for the space if it has one. |
|
String |
Shows the parent display name if the Space is a child space 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 spaces/templates when created based off this Space. |
|
String |
The default language. |
|
String |
URI to the Space 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 space has an associated RSS feed. |
|
Boolean |
Specifies whether or not the space is closed. |
|
Boolean |
Specifies whether or not all access to space is blocked (not sure how this happens). |
|
String |
Returns the members element for the space. |
|
String |
Returns the attributes element for the space. |
Resource Types Linked to from space
Table 54-10 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 WebCenter Spaces 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 54-11 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 Space (GET
). The results returned from this call can be used to add a new member to a Space 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
Supported Methods for roles
The following methods are supported by this resource:
GET
– Returns the list of roles assigned to the named Space.
Resource Types Linked to from roles
Table 54-12 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 Space (GET
). The results returned from this call can be used to add a new member to a Space 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
Supported Methods for role
The following methods are supported by this resource:
GET
– Returns the named role.
Resource Types Linked to from role
Table 54-12 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 Space (GET
).
Note:
This resource type is used for Group Space references, not for Group Space responses. This resource can be used anywhere a Group Space is referenced, like in an Activity Stream or a Group Space 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
Supported Methods for icon
The following methods are supported by this resource:
GET
– Returns the icon used for the named Space.
Resource Types Linked to from icon
Table 54-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 a list of custom attributes defined for a Space (GET
). The response from a GET
operation includes each custom attribute for the Space, and each attribute includes links to operate on that attribute. Also use this resource type to add custom attributes to a Space (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 space.
request - body:
<attribute> <name>anAttribute</name> <value>aValue</value> </attribute>
Writeable Elements for attributes
Table 54-15 lists the writeable elements for this resource.
Table 54-15 Writeable Resources for space:attributes
Element | Type | Description |
---|---|---|
name |
String |
Attribute name. |
value |
String |
Attribute value. |
Resource Types Linked to From attributes
Table 54-16 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 Space attribute (GET
). The response from a GET
operation includes the specific attribute identified by the URI.
Navigation Paths to attribute
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 54-17 lists the read-only elements for this resource.
Table 54-17 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 54-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 a list of members for the Space (GET
). The response from a GET
operation includes each member of the Space, each member includes links to operate on that member.
Navigation Paths to members
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces space
Supported Methods for members
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 Space.
request - body: member
<member> <name>vicki</name> <role>Participant</role> </member>
DELETE
– Removes the named member from the Space. 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 54-19 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 54-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 details for a Space 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.
Navigation Paths to member
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces space members
Supported Methods for member
The following methods are supported by this resource:
GET
request - body: None
query parameters: None
response - body: member
Read-only Elements for member
Table 54-21 lists the read-only elements for this resource.
Table 54-21 Read-only Elements for urn:oracle:webcenter:space:member
Element | Type | Description |
---|---|---|
guid |
String |
Global ID for the Space member. |
name |
String |
User ID of the Space member. |
role |
String |
Role assigned to the member. |
displayName |
String |
Display name of the member. |
Resource Types Linked to From member
Table 54-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 (GET
) and add (POST
) lists for the Space. The response from a GET
operation includes each list in the Space, 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.
Navigation Paths to lists
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces resourceindex space lists
Supported Methods for 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 55.6.2.5, "Templates."
Resource Types Linked to From lists
Table 54-23 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 Space. 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.
Navigation Paths to list
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces resourceindex lists list
Supported Methods for 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
Writable Elements for list
Table 54-24 lists the writable elements for this resource.
Table 54-24 Writable Elements for urn:oracle:webcenter:space:list
Element | Type | Required | Constraints | Description |
---|---|---|---|---|
name |
String |
Yes |
1 or more characters |
Name of the Space list. |
description |
String |
No |
0 or more characters |
Description of the list. |
columns |
Yes |
1 or more characters |
Columns that make up the list. |
Read-only Elements for list
Table 54-25 lists the read-only elements for this resource.
Table 54-25 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 Space. |
scopename |
String |
Name of the parent Space. |
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 54-26 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.
Navigation Paths to rows
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces resourceindex lists list rows
Supported Methods for 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 55.6.2.5, "Templates."
Resource Types Linked to From rows
Table 54-27 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.
Navigation Paths to row
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces resourceindex lists list rows row
Supported Methods for 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 55.6.2.5, "Templates."
Writable Elements for row
Table 54-28 lists the writable elements for this resource.
Table 54-28 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. |
Read-only Elements for row
Table 54-29 lists the read-only elements for this resource.
Table 54-29 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 Space. |
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 54-30 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.
Navigation Paths to columns
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces resourceindex lists list columns
Supported Methods for 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 55.6.2.5, "Templates."
Resource Types Linked to From columns
Table 54-31 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.
Navigation Paths to column
This section shows how the client can navigate through the hypermedia to access this resource:
resourceindex spaces resourceindex lists list columns column
Supported Methods for 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
Writable Elements for column
Table 54-32 lists the writable elements for this resource.
Table 54-32 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. |
Read-only Elements for column
Table 54-33 lists the read-only elements for this resource.
Table 54-33 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 54-26 lists the resource types that the client can link to from this resource.
You can expose various enterprise applications inside WebCenter Spaces, including:
WebCenter Portal applications—applications developed using the WebCenter 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 support for external applications, enable WebCenter Spaces to consume and present application data in a unified way. The following sections tell you how.
This section includes the following subsections:
You can expose WebCenter Portal applications, built using the WebCenter Framework, as portlets and task flows in WebCenter Spaces:
Portlets: Web components that are deployed inside a container and generate dynamic content. For more information, see Chapter 57, "Overview of 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 with 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, "Getting Started with ADF Task Flows" in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.
You can expose Oracle Applications Unlimited products, for example, E-Business Suite, Siebel, PeopleSoft, and JDEdwards, in WebCenter Spaces, using:
Web services and ADF: Enterprise applications like Siebel expose various web service interfaces. You can leverage these web service interfaces to build data controls, ADF task flows, and portlets that can be consumed in WebCenter Spaces.
Prebuilt portlets: Enterprise applications such as Oracle E-Business Suite ship portlets out of the box that you can register with WebCenter Spaces and consume in the same way as any other portlet.
You can expose Web applications developed using non-Oracle platforms in WebCenter Spaces, as follows:
WebCenter 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 "Registering External Applications" in the Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter and "Working with External Applications" in the Oracle Fusion Middleware User's Guide for Oracle WebCenter Spaces.
Oracle Composer iframe-level integration: The Oracle 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 "Adding a View into Another Web Page to a Page" in the Oracle Fusion Middleware User's Guide for Oracle WebCenter Spaces.
Raw HTML markup injection in Oracle Composer: The Oracle Composer HTML Markup layout component injects HTML or JavaScript snippets into WebCenter Spaces pages. You can use this component to display content from an external source. For more information see "Adding Markup, Such as HTML, JavaScript, and EL, to a Page" in the Oracle Fusion Middleware User's Guide for Oracle WebCenter Spaces.
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."