|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver<V>
com.bea.content.manager.servlets.attribute.search.SearchAttributeResolver<V>
public abstract class SearchAttributeResolver<V>
This attribute resolver is responsible for performing content searches using CM api's.
The following describes the behavior of this resolver depending on the context attributes that are configured:
Field Summary |
---|
Fields inherited from class com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver |
---|
debug, txDebug |
Fields inherited from interface com.bea.content.manager.servlets.attribute.search.SearchResolverConstants |
---|
ATTR_CONTENT_CONTEXT_PARAMS, ATTR_EXPRESSION_OVERRIDE, ATTR_IN_MEMORY_SORT, ATTR_IS_VERSIONED_SEARCH, ATTR_MAX_RESULTS, ATTR_PROPERTY_PROVIDER, ATTR_SEARCH_PATHS, ATTR_SEARCH_QUERY, ATTR_SORT_BY |
Constructor Summary | |
---|---|
SearchAttributeResolver() |
Method Summary | |
---|---|
protected Map |
getContextParams(AttributeContext context) |
protected Map<String,Object> |
getDefaultContextValues() Returns a map of key/values that contain default values if/when their associated context keys are null or not provided. |
protected Expression |
getExpression(AttributeContext context) Compile search expression |
protected Expression |
getInitialExpression(AttributeContext context) |
protected Integer |
getMaxResults(AttributeContext context) |
protected PropertyProvider |
getPropertyProvider(AttributeContext context) |
protected String |
getQuery(AttributeContext context) |
protected Set<String> |
getRequiredContextAttributes() Returns a collection of required AttributeContext keys. |
protected Search |
getSearch(AttributeContext context) |
protected String[] |
getSearchPaths(AttributeContext context) |
static SearchAttributeResolver |
getSearchResolver(AttributeContext context) Retrieve the appropriate resolver, depending on configuration of attribute context. |
protected String |
getSortBy(AttributeContext context) |
protected Expression |
getSpecifiedExpression(AttributeContext context) |
protected Map<String,Class<?>> |
getValidContextAttributeClasses() Used for validation of classes associated with context keys. |
protected Boolean |
isSortInMemory(AttributeContext context) |
void |
resolveAttribute(AttributeContext context, Writer writer) Resolves an object and writes its value to the provided java.io.Writer . |
String |
resolveAttributeToString(AttributeContext context) Returns the string value specified by attributes in AttributeContext |
protected void |
validateAttributeContext(AttributeContext context) Make sure that either ATTR_EXPRESSION_OVERRIDE or ATTR_SEARCH_QUERY is provided. |
Methods inherited from class com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver |
---|
checkCallerCanViewNode, getContextAttribute, resolveAttribute, validateAttributeValueFromOptions |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SearchAttributeResolver()
Method Detail |
---|
public static SearchAttributeResolver getSearchResolver(AttributeContext context)
VersionedSearchAttributeResolver
is returned. Otherwise, an instance of NodeSearchAttributeResolver
is returned.context
- The attribute context to interrogate.public void resolveAttribute(AttributeContext context, Writer writer)
AttributeResolver
java.io.Writer
.
If propertyName
is null, the default primary property value will be written to the java.io.Writer
.
resolveAttribute
in interface AttributeResolver<V>
resolveAttribute
in class com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver<V>
context
- The <AttributeContext> to use when resolving this attribute.writer
- The java.io.Writer
to write the property value to.public String resolveAttributeToString(AttributeContext context)
AttributeResolver
AttributeContext
resolveAttributeToString
in interface AttributeResolver<V>
resolveAttributeToString
in class com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver<V>
context
- AttributeContext to retrieve context attributes from.java.lang.String
version of the Object returned from resolveAttribute(context)protected Map<String,Object> getDefaultContextValues()
com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver
This method must NOT return null. An empty Map is acceptable.
getDefaultContextValues
in class com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver<V>
protected Set<String> getRequiredContextAttributes()
com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver
AttributeContext
keys.
The returned value will be used to ensure that the proper context keys are set up in the AttributeContext
.
This method must NOT return null. An empty Set is acceptable.
getRequiredContextAttributes
in class com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver<V>
protected Map<String,Class<?>> getValidContextAttributeClasses()
com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver
This method must NOT return null. An empty Map is acceptable.
getValidContextAttributeClasses
in class com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver<V>
protected Expression getSpecifiedExpression(AttributeContext context)
protected String getQuery(AttributeContext context)
protected PropertyProvider getPropertyProvider(AttributeContext context)
protected Integer getMaxResults(AttributeContext context)
protected String getSortBy(AttributeContext context)
protected String[] getSearchPaths(AttributeContext context)
protected Map getContextParams(AttributeContext context)
protected Boolean isSortInMemory(AttributeContext context)
protected Expression getExpression(AttributeContext context)
protected Expression getInitialExpression(AttributeContext context)
protected Search getSearch(AttributeContext context)
protected void validateAttributeContext(AttributeContext context) throws IllegalArgumentException
validateAttributeContext
in class com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver<V>
context
- The AttributeContext
to validateIllegalArgumentException
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010, Oracle. All rights reserved.