|
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<Node> com.bea.content.manager.servlets.attribute.node.NodeAttributeResolver
public class NodeAttributeResolver
This attribute resolver is responsible for retrieve a node using the CM apis.
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.node.NodeResolverConstants |
---|
ATTR_NODE_ID, ATTR_NODE_PATH |
Constructor Summary | |
---|---|
NodeAttributeResolver()
|
Method Summary | |
---|---|
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 ID |
getNodeID(AttributeContext context)
|
protected String |
getNodePath(AttributeContext context)
|
protected Set<String> |
getRequiredContextAttributes()
Returns a collection of required AttributeContext keys. |
protected Map<String,Class<?>> |
getValidContextAttributeClasses()
Used for validation of classes associated with context keys. |
Node |
resolveAttribute(AttributeContext context)
Resolves a node based on the provided attribute context. |
void |
resolveAttribute(AttributeContext context,
Writer writer)
This method is not supported by this implementation of attribute resolver. |
String |
resolveAttributeToString(AttributeContext context)
Returns the string representation of the node. |
protected void |
validateAttributeContext(AttributeContext context)
Validates the AttributeContext based on required attributes
and context attribute values. |
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 |
Constructor Detail |
---|
public NodeAttributeResolver()
Method Detail |
---|
public Node resolveAttribute(AttributeContext context)
resolveAttribute
in interface AttributeResolver<Node>
resolveAttribute
in class com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver<Node>
context
- The AttributeContext
to use when resolving this attribute.
java.lang.RuntimeException
- wrapped with the
original exception.public void resolveAttribute(AttributeContext context, Writer writer)
resolveAttribute
in interface AttributeResolver<Node>
resolveAttribute
in class com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver<Node>
context
- The writer
- The java.io.Writer
to write the property value to.
UnsupportedOperationException
- if called.public String resolveAttributeToString(AttributeContext context)
resolveAttributeToString
in interface AttributeResolver<Node>
resolveAttributeToString
in class com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver<Node>
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<Node>
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<Node>
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<Node>
protected void validateAttributeContext(AttributeContext context) throws IllegalArgumentException
com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver
AttributeContext
based on required attributes
and context attribute values.
This method makes sure that: 1. All attributes are present that are required (@see getRequiredContextAttributes()) This validation will not throw *IF* there are default values specified (@see getDefaultContextValues()). 2. Makes sure that the values set for each context attribute are of the correct type. (@see getValidContextAttributeClasses()) This validation is done to avoid ClassCastExceptions.
This method can be overridden as more custom validation algorithms are required.
validateAttributeContext
in class com.bea.content.manager.servlets.attribute.impl.AbstractContentAttributeResolver<Node>
context
- The AttributeContext
to validate
IllegalArgumentException
protected String getNodePath(AttributeContext context)
protected ID getNodeID(AttributeContext context)
|
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 |