|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
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<Object> com.bea.content.manager.servlets.attribute.property.ContentPropertyResolver
public abstract class ContentPropertyResolver
This attribute resolver is responsible for retrieving a property
from a com.bea.content.Node
.
Field Summary | |
---|---|
protected static String |
CURRENT_VERSION_NUMBER_STR
|
Fields inherited from class com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver |
---|
debug, txDebug |
Fields inherited from interface com.bea.content.manager.servlets.attribute.property.PropertyResolverConstants |
---|
ATTR_CONVERSION_TYPE, ATTR_DATE_FORMATTER, ATTR_DEFAULT_VALUE, ATTR_END_INDEX, ATTR_HTTP_SERVLET_REQUEST, ATTR_HTTP_SERVLET_RESPONSE, ATTR_IS_MULTIVALUED, ATTR_IS_NESTED_PROPERTY, ATTR_NODE_VERSION, ATTR_NUMBER_FORMATTER, ATTR_OVERRIDING_PROPERTY, ATTR_PROPERTY_NAME, ATTR_READ_WRITE_BLOCK_SIZE, ATTR_SELECTED_NODE, ATTR_START_INDEX, ATTR_TRANSACTION_TIMEOUT_SECS |
Constructor Summary | |
---|---|
ContentPropertyResolver()
Default constructor |
Method Summary | |
---|---|
protected String |
convert(AttributeContext context,
String in)
Convert a string with the current convertType. |
protected Object |
doNonBinary(AttributeContext context,
Collection<Object> values)
Returns the "value" of the property for non-binary properties. |
protected String |
getConversionType(AttributeContext context)
If resultId is not set, this specifies how to encode the property value when printing it to the JSP. |
protected Format |
getDateFormatter(AttributeContext context)
Returns the java.text.Format to use (if specified) for date properties. |
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 String |
getDefaultValue(AttributeContext context)
Returns the default value to use (if specified). |
protected Integer |
getEndIndex(AttributeContext context)
Returns the end index specified by caller. |
protected Boolean |
getIsMultiValued(AttributeContext context)
Returns whether or not this provider returns a mutivalued property or not(if specified by caller). |
protected Boolean |
getIsNestedProperty(AttributeContext context)
|
protected Property |
getNodeProperty(AttributeContext context)
Logic for retrieval of the property. |
protected String |
getNodeVersion(AttributeContext context)
Returns the node version to retrieve, specified by caller. |
protected Format |
getNumberFormatter(AttributeContext context)
Returns the java.text.Format to use (if specified) for numeric properties. |
protected Property |
getPrimaryPropertyFromVersion(AttributeContext context,
ID nodeId,
Version version)
Responsible for retrieving the binary property from versioned node. |
protected String |
getPropertyName(AttributeContext context)
Returns the property name to retrieve, specified by caller. |
protected Collection<Object> |
getPropertyValues(Property property)
Responsible for retrieving all values for provided property |
protected Set<String> |
getRequiredContextAttributes()
Returns a collection of required AttributeContext keys. |
protected Node |
getSelectedNode(AttributeContext context)
Returns the selected node, specified by caller. |
protected Integer |
getStartIndex(AttributeContext context)
Returns the start index specified by caller. |
protected Map<String,Class<?>> |
getValidContextAttributeClasses()
Used for validation of classes associated with context keys. |
Object |
resolveAttribute(AttributeContext context)
Retrieves the "value(s)" from the specified node and property name. |
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 boolean |
shouldGetPropertyFromNode(AttributeContext context)
Logic responsible for determining if the property should be retrieved from the node, or from versioned object. |
protected String |
toString(AttributeContext context,
Collection<Object> objects)
|
protected String |
toString(AttributeContext context,
Object obj,
String defaultValue)
Convert an Object to a string with our current formatting. |
protected Object |
validateAndProcessProperty(AttributeContext context,
Collection<Object> values,
boolean getPropertyFromNode,
boolean isNestedProperty)
|
protected void |
validateAttributeContext(AttributeContext context)
Overridden to validate conversion type. |
Methods inherited from class com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver |
---|
checkCallerCanViewNode, getContextAttribute, validateAttributeValueFromOptions |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String CURRENT_VERSION_NUMBER_STR
Constructor Detail |
---|
public ContentPropertyResolver()
Method Detail |
---|
public Object resolveAttribute(AttributeContext context)
resolveAttribute
in interface AttributeResolver<Object>
resolveAttribute
in class com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver<Object>
context
- The AttributeContext
to use when resolving this attribute.
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<Object>
resolveAttribute
in class com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver<Object>
context
- The writer
- The java.io.Writer
to write the property value to.public String resolveAttributeToString(AttributeContext context)
AttributeResolver
AttributeContext
resolveAttributeToString
in interface AttributeResolver<Object>
resolveAttributeToString
in class com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver<Object>
context
- AttributeContext to retrieve context attributes from.
java.lang.String
version of the Object returned from
resolveAttribute(context)protected String toString(AttributeContext context, Object obj, String defaultValue)
nested
- RuntimeException thrown on conversion failure.getDefaultValue(com.bea.content.manager.servlets.attribute.AttributeContext)
,
toString(AttributeContext, java.util.Calendar)
,
toString(AttributeContext, java.lang.Number)
protected String toString(AttributeContext context, Collection<Object> objects)
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<Object>
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<Object>
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<Object>
protected Object doNonBinary(AttributeContext context, Collection<Object> values)
protected Property getPrimaryPropertyFromVersion(AttributeContext context, ID nodeId, Version version) throws RepositoryException
RepositoryException
protected String convert(AttributeContext context, String in)
protected Format getDateFormatter(AttributeContext context)
java.text.Format
to use (if specified) for date properties.
java.text.Format
if specified by caller in context, null otherwise.ATTR_DATE_FORMATTER
protected Format getNumberFormatter(AttributeContext context)
java.text.Format
to use (if specified) for numeric properties.
java.text.Format
if specified by caller in context, null otherwise.ATTR_NUMBER_FORMATTER
protected String getDefaultValue(AttributeContext context)
ATTR_DEFAULT_VALUE
protected Boolean getIsMultiValued(AttributeContext context)
ATTR_IS_MULTIVALUED
protected Boolean getIsNestedProperty(AttributeContext context)
protected String getConversionType(AttributeContext context)
context
- protected Integer getStartIndex(AttributeContext context)
ATTR_START_INDEX
protected Integer getEndIndex(AttributeContext context)
ATTR_END_INDEX
protected String getPropertyName(AttributeContext context)
ATTR_END_INDEX
protected String getNodeVersion(AttributeContext context)
ATTR_NODE_VERSION
protected Node getSelectedNode(AttributeContext context)
ATTR_SELECTED_NODE
protected Property getNodeProperty(AttributeContext context)
context
- AttributeContextprotected boolean shouldGetPropertyFromNode(AttributeContext context)
protected void validateAttributeContext(AttributeContext context) throws IllegalArgumentException
validateAttributeContext
in class com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver<Object>
context
- The AttributeContext
to validate
IllegalArgumentException
protected Object validateAndProcessProperty(AttributeContext context, Collection<Object> values, boolean getPropertyFromNode, boolean isNestedProperty) throws AuthorizationException, RepositoryException
AuthorizationException
RepositoryException
protected Collection<Object> getPropertyValues(Property property)
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |