public class ContentItemResultsDroplet
extends atg.droplet.ForEach
PageFragment
for each
object in the collection.
PageFragments are mapped by type. There is also a default PageFragment for cases where the type is not known or the type is not mapped to a specific PageFragment.
There is a PageFragment Map and default PageFragment configuratio for both Endeca records and repository items. The RepositoryItem type
is determined by its repository type. Record type is determined from a property on the record itself. That property name is configurable using
recordTypePropertyName
. A type property is not required to be on the Endeca record. If all records
are homogenous(i.e. without a type), only one renderer (the default) is necessary.
The ContentItem property containing the Collection is specified by content item type using the collectionPropertyName
Map.
Configuration
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
static java.lang.String |
CONTENT_ITEM
The input param name used for providing a ContentItem
|
protected Configuration |
mConfiguration |
static java.lang.String |
OBJECT_TYPE
The output parameter name for returning the class type for the object in the Collection
|
static java.lang.String |
RECORD_OBJECTTYPE |
static java.lang.String |
RENDERING_PAGE_FRAGMENT
The output parameter name for returning the PageFragment for rendering the object in the collection
|
static java.lang.String |
REPOSITORYITEM_OBJECTTYPE |
ARRAY, COUNT, DEBUG, ELEMENT, ELEMENT_NAME, EMPTY, INDEX, INDEX_NAME, KEY, OUTPUT, OUTPUT_END, OUTPUT_START, REVERSE_ORDER, SIZE, SORT_PROPERTIES
Constructor and Description |
---|
ContentItemResultsDroplet() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getArray(atg.servlet.DynamoHttpServletRequest pRequest)
Returns the collection property from the content item
|
protected java.util.Collection |
getCollection(com.endeca.infront.assembler.ContentItem pContentItem,
atg.servlet.DynamoHttpServletRequest pRequest)
Called to return the Collection on the given ContentItem based on the configured
property name.
|
Configuration |
getConfiguration()
Returns the main configuration component that contains
the configurable values used by this droplet
to identify the collection and page fragments for each
content item.
|
protected atg.web.PageFragment |
getPageFragment(java.lang.Object pObjectInCollection,
atg.servlet.DynamoHttpServletRequest pRequest)
Returns the appropriate rendering page fragment for the given object in the collection.
|
void |
setConfiguration(Configuration pConfiguration) |
protected void |
setElementParameter(atg.servlet.DynamoHttpServletRequest pRequest,
java.lang.String pElementName,
java.lang.Object pValue)
Sets the rendering page fragment output parameter before calling super.
|
protected void |
setObjectTypeParameter(atg.servlet.DynamoHttpServletRequest pRequest,
java.lang.Object pObjectValue)
Sets the object type output parameter value based on the given object value.
|
getSortedArray, service, serviceArray, serviceCollection, serviceDictionary, serviceEnumeration, serviceIndexedList, serviceIterator, serviceMap, serviceMapArray, servicePrimitiveArray
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, init, service, service, setParameter
destroy, getServletConfig, getServletInfo, setServletInfo
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static final java.lang.String CLASS_VERSION
public static final java.lang.String CONTENT_ITEM
public static final java.lang.String RENDERING_PAGE_FRAGMENT
public static final java.lang.String OBJECT_TYPE
public static final java.lang.String REPOSITORYITEM_OBJECTTYPE
public static final java.lang.String RECORD_OBJECTTYPE
protected Configuration mConfiguration
public Configuration getConfiguration()
public void setConfiguration(Configuration pConfiguration)
protected java.util.Collection getCollection(com.endeca.infront.assembler.ContentItem pContentItem, atg.servlet.DynamoHttpServletRequest pRequest)
pContentItem
- pRequest
- Configuration.getCollectionPropertyNames()
protected atg.web.PageFragment getPageFragment(java.lang.Object pObjectInCollection, atg.servlet.DynamoHttpServletRequest pRequest)
pObjectInCollection
- pRequest
- Configuration.getObjectRenderingPageFragmentsByType()
,
Configuration.getDefaultObjectRenderingPageFragment()
public java.lang.Object getArray(atg.servlet.DynamoHttpServletRequest pRequest)
getArray
in class atg.droplet.ForEach
protected void setElementParameter(atg.servlet.DynamoHttpServletRequest pRequest, java.lang.String pElementName, java.lang.Object pValue)
setElementParameter
in class atg.droplet.ForEach
protected void setObjectTypeParameter(atg.servlet.DynamoHttpServletRequest pRequest, java.lang.Object pObjectValue)
By default, this implementation will return "RepositoryItem" or "Record" depending on the instance type of pObjectValue.
pRequest
- pObjectValue
-