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.wsrp.registry.find
Class FindRequest

    java.lang.Object
      com.bea.wsrp.registry.find.FindRequest

    public class FindRequest

extends Object

A request to find Producer offered entities such as portlets, books, and pages in a registry.

This class can be used with several combinations of search criteria as described below.

The most simple form is to use keywords, by adding one or more keywords by calling the `addKeyword` or `addKeywords` method. When using keyword search, there is no need to set any other other fields.

In addition to keywords, you can also specify one or more names. Name usually maps to the entity's title, although this is completely specific to the producer implementation.

You can narrow the search results by specifying a producer's service key. When this key is specified, the finder will narrow the search results to entries published by the given producer.

Another way to narrow the search results is to specify the consumer's web app name. When this is specified, the finder will narrow the results to only those producer's that have already been added (and registered when required) to the consumer's web app.

Nested Class Summary
`static class` | `FindRequest.SearchOrder` Search order

Constructor Summary
`FindRequest()` Creates a request with defaults.

Method Summary
`void` | `addKeyword(String keyword)` Adds a search keyword.
`void` | `addKeywords(List<String> keywords)` Adds search keywords.
`void` | `addName(String name)` Adds the name.
`boolean` | `doCaseSensitiveSearch()` Returns true if case sensitive search is enabled.
`void` | `doFilterByAddedProducer(String consumerWebappName)` Restricts results to only to producers previously added (and registered when required) producers.
`boolean` | `doSearchAnd()` Returns true if keywords are set to be ANDed.
`String` | `getFilteringConsumerWebappName()` Returns the name of the consumer web app name.
`List<String>` | `getKeywords()` Returns search keywords.
`List<String>` | `getNames()` Returns the names.
`String` | `getProducerServiceKey()` Returns producer service key.
`FindRequest.SearchOrder` | `getSearchOrder()` Returns the search order.
`void` | `setDoCaseSensitiveSearch(boolean doCaseSensitiveSearch)` Enable/disable case sensitive search.
`void` | `setDoSearchAnd(boolean doSearchAnd)` Set whether search keywords should be ANDed.
`void` | `setProducerServiceKey(String producerServiceKey)` Sets producer service key.
`void` | `setSearchOrder(FindRequest.SearchOrder searchOrder)` Sets the search order.

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

Constructor Detail

### FindRequest

    public FindRequest()

  Creates a request with defaults.

Method Detail

### setProducerServiceKey

    public void setProducerServiceKey(String producerServiceKey)

  Sets producer service key. This key is optional. For finding results from a given producer, supply this key.

  Parameters
    `producerServiceKey` -

### getProducerServiceKey

    public String getProducerServiceKey()

  Returns producer service key.

  Returns
    producer service key

### addName

    public void addName(String name)

  Adds the name. Names can be full or partial, and can contain % as the wildcard. If multiple names are added, they will be matched on a logical OR basis.

  Parameters
    `name` -

### getNames

    public List<String> getNames()

  Returns the names. Returns an empty list by default.

  Returns
    portlet name

### setDoCaseSensitiveSearch

    public void setDoCaseSensitiveSearch(boolean doCaseSensitiveSearch)

  Enable/disable case sensitive search. Disabled by default. Case sensitivity applies only to names and not keywords. Keywords are always considered case-insensitive.

  Parameters
    `doCaseSensitiveSearch` -

### doCaseSensitiveSearch

    public boolean doCaseSensitiveSearch()

  Returns true if case sensitive search is enabled. Returns false (default) otherwise.

  Returns
    boolean

### setDoSearchAnd

    public void setDoSearchAnd(boolean doSearchAnd)

  Set whether search keywords should be ANDed. Set to OR by default.

  Parameters
    `doSearchAnd` -

### doSearchAnd

    public boolean doSearchAnd()

  Returns true if keywords are set to be ANDed. Returns false (default) otherwise.

  Returns
    boolean

### setSearchOrder

    public void setSearchOrder(FindRequest.SearchOrder searchOrder)

  Sets the search order. Possible values for the search order are sortByNameAsc, sortByNameDesc, sortByDateAsc, sortByDateDesc

  Parameters
    `searchOrder` -
  See Also
    `FindRequest.SearchOrder`

### getSearchOrder

    public FindRequest.SearchOrder getSearchOrder()

  Returns the search order.

  Returns
    search order
  See Also
    `FindRequest.SearchOrder`

### addKeyword

    public void addKeyword(String keyword)

  Adds a search keyword. Keywords are always considered case-insensitive.

  Parameters
    `keyword` -

### addKeywords

    public void addKeywords(List<String> keywords)

  Adds search keywords. Search keywords are mutually exclusive with producer service key. If you specify the producer service key, keywords will be ignored.

  Parameters
    `keywords` -

### getKeywords

    public List<String> getKeywords()

  Returns search keywords.

  Returns
    keywords

### doFilterByAddedProducer

    public void doFilterByAddedProducer(String consumerWebappName)

  Restricts results to only to producers previously added (and registered when required) producers.

  Note that a given producer may be added to a given consumer several times each time with a different producer handle, not all of which may have been preregistered. In such cases, this filter will look for atleast one registered producer.

  Parameters
    `consumerWebappName` - consumer webapp name

### getFilteringConsumerWebappName

    public String getFilteringConsumerWebappName()

  Returns the name of the consumer web app name.

  Returns
    consumer webapp name
  See Also
    `doFilterByAddedProducer(String)`

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.