Forum Stats

  • 3,839,092 Users
  • 2,262,450 Discussions
  • 7,900,854 Comments

Discussions

Using the BEA Content Management System

251513
251513 Member Posts: 45
edited Jul 23, 2008 9:09AM in WebLogic Portal
Hello,

We are currently attempting to setup CMS under Weblogic Portal 8.1 (sp4) for use with an application we are building. We have built a new "type" with its own custom properties.

In a JSP, we need to provide drop downs that a user can select from, to query the CMS for documents. The values in the drop downs mirror the values in the property fields of the documents kept in the CMS. There should be a distinct list for the drop downs, no duplicate entries.

Has anyone built drop downs populated from the property values of the documents in CMS?

Was this built using content selectors? Or was this built using queries to the database supporting the CMS?

An additional note, the amount of content will increase by at least 1gig a year.

Thank you,
Robert
«1

Comments

  • 648838
    648838 Member Posts: 36
    Robert,

    Are you trying to build a custom search UI that is based on a user-specified Object class? Each object class would have its own unique set of property definitions. These are unique by their ID object. I would suggest retrieving all the object classes for your repository and populate a drop-down for each type and another for all the property definitions. This could dynamically change based on the selected object class.

    -Ryan
  • 251513
    251513 Member Posts: 45
    Not sure that I follow you entirely "on the user-specified Object class".

    What we have done is build one new "type" under the BEA CMS which will store all of the documents which the publishers wish to place in CMS. The drop down list values should correspond to some of the properties of this new type. There will be only one new type created (or that is the plan for now).

    So we are looking for best practice on how we can populate the drop down values from the values held in the property fields. Is using some sort of DISTINCT query in CMS the “best” way to do this? Or should we attempt to access the database which hosts CMS and run a query directly on the database?

    One question here is should we really be using content selectors in an application to do this sort of query and filtering of the results?
  • 648838
    648838 Member Posts: 36
    In WLP terms, Object Class is a content type. That's just the java class name used for the type object. There are public API's for getting content types - look at ObjectClassOps. Interrogate each returned ObjectClass (content type) and look at the PropertyDefinition objects contained on the type.

    Content Selectors are for retrieving content nodes (content instances), and won't provide access to property definitions directly.

    -Ryan
  • 251513
    251513 Member Posts: 45
    Ryan,

    Thank you for the information. One of the properties on this new content type we are building, is a binary property which stores a document file the user wants to look at. Said another way, there is a binary property to store a real document file, and the other properties are indexing to allow the user to find this document.

    The drop downs are indexes the user can use to build a query. The result of the query may be a list or an individual document. (Forget the returning of the list for a moment) In the case of a single document (HTML table, image of chart, or image of graphs) it will be displayed or rendered in the JSP. This means the file stored in the binary property field is pulled out of the Object and rendered on the page.

    Does this change the path you mention?

    Thank you
    Robert
  • Sroth-Oracle
    Sroth-Oracle Member Posts: 74 Employee
    Still not sure exactly what you're aiming for here. Let's get a little more concrete here.

    Suppose your type is called FooType and you have Property Definitions named 'type' and 'color'. Suppose you have Nodes of FooType called Foo1 (type=car, color=red) and Foo2 (type=truck, color=blue)

    Do you want your drop-down to
    a) show 'type' and 'color' (the various property definitions on the type-- similar to how WebLogic Workshop content selector wizard works)

    or
    b) given a property definition, show all property values across all nodes of that type (ie if type is selected, show 'car' and 'truck')

    or something else entirely?

    Thanks
    -Steve
  • 251513
    251513 Member Posts: 45
    Instead of a Node called FooType, we have created a Node called Foo which will hold all of the FooType content that we publish. The users will only be looking inside the Foo Node for content.

    We are looking to populate the drop down lists with distinct values from the FooType content property values in the repository.

    Foo1 type=car, color=red
    Foo2 type=truck, color=blue
    Foo3 type=car, color=blue


    So the drop down list should show:
    Type [dropdown] car, truck
    Color [dropdown] red, blue

    NOT
    Type [dropdown] car, truck, car
    Color [dropdown] red, blue, blue
  • Sroth-Oracle
    Sroth-Oracle Member Posts: 74 Employee
    The ability to retrieve a set of distinct values (across all nodes) for a given Property Definition is not a built-in capability.

    However, you can add this capability, like this:
    - find an external storage location for storing this data (basically a 1:m relationship from String propDef to propDefValue) -- see below for some ideas.

    First, process existing nodes:
    - for each property definition on the specified type:
    - retrieve all nodes of that type (by iterating, or by query)
    - for each node of that type:
    - retrieve the property value
    - check if the property value is in the external storage location; if not, add it
    - end for
    - end for

    Once this is complete, you only need to process new nodes:
    - when node of the specified type is added, for each property definition:
    - check if the property value is in the external storage location; if not, add it.

    You can construct your drop-down list from the external storage data.

    Several ideas for the external storage location:
    - unrestricted property choices on the associated PropertyDefinition on the ObjectClass.
    - database table
    - content nodes of a new type.
  • 251513
    251513 Member Posts: 45
    Thank you for the response. We thought conceptually it was possible, using coding, and you have confirmed that it. The concern here is our users are going to be placing 1GIG a year in the repository. So over time what impact will this have on performance (displaying a page w/ drop downs). There are plans to have additional groups of users publishing as well (content amount published unknown).


    That said, a second option, we wanted to know if it is possible to build lookup tables in a database. The lookup tables would house the distinct values. The lookup tables will then be used to populate the drop down in the JSP. The problem here is how to tie these lookup tables into the My Content Portlet so that the publishers use the same values.

    Is the database option possible? Can we use lookup tables to power drop down lists in My Content Portlet?


    Thank you,
  • 251513
    251513 Member Posts: 45
    Regarding the database lookup tables piece, just to clarify, what we are talking about is two separate interfaces.

    The original post was for building a user interface to search for content that is published to the CMS. This would be used by anyone coming into the application to look for information. Read this to be any user from Public to someone having a particular role assigned. This is a JSP, not the My Content Portlet.

    The second interface is the My Content Portlet which will be used by the Publishers to put new content into CMS. We are trying to find out if there is a way to tie in a property field drop down in My Content Portlet to the lookup table in the database. This way we keep the properties in the content type in sync with both interfaces.

    This would allow us to drive both interface drop downs from the database. Here we can put indexes on the tables and cleanly do a select distinct from the table.
  • Sroth-Oracle
    Sroth-Oracle Member Posts: 74 Employee
    Sorry for the delay.

    Regarding the original post, I dont believe the size (1gig/year) would matter much; while constructing the original range-of-values may take awhile, any additional changes would be minor and very fast. Since the values are already in the 'range-of-values' table, any additional query time should be very minimal -- time for a DB query. Any additional time during insert should also be very minimal -- for each property, an additional SQL statement to insert if not already present in the 'range-of-values' table.

    Yes, I was suggesting you create a lookup table to store these distinct values.

    Regarding the My Content Portlet, if you are referring to the version shipped as part of WLP 8.x, I dont believe this version contains the ability to tie in a lookup table.
This discussion has been closed.