You can create a new handler definition by copying an existing handler definition file and saving it with a different name.
- Copy one of the existing handler definitions in the IBM® WebSphere® Portlet Factory WEB-INF/config/selection_handlers directory.
- Save the copied file with a new name, such as account_type_handler.xml.
Note: Because the WebContent/WEB-INF/config directory is by default an excluded resource, you need to override the team file and directory exclusion to ensure that your new or modified file is kept updated in source control storage.
- Set the values of the following elements.
This is the name of the handler, which will be used as the display name in the Profile Manager to allow the user to select a handler for their profile set. Description
A short description that specifies the functionality of the handler.Selection
Set the class attribute to the name of the class that extends the BaseSelectionHandler class. Include the full package name (for example, com.acme.AccountTypeSelectionHandler).Properties
Optional. These are name and value pair properties that are passed as a map to the init() method of your ProfileSelection and SegmentList implementation classes.SegmentList class
Optional. Set the class attribute to the name of the class that implements the SegmentList interface. The Profile Manager uses this class to get the list of segments for this handler. Include the full package name (for example, com.acme.AccountSegmentList).
The following code sample is the handler definition file for the File Segment Handler:
<Handler name="File Segment Handler">
<Description>Handler that maps users to a segment using mapping data
from a simple xml file.</Description>
<SegmentList class="com.bowstreet.profiles.FileSegmentSelectionHandler" />
As is the case with the FileSegmentSelectionHandler class, you can implement the ProfileSelection and SegmentList interfaces in the same class and specify that class as both the Selection class and SegmentList class.
Parent topic: Profiling IBM WebSphere Portlet Factory applications: wpf7
Files that are excluded from source control: wpf7