Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.tracking.events
Class SearchEvent

    java.lang.Object
      com.bea.p13n.property.AbstractConfigurableEntity
          com.bea.p13n.events.Event
              com.bea.p13n.tracking.events.TrackingEvent
                  com.bea.p13n.tracking.events.SearchEvent

All Implemented Interfaces
  EventConstants, ConfigurableEntity, Serializable

    public class SearchEvent

extends TrackingEvent

Event for tracking user searches. This event is designed to track searches from, say, a user input on a web page. There are several fields which you can use for various purposes specific to your application, but see the docs of those methods for suggested vaules and usages. The general usage pattern is to create the event, then issue the search. After the search returns, set the response time and fire the event.

         SearchEvent e = new SearchEvent( session, searchString );
         e.setSearchContext( "myWebApp" );
         e.setSearchTarget( "/content/base/monitor" );
         e.setSearchType( "property" );

         doSearch( searchString );

         e.setResponseTime();
         TrackingEventHelper.getEventService().dispatchEvent( e );

See Also
  Serialized Form

Field Summary
`static String` | `SEARCH_CONTEXT` Attribute name for search expression
`static String` | `SEARCH_EXPRESSION` Attribute name for search expression
`static String` | `SEARCH_RESPONSE_MILLIS` Attribute name for search expression
`static String` | `SEARCH_TARGET` Attribute name for search expression
`static String` | `SEARCH_TYPE` Attribute name for search type
`static String` | `TYPE` Event Type

Fields inherited from class com.bea.p13n.tracking.events.TrackingEvent
`REQUEST, SESSION_ID, USER_ID, USER_TYPE`

Fields inherited from class com.bea.p13n.property.AbstractConfigurableEntity
`CE_METHOD_CACHE, instanceClass, PREFIX_GET, PREFIX_SET, propertyCache, textFormatter`

Fields inherited from interface com.bea.p13n.property.ConfigurableEntity
`RESERVED_PROPERTY_SET`

Fields inherited from interface com.bea.p13n.events.EventConstants
`TYPE_ALL`

Constructor Summary
`SearchEvent(javax.servlet.http.HttpServletRequest request, String searchExpression)` Create a new SearchEvent.

Method Summary
`void` | `setSearchContext(String searchContext)` Set the search context.
`void` | `setSearchExpression(String searchExpression)` Set the search expression.
`void` | `setSearchResponseTime()`
`void` | `setSearchTarget(String searchTarget)` Set the search target.
`void` | `setSearchType(String searchType)` Set the search type.

Methods inherited from class com.bea.p13n.tracking.events.TrackingEvent
`getSchemaKeys, getSession, getXMLNamespace, getXSDFile, setSchemaKeys, setSession, setXMLNamespace, setXSDFile`

Methods inherited from class com.bea.p13n.events.Event
`getApplication, getAttribute, getAttributeNames, getProperty, getTimeStamp, getType, removeAttribute, setApplication, setAttribute, toString`

Methods inherited from class com.bea.p13n.property.AbstractConfigurableEntity
`createMapKey, getCachedProperty, getExplicitProperty, getExplicitSetter, getImplicitProperty, getJndiName, getPkString, getPropertyAsString, getPropertyCache, getPropertyNoDefault, getUniqueId, hasExplicitGetter, hasExplicitSetter, removeExplicitProperty, removeProperty, setExplicitProperty, setProperty, upcaseFirst`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface com.bea.p13n.property.ConfigurableEntity
`getJndiName, getPkString, getPropertyAsString, getPropertyNoDefault, getUniqueId, removeProperty, setProperty`

Field Detail

### TYPE

    public static final String TYPE

  Event Type

  See Also
    Constants Summary

### SEARCH_EXPRESSION

    public static final String SEARCH_EXPRESSION

  Attribute name for search expression

  See Also
    Constants Summary

### SEARCH_TYPE

    public static final String SEARCH_TYPE

  Attribute name for search type

  See Also
    Constants Summary

### SEARCH_CONTEXT

    public static final String SEARCH_CONTEXT

  Attribute name for search expression

  See Also
    Constants Summary

### SEARCH_TARGET

    public static final String SEARCH_TARGET

  Attribute name for search expression

  See Also
    Constants Summary

### SEARCH_RESPONSE_MILLIS

    public static final String SEARCH_RESPONSE_MILLIS

  Attribute name for search expression

  See Also
    Constants Summary

Constructor Detail

### SearchEvent

    public SearchEvent(javax.servlet.http.HttpServletRequest request,
                       String searchExpression)

  Create a new SearchEvent.

  Parameters
    `request` - the http request. may be null if none is available, however if the request is supplied, the base TrackingEvent will extract useful data such as user id, etc, from the request.
    `searchExpression` - the search expression. See `setSearchExpression(java.lang.String)`.

Method Detail

### setSearchExpression

    public void setSearchExpression(String searchExpression)

  Set the search expression. Generally this will be whatever a user types into your search dialog.

  Parameters
    `searchExpression` - the expression

### setSearchType

    public void setSearchType(String searchType)

  Set the search type. This is an optional field you can use for any appropriate purpose, but should be used within your application to distinguish between different kinds or types of searches offered by your application. Suggested values might be "fulltext", "property", "metadata", "document", "internet", etc.

  Parameters
    `searchType` - the type of search

### setSearchTarget

    public void setSearchTarget(String searchTarget)

  Set the search target. This is an optional field you can use for any appropriate purpose, but should be used within your application to indicate the target of the search. This might be a content repository, a filesystem directory, a webapp, an internet site, etc. Values should generally be in a standard, recognizable format such as a file path or url.

  Parameters
    `searchTarget` - the target of the search

### setSearchContext

    public void setSearchContext(String searchContext)

  Set the search context. This is an optional field you can use for any appropriate purpose, but should be used within your application to indicate the context or source from which the search was initiated. This might be a webapp name, a page name, a portlet id, a community name, etc. It might also be a parsable combination of such parameters, such as: "myWebApp:community(dogLovers):portlet(advancedSearchPortlet)"

  Parameters
    `searchContext` - a context (source) from which the search was initiated

### setSearchResponseTime

    public void setSearchResponseTime()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.