Class MapContentProvider
java.lang.Object
com.webmethods.caf.faces.data.object.MapContentProvider
- All Implemented Interfaces:
IContentProvider
,IUpdateableContentProvider
public class MapContentProvider
extends Object
implements IContentProvider, IUpdateableContentProvider
Adapts a
Map
to an IContentProvider
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionObject[]
Returns list of properties supported by this content provider.Class<?>
Returns java type of the given propertyReturns value of the given propertyboolean
hasProperty
(Object propertyKey) Checks if the given property is supported by this content providerboolean
isReadOnly
(Object propertyKey) Returns true if the given property is readonly.void
Sets new value of the given propertytoString()
Returns string representation of content.
-
Field Details
-
m_map
-
-
Constructor Details
-
MapContentProvider
-
-
Method Details
-
toString
Description copied from interface:IContentProvider
Returns string representation of content.- Specified by:
toString
in interfaceIContentProvider
- Overrides:
toString
in classObject
- Returns:
String
representation of the wrapped content
-
getPropertyKeys
Description copied from interface:IContentProvider
Returns list of properties supported by this content provider. Can returnObject[0]
, never null.- Specified by:
getPropertyKeys
in interfaceIContentProvider
- Returns:
- array of property keys which is typically of type
String
orInteger
-
getType
Description copied from interface:IContentProvider
Returns java type of the given property- Specified by:
getType
in interfaceIContentProvider
- Parameters:
propertyKey
- the property key of typeString
orInteger
- Returns:
- property java
Class
- Throws:
PropertyNotFoundException
- if property is not supported
-
getValue
Description copied from interface:IContentProvider
Returns value of the given property- Specified by:
getValue
in interfaceIContentProvider
- Parameters:
propertyKey
- the property key of typeString
orInteger
- Returns:
- value of the property, can be
null
- Throws:
PropertyNotFoundException
- if property is not supportedELException
-
hasProperty
Description copied from interface:IContentProvider
Checks if the given property is supported by this content provider- Specified by:
hasProperty
in interfaceIContentProvider
- Parameters:
propertyKey
- property key of typeString
orInteger
- Returns:
true
if property is supported
-
isReadOnly
Description copied from interface:IUpdateableContentProvider
Returns true if the given property is readonly. If it is readonly,
IUpdateableContentProvider.setValue(Object, Object)
will definitely fail.- Specified by:
isReadOnly
in interfaceIUpdateableContentProvider
- Parameters:
propertyKey
- property key of typeString
orInteger
- Returns:
- true if the property is readonly
- Throws:
PropertyNotFoundException
ELException
-
setValue
public void setValue(Object propertyKey, Object value) throws ELException, PropertyNotFoundException Description copied from interface:IUpdateableContentProvider
Sets new value of the given property
- Specified by:
setValue
in interfaceIUpdateableContentProvider
- Parameters:
propertyKey
- property key of typeString
orInteger
value
- new property value- Throws:
PropertyNotFoundException
- if property is not foundELException
-