com.arsdigita.cms.ui
Class ItemSearchParameter

java.lang.Object
  extended bycom.arsdigita.bebop.parameters.ParameterModel
      extended bycom.arsdigita.bebop.parameters.StringParameter
          extended bycom.arsdigita.cms.ui.ItemSearchParameter
All Implemented Interfaces:
com.arsdigita.util.Lockable

public class ItemSearchParameter
extends com.arsdigita.bebop.parameters.StringParameter

An ItemSearch parameter, used in conjunction with the ItemSearch widget which uses the search UI to find a content item and fill the widget with a string in the form itemID (ItemName). When unmarshalled, a content item is returned

Author:
Scott Seago

Field Summary
 
Fields inherited from class com.arsdigita.bebop.parameters.StringParameter
versionId
 
Fields inherited from class com.arsdigita.bebop.parameters.ParameterModel
m_defaultValue, m_locked, m_name, m_parameterListeners
 
Constructor Summary
ItemSearchParameter(String name)
          Create a new item search parameter corresponding to a request parameter with the given name.
ItemSearchParameter(String name, ContentType contentType)
          Create a new item search parameter corresponding to a request parameter with the given name.
 
Method Summary
 Class getValueClass()
           
 String marshal(Object value)
           
 Object transformValue(javax.servlet.http.HttpServletRequest request)
          Retrieve the content item from the request.
 Object unmarshal(String encoded)
           
 
Methods inherited from class com.arsdigita.bebop.parameters.ParameterModel
addParameterListener, createParameterData, createParameterData, createParameterData, getDefaultOverridesNull, getDefaultValue, getName, isLocked, isPassIn, lock, setDefaultOverridesNull, setDefaultValue, setName, setPassIn, transformSingleValue, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ItemSearchParameter

public ItemSearchParameter(String name)
Create a new item search parameter corresponding to a request parameter with the given name.

Parameters:
name - the name of the request parameter from which item

ItemSearchParameter

public ItemSearchParameter(String name,
                           ContentType contentType)
Create a new item search parameter corresponding to a request parameter with the given name.

Parameters:
name - the name of the request parameter from which item
contentType - If not null, search will be limited to the specified content type
Method Detail

transformValue

public Object transformValue(javax.servlet.http.HttpServletRequest request)
                      throws IllegalArgumentException
Retrieve the content item from the request. Returns null if the request parameter does not correspond to a content item

Parameters:
request - represents the current request
Returns:
the content item
Throws:
IllegalArgumentException - if the request parameter does not look like a valid email address.

unmarshal

public Object unmarshal(String encoded)
                 throws IllegalArgumentException
Throws:
IllegalArgumentException

marshal

public String marshal(Object value)

getValueClass

public Class getValueClass()


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 19 2004:2352 UTC