|
Samples |
This chapter describes how to deploy, run, and access the source files for sample components provided with the eXtend Director installation. It has these sections:
NOTE This chapter assumes you are familiar with running components in the Portal subsystem. For more information, see the chapter on developing components in the Portal Guide.
The eXtend Director installation provides collections of core and sample portal components packaged in JAR files. While most of these components are standalone implementations, others can be run as part of larger installed applications. There are two general categories of installed components:
Core components Core components are either implemented directly by Director or are presented as best-practice implementations of framework and subsystem technologies. These components are fully supported features in the Director product. Core components are specified as such in the description header.
NOTE The core component JARs are automatically added when you create a project using the Director EAR Wizard in Workbench.
The deployment classes and artifacts for the core components are contained in these deployment JARs:
Sample components Sample components are various examples and utilities for learning about Director and getting started with application development. These components may not be supported in future versions of Director.
The deployment classes and artifacts for the samples are contained in these deployment JARs:
The component descriptions in this chapter include this information:
The next procedure describes how to add the sample components to your project. You can use the same procedure to add core components if you opted not to install them when you created the project.
To add sample components to your Director project:
With your project open in Workbench, click the Resource tab in the Navigation Pane and select any view.
Navigate to the JAR directory. For the sample components:
Director install-directory/samples/components
Workbench adds the JAR to your current project's resource set and updates the appropriate configuration parameters.
Use one of these options to run a component:
component content with decorator This URL displays the component content with the associated decorator (header and frame) if a decorator has been defined:
http://server_name/DirectorDB/Project_name/Portal/main/component/component_descriptor_name
component content only This modified version of the URL displays the content only:
http://server_name/DirectorDB/Project_name/Portal/main/comp/component_descriptor_name
Portal Personalizer You can also run components using the Portal Personalizer core application. For more information, see Personalizing Your Portal in the Portal Guide.
Displays a running advertisement banner.
|
Descriptor |
Advertisement |
|
Class and source |
com.sssw.portal.component.advertisement.AdvertisementComponent |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
misc_sample_components |
Runs a calender organizer that lets users schedule events for selected periods and search for items. Calendar is supported by multiple components and utility classes responsible for specific functions. Calendar illustrates the use of an XML DOM object. All search criteria and events are contained within the DOM.
Oracle DB users To run this component in the current version of Director, you need to do the following:
With your project open in Workbench, access this file:
Portal/WEB_INF/lib/calendar-components/data/portal-general/props/calendar.properties
Save the file and deploy your project.
Changes the password for the currently logged in user.
NOTE This component is not supported in the WebLogic server realm for the current release.
|
Descriptor |
ChangePassword |
|
Class and source |
com.sssw.portal.component.core.ChangePassword |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
portal_core_resource.jar |
|
Usage |
Add a new password and confirm. |
|
Descriptor |
Clock |
|
Class and source |
com.sssw.portal.component.clock.ClockComponent |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
misc_sample_components.jar |
Reads documents out of the Content Management subsystem and processes all s3comp tags in the page before displaying the page. It also alters all image tags in the page so that the images will be properly displayed.
|
Descriptor |
CMPIDReader |
|
Class and source |
com.sssw.portal.component.pidreader.CMPIDReader |
|
Subsystem(s) |
Portal, Content Management |
|
Deployment JAR |
contentMgmt_components.jar |
Uses the installed Query action to query documents in the content management system. The results of the query are captured in XML and processed as a query in the Content Management subsystem.
|
Descriptor |
ContentList |
|
Class and source |
com.sssw.portal.component.cm.ContentList |
|
Subsystem(s) |
Portal, Rule, Content Management |
|
Deployment JAR |
cqa_components.jar |
|
Usage |
Edit the ContentList rule in cqa_components.jar and run the ContentList component. Default returns all documents. Select the document ID from the result to access the document
|
|
Related Info |
See MyDocuments and NewDocuments. |
A superclass you can implement to delegate processing from one component to other components.
|
Descriptor |
Delegator |
|
Class and source |
com.sssw.portal.component.util.Delegator |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
utility_sample_components.jar |
|
Usage |
This component is not visual. Delegator defines a string parameter, a preGetComponentData() method, and a postGetComponentData() method. Subclass this component when you want to encapsulate logic for delegated components. |
|
Related Info |
|
Displays a selectable list of Portal components. This component is used as part of a plug-in DreamWeaver extension that allows you to insert Portal components on a page.
|
Descriptor |
DWCompList |
|
Class and source |
com.sssw.portal.component.core.DreamWeaverComponentList |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
portal_core_resource.jar |
|
Related Info |
See Using DreamWeaver with Director in the Core Development Guide. |
Fires a sample rule that returns True.
Displays a list of headlines from selected Web news sites.
|
Descriptor |
HelloWorld |
|
Class and source |
com.sssw.portal.component.helloworld.HelloWorldComponent |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
general_components.jar |
Gets the run-time component data of a document (in HTML or XML format) from the Content Management Subsystem.
Displays a bonus calculation for sample employees. Uses a rule to get the results.
Allows a portal user to select a page column layout for a personal page. This component is part of the Portal Personalizer core application.
|
Descriptor |
LayoutPicker |
|
Class and source |
com.sssw.portal.component.core.LayoutPickerDialog |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
portal_core_resource.jar |
|
Usage |
See the chapter on Personalizing Your Portal in the Portal Guide. |
Allows a portal user to select the order and location of components on a personal page.This component is part of the Portal Personalizer core application.
|
Descriptor |
LayoutSelector |
|
Class and source |
com.sssw.portal.component.core.LayoutSelectorComponent |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
portal_core_resource.jar |
|
Usage |
See the chapter on Personalizing Your Portal in the Portal Guide. |
This component subclasses the Delegator component. It uses an attribute on a PID page to call another component and logs information about that component to the server console.
|
Descriptor |
Meter |
|
Class and source |
com.sssw.portal.component.util.Meter |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
utility_sample_components.jar |
|
Usage |
Specify the delegated component in a PID page, as shown in this example: <s3-component id="Meter"
METER="mycomponent"/>
NOTE You can use multiple instances of this component in a single PID page. The Meter component calls the delegated component and prints logging messages to the server console. The log includes the caller's user ID, component name, and other information. When deploying this component, note the following: |
|
Related Info |
See Delegator. |
Generates XML that is converted to HTML using a specified XSL style sheet.
Uses the installed Query action to query documents in the content management system. Returns a list of documents associated with the current user. The results of the query are captured in XML and processed as a query in the Content Management subsystem.
|
Descriptor |
MyDocuments |
|
Class and source |
com.sssw.portal.component.cm.MyDocuments |
|
Subsystem(s) |
Portal, Rule, Content Management |
|
Deployment JAR |
cqa_components.jar |
|
Usage |
Edit the MyDocuments rule in cqa_componets.jar and run the MyDocuments component. Default specifies the current user as a parameter in the Query action.
|
|
Related Info |
See ContentList (core) and NewDocuments. |
Displays a header for the portal user page that allows the user to select pages to view. This component is used in the Portal Personalizer core application.
|
Descriptor |
MyPages |
|
Class and source |
com.sssw.portal.component.core.MyPagesComponent |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
portal_core_resource.jar |
|
Usage |
See the chapters on Using the Custom Web Application and Personalizing Your Portal in the Portal Guide. |
Uses the installed Query action to query documents in the content management system. Returns a list of documents created or modified on the current date. The results of the query are captured in XML and processed as a query in the Content Management subsystem.
|
Descriptor |
NewDocuments |
|
Class and source |
com.sssw.portal.component.cm.NewDocuments |
|
Subsystem(s) |
Portal, Rule, Content Management |
|
Deployment JAR |
cqa_components.jar |
|
Usage |
Edit the NewDocuments rule in cqa_components.jar and run the NewDocuments component.
|
|
Related Info |
See ContentList (core) and MyDocuments. |
Generic component that allows users to add themselves to the server realm through the Directory service. This component is used by the Portal Personalizer core application.
|
Descriptor |
NewUser |
|
Class and source |
com.sssw.portal.component.core.NewUserComponent |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
portal_core_resource.jar |
|
Related Info |
For information about the source see the section on Using the New User component in the User Management Guide |
Displays a search box and looks up names based on the input data.
Imports the contents of a target PID page into the calling PID page.
Displays the results of validating a rules pipeline.
|
Descriptor |
PipelineWrapper |
|
Class and source |
com.sssw.portal.component.wrapper.PipelineWrapperComponent |
|
Subsystem |
Portal, Rule |
|
JAR file |
rule_sample_components.jar |
|
Usage |
Select a pipeline from the dropdown list. The result is displayed in the current browser context. |
|
Related Info |
|
Allows a portal user to select components for a personal page.This component is part of the Portal Personalizer core application.
|
Descriptor |
PortalComponentSelector |
|
Class and source |
com.sssw.portal.component.core.PortalComponentSelector |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
portal_core_resource.jar |
|
Usage |
See the chapter on Personalizing Your Portal in the Portal Guide. |
Generic component that allows users to be authenticated by the server realm through the Security service. This component is used by the Portal Administration Console (PAC) and the Portal Personalizer core application.
|
Descriptor |
PortalLogin |
|
Class and source |
com.sssw.portal.component.core.LoginComponent |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
portal_core_resource.jar |
|
Related Info |
For information about the source see the section on using the Directory API in the User Management Guide |
Allows portal users to create user and group pages and access other application features. This is the main page for the Portal Personalizer core application.
|
Descriptor |
PortalPersonalizer |
|
Class and source |
com.sssw.portal.component.core.PortalPersonalizerComponent |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
portal_core_resource.jar |
|
Usage |
See the chapter on Personalizing Your Portal in the Portal Guide. |
|
Related Info |
List of other sample components used by the Portal Personalizer application: |
Provides a mechanism for retrieving and parsing portal URLs. It instantiates a portal context object and translates the provided string, substituting any portal replacement strings with current valid URL information:
|
Descriptor |
PortalUrlHelper |
|
Class and source |
com.sssw.portal.component.core.PortalUrlHelperComponent |
|
Subsystem |
Portal |
|
JAR file |
portal_core_resource.jar |
|
Usage |
The following example shows how to use the PortalUrlHelper component on a PID page. This example displays the name of the currently selected theme: <s3-component id="PortalUrlHelper" instance="MyPortalUrlHelper" SUBST_STRING="$THEME_ID$"/> To give you an easy way to parse portal URLs on JSP pages, Director provides a custom tag called PortalUrlHelper. |
|
Related Info |
For more information on portal replacement strings, see the chapter on replacement strings in the Portal Guide. For more information on the PortalUrlHelper custom tag, see the tag library reference in the Portal Guide. |
Displays.the contents of a portal user page in the Portal Personalizer core application.
|
Descriptor |
PortalUserPage |
|
Class and source |
com.sssw.portal.component.core.PortalUserPage |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
portal_core_resource.jar |
|
Usage |
See the chapter on Personalizing Your Portal in the Portal Guide. |
Provides an RSS (Rich Site Summary) application that includes a Content Syndication reader and a Content Syndication provider that use the RSS standard. Uses the Content Query application to generate queries for RSS providers.
Displays the results of firing a rule selected from your project resource set.
Displays a stock quote. This component uses a document style Web Service to get and return the data.
|
Descriptor |
StockQuote |
|
Class and source |
com.sssw.portal.component.stockquote.StockQuote Also contains supporting classes for executing the Web Service. |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
general_components.jar |
|
Usage |
Enter a stock symbol and click Get Quote. Click Refresh to send a new WSDL to the service. |
|
Related Info |
The WSDL can be accessed at: http://ws.cdyne.com/delayedstockquote/delayedstockquote.asmx. |
Provides a selectable list of all available themes with runtime examples in a portal page. This component uses the PIDComponent (core) to import the contents of ThemeTester.html, which references the ThemeTester (core) component.
|
Descriptor |
ThemePreviewer |
|
Class and source |
com.sssw.portal.component.core.PIDComponent. |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
portal_core_resource.jar |
|
Usage |
The selected theme is applied to all them-enabled pages in the portal application. |
|
Related Info |
See the chapter on Working with Portal Themes in the Portal Guide |
Allows a portal user to view and select a theme for the application. This component is used in the Portal Personalizer core application.
|
Descriptor |
ThemeSelector |
|
Class and source |
com.sssw.portal.component.core.ThemeSelectorComponent |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
portal_core_resource.jar |
|
Usage |
See the chapter on Personalizing Your Portal in the Portal Guide |
|
More Info |
See the chapter on Working with Portal Themes in the Portal Guide |
Displays all available themes with sample data.
|
Descriptor |
ThemeTester |
|
Class and source |
com.sssw.portal.component.core.ThemeTesterComponent |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
portal_core_resource.jar |
|
Usage |
|
|
More Info |
See the chapter on Working with Portal Themes in the Portal Guide |
Displays an editable weather report for selected US cities. This component uses a document style Web Service to get and return the data.
|
Descriptor |
Weather |
|
Class and source |
com.sssw.portal.component.weather.WeatherComponent Also contains supporting classes for executing the Web Service |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
general_components.jar |
|
Usage |
To request a weather report, enter a zip or a city and state. For example:
|
|
Related Info |
This component uses a Web Service WSDL document generated in eXtend Composer. The Web Service is maintained on the SilverStream DevCenter Web site, and the WSDL can be accessed at http://devcenter2.silverstream.com/extend/wsdl/WeatherForecastService.wsdl. The WSDL was built on top of this Web Site: http://weather.gov. |
Displays a welcome message to the user and provides a link to the Portal Personalizer core application.
|
Descriptor |
Welcome |
|
Class and source |
com.sssw.portal.component.welcome.WelcomeComponent |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
misc_sample_components.jar |
Monitors changes to the ResourceSet of the current Director project. Logs the directory name, path and file name of resources that have been added or modified in the current session.
|
Descriptor |
WhatChanged |
|
Class and source |
WhatChanged |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
misc_sample_components |
Allows a user to select components for a wireless device. This component is used by the Portal Personalizer core application.
|
Descriptor |
WirelessLayoutManager |
|
Class and source |
com.sssw.portal.component.core.WirelessLayoutManagerComponent |
|
Subsystem(s) |
Portal |
|
Deployment JAR |
portal_core_resource.jar |
|
Usage |
See Developing a Wireless Application in the Portal Guide |
Provides a workflow application for a document assign, create, and publish workflow process. The application uses the Content Management subsystem to create and publish a document This application requires the Portal, Content Management, and Workflow subsystems. Here is a summary of the application contents:
|
Content and JAR |
Description |
|---|---|
|
WorkflowAdminClient |
Component that allows workflow administrators to manage running processes and process activities.
|
|
WorkflowAssign |
Component that represents the workitem for the content assign activity in the workflow process. |
|
WorkflowAuthorize |
Component that represents the workitem for the content authorization activity in the workflow process. |
|
WorkflowCreate |
Component that represents the workitem for creating a document in the Content Management subsystem. |
|
WorkflowEngineAdmin |
Component that allows administrators to manage the workflow engine and queue processes.
|
|
WorkflowQueue |
Component for getting a list of workitems for a workflow user.
|
|
WorkflowStartProcess |
Component that allows a user to start a process instance.
|
|
EboPublishContent |
Implementation of the sample process Publish Automatic activity. |
|
Sample Content Management Process. |
Workflow process definition created in the Workflow Designer. |
|
activity-policy.xml |
Descriptor for specifying activity client types.
|
To see how the application works you first need to set up some workflow users. Users must be defined in the security role descriptors defined in the workflow_components.jar and workflow_sample_components.jar.
In Workbench, open WorkflowUsers.xml in your project EAR's workflow_components.jar and in the workflow_samples_component.jar:
In each descriptor add at least one user in the user-map section. For example:
<principal>sample1</principal> <principal>sample2</principal> <principal>sample3</principal>
A user called sample is defined by default.
NOTE The same users must be defined in your server security realm before you run the application.
To run the workflow sample application:
Log in to MyPortal using the sample user:
user ID: sample
Password: sample
From the Workflow category in the Portal Personalizer, add these components to a portal page:
In separate browsers log in as the other users you defined and add the WorkflowQueue component (WorkflowStartProcess is optional).
In the sample user browser go to the Workflow Start Process component, select the process from the dropdown list and click Start.
This creates a workitem in the WorkflowQueue component.
Select the workitem and click View Item. This displays a workitem property sheet.
Complete the form and specify one of your workflow users as an addressee.
To follow the process through content creation and approval, log in as the user you specified for each addressee and complete the workitems.
Dynamic addressing of workitems The workflow sample allows users to specify the addressee for the next activity. The sample process defines that the addressee be resolved at runtime based on a workitem property. Whatever that workitem property value is at the time the activity gets forwarded determines the addressee. When the component sets a new addressee, it just sets a workitem property on the workitem delegate:
delegate.setProperty( new EboProperty(WORKITEM_ADDRESSEE, m_addressee, EboConstants.ATT_STRING, false), context );
NOTE Rule Links provide the ability to set addressee information dynamically as well. For more information, see the section on Rule links in the Workflow Designer chapter of the Workflow Guide.
A superclass used to implement the rule and pipeline wrappers. You can use it to create wrappers for other objects.
|
Samples |
Copyright © 2002, SilverStream Software, LLC, a wholly owned subsidiary of Novell, Inc. All rights reserved.