Content Management Guide

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Connecting to a Third-Party Repository

WebLogic Portal's Virtual Content Repository allows you to connect to non-BEA repositories. When third-party repositories are connected to the Virtual Content Repository, their content can be accessed by portal tools such as content placeholders, content selectors, and so on.

Some third-party content management vendors have built integrations (Content Service Provider Implementations or SPIs) that allow you to connect third-party repositories to the Virtual Content Repository. Contact your third-party repository vendor to find out the details about their implementation.

If the third-party repository you are using is JSR 170 compliant, you can connect to it via BEA's JSR 170 Connector, you can use BEA's JSR 170 Connector, see Working with a JSR 170-Compatible Repository. For more information about JSR170, see the JSR 170 website.

If you are using a third-party repository from a vender that has not written an implementation for WebLogic Portal's Virtual Content Repository, you can write your own using BEA's Service Provider Interface (SPI).

This chapter includes the following sections:

 


Working with Third-Party Repositories

Configuring a third-party repository to use with WebLogic Portal involves the following three steps:

  1. Create or obtain an SPI implementation for accessing the third party repository you want to use that integrates the functionality of your third-party repository with WebLogic Portal. If you are connecting to a JSR 170-compatibly repository, you do not need to write an SPI implementation.
  2. Adding the repository SPI jar(s) to your portal classpath to ensure your portal can communicate with the repository. For more information about adding a class to your classpath, see the WebLogic Server documentation.
  3. Connect the repository to the Virtual Content Repository using the Portal Administration Console. Depending on your implementation, you need to set various repository properties for your third-party repository so it connects with the Virtual Content Repository. These repository properties are SPI-specific and should be described in the SPI documentation.

 


Creating an SPI Implementation

The SPI implementation runs inside a WebLogic Portal enterprise application. Different implementations may affect scalability and performance for WebLogic Portal.

The following section gives a brief overview of some interfaces a SPI implementation for accessing a third-party repository must implement, and some of the classes the SPI implementation can use. See the Content SPI JavaDoc for detailed information.

The SPI includes two types of interfaces:

The SPI also includes classes that allow you to use error messages (repository exceptions) to indicate if operations are not allowed in the repository. For example, the SPI allows for content to be added to folders, if the repository does not allow that behavior then it must throw a RepositoryException stating so.

If a method is not implemented at all, then a UnsupportedRepositoryOperationException can be thrown.

This section includes the following topics:

Repository Connection Interfaces

Repository Connection Interfaces include the interfaces listed in Table 8-1. In order for a client of the SPI to connect to the services, the repository connection interfaces must be implemented. These interfaces allow an SPI implementation to be plugged into the BEA content management framework.

For more information about these repository connection interfaces, see the WebLogic Portal JavaDoc for the com.bea.content.spi package.

Table 8-1 Repository Connection Interfaces
Service Interface
Usage Notes
Repository
Repository defines the configuration for a content repository and also provides access to the content repository services through the Ticket.
ExtendedRepository
ExtendedRepository provides access to repository connections
Ticket
Ticket is the interface given back to the client after calling connect to a Repository with Credentials that are authenticated. It is the gateway to the content repository services.
ExtendedTicket
ExtendedTicket enables repository services that are available in WebLogic 9.2. For example, content workflows can be used. For more information about content workflows, see Using Content Workflows in Your BEA Repository.
Credentials
Credentials defines the credentials for a user attempting access to the content repository. Both authentication and authorization can be based on the Credentials.

Service Interfaces

Service Interfaces are used to perform the primary content management tasks within your repository such as adding content, updating it and deleting it.

Service interfaces are expected to be transactional (where necessary), threadsafe and scalable. There can be one implementation for all interfaces, or a separate implementation for each service interface. All service methods throw a general com.bea.content.RepositoryException. The SPI also includes a few standard exceptions that extend the RepositoryException.

Table 8-2 lists the service interfaces available with the content SPI. For more information about these service interfaces, see the WebLogic Portal JavaDoc for the com.bea.content.spi package.

Table 8-2 Service Interfaces
Service Interface
Usage Notes
NodeOps
NodeOps is the service interface for performing operations on content and its properties. This includes accessing, creating, updating, deleting, copying, moving and renaming content and content folders.
ExtendedNodeOps
ExtendedNodeOps provides access to newer features that are included in WebLogic Portal 9.2 such as dynamically sorting and filtering query results.
ObjectClassOps
ObjectClassOps is the service interface for performing operations on ObjectClasses (content types) and their PropertyDefinitions and PropertyChoices. This includes creating, updating and retrieving ObjectClasses.
ExtendedObjectClassOps
ExtendedObjectClassOps provides access to newer features for objectClasses (content types) that are included in WebLogic Portal 9.2 See Using Content Types in Your BEA Repository for more information.
SearchOps
SearchOps is the service interface for performing content searches. The search is based on the Search object defined in com.bea.content.expression along with the expression structure in the com.bea.p13n.expression package.
Search is for any content that matches the property and content type used in the expression. There are system properties that can be part of the search and are defined in the Search class.

ExtendedSearchOps

ExtendedSearchOps is used for full-text search content indexing operations.

Example of a Simple SPI Implementation

Listing 8-1 is an example of a repository implementation is that is called by the Virtual ContentManager.

Listing 8-1 Example of Repository Implementation
public class RepositoryImpl implements Repository
{
Properties properties;
String name;

public Ticket connect(Credentials credentials)
{
return new TicketImpl(credentials, properties);
}

public Ticket connect(String userName, String password)
{
Subject subject = com.bea.p13n.security.Authentication.
getCurrentSubject();
Credentials credentials = new Credentials(subject);
return new TicketImpl(credentials, properties);
}
public Properties getProperties()
{
return properties;
}
public void setProperties(Properties properties)
{
this.properties = properties;
}

public String getName()
{
return name;
}

public void setName(String name)
{
this.name = name;
}
}

 


Connecting to a Third-Party Repository

Once you have an SPI implementation, you need to connect the third-party repository to the Virtual Content Repository using the Portal Administration Console. After you have connected a third-party repository to the Virtual Content Repository, you can use that repository's content within your portal. If the third-party repository implementation includes write capabilities, you can also use the Portal Administration Console to modify content within the repository.

An SPI can be deployed multiple times with different configuration parameters. From the application's perspective, this appears as multiple repositories.

Note: BEA's library services are not supported for use with SPI implementations.

When you connect to a third-party repository, you may need to configure additional properties that match your third-party repository's configuration. Consult your third-party documentation to verify the properties you need to configure and the connection class you should use.

To connect a repository to the Virtual Content Repository:

  1. Within the Portal Administration Console, select Content > Content Management from the navigation menu at the top of the console.
  2. Select Manage | Repositories.
  3. In the Manage | Repositories tree, select the Virtual Content Repository.
  4. On the Browse tab, click Add Repository Connection. Figure 8-2 provides an example of the Browse tab within the Repositories section.
  5. Figure 8-1 Browse Tab within the Manage Repositories Window


    Browse Tab within the Manage Repositories Window

  6. In the Add Repository Connection dialog, provide the following information:
  7. Table 8-3 Repository Connection Information
    Field
    Description
    Repository Name
    The name you give your new repository. For example: MyNewRepository
    Connection Class
    Use the SPI connection class you have created or that has been provided by your third-party vendor. Be sure you have added this class to your classpath.
    Username
    If the SPI implementation requires a username, enter it here. When configuring a BEA repository, you can leave this blank.
    Password
    If the SPI implementation requires a password, enter it here. When configuring a BEA repository, you can leave this blank
    Retype Password
    If you entered a password, re-enter it here.
    Enable Library Services
    Unmark this check box if you do not want to use library services with this repository. Library services can ONLY be used with BEA repositories.

  8. Click Save.
  9. Within the Repositories section, click the repository you just created to verify that it has been created and view its Repository Summary.

 


Working with a JSR 170-Compatible Repository

WebLogic Portal provides a connector to repositories which implement the JSR 170 Specification such as Day Software's CRX. If you want to access a repository via its JSR 170 interface, you do not need to write a custom SPI implementation.

This section assumes you have already installed and configured a JSR 170 repository. For additional documentation about installing and using Day Software's CRX JSR 170 repository, see the WebLogic JSR 170 Adaptor Developer's Guide and the WebLogic JSR 170 Supported Configurations Guide.

This section discusses the following topics:

Searching within a JSR 170 Repository

When a repository is connected to the Virtual Content Repository, both content contributors and developers can search for content within the repository. However not all metadata provided by the Virtual Content Repository (system properties, MIME types, and so on) are supported by the JSR 170 specification, so some searches may be invalid.

The following system properties cannot be used when searching JSR 170 repositories:

The following search operators cannot be used:

Connecting to a JSR 170 Repository

To connect to a JSR 170 repository, do the following:

  1. Select Manage | Repositories to view the Repositories tree.
  2. Click the Virtual Content Repository.
  3. In the Browse tab, click Add Repository Connection. Figure 8-2 provides an example of the Browse tab within the Repositories section.
  4. Figure 8-2 Browse Tab within the Manage Repositories Window


    Browse Tab within the Manage Repositories Window

  5. In the Add Repository Connection dialog, provide the following information:
  6. Table 8-4 Repository Connection Information
    Field
    Description
    Repository Name
    The name you give your new repository. For example: MyNewRepository
    Connection Class
    The name of the connector class which connects the repository to WebLogic Portal.
    If connecting to the Day Software CRX repository, use the following connection class: com.day.content.spi.jsr170.JNDIRepository
    Username
    Enter the username required to connect to you third-party repository the third-party repository you are using.
    Password
    Enter the password required to connect to your third-party repository.
    Retype Password
    Re-enter the password required to connect to your third-party repository.
    Enable Library Services
    Unmark this check box to ensure library services are disabled.

    Note: Library services are not supported for third-party repositories.

  7. Click Save.
  8. Within the Repositories section, click the repository you just created to verify that it has been created and view its Repository Summary.
  9. Add the properties in Table 8-5 to your repository.
    Table 8-5 JSR170 Connector Properties
    Repository Property
    Required Value
    What it does:
    jsr170.hide.builtin
    true
    This property prevents repository-specific types and properties from interfering with the Virtual Content Repository.
    jsr170.uid.mapping
    uuid
    This property maps the IDs generated by your repository to the internal IDs needed by the Virtual Content Repository.
  10. Repeat the following steps for each property you want to add:

    1. In the Properties section, click Add Property.
    2. In the Name field, enter the name of the property you want to add.
    3. In the Value field, enter the value of the property.
    4. Click Save.
  11. Within the Repositories section, click the repository you just created to verify that it has been created and view its Repository Summary.

  Back to Top       Previous  Next