Class LimitedPropertiesContentProvider
java.lang.Object
com.webmethods.caf.faces.data.object.LimitedPropertiesContentProvider
- All Implemented Interfaces:
IContentProvider
,IUpdateableContentProvider
- Direct Known Subclasses:
LimitedPropertiesTableContentProvider
public class LimitedPropertiesContentProvider
extends Object
implements IContentProvider, IUpdateableContentProvider
Provider which limits a wrapped provider to exposing a specified set of properties.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBlank provider.LimitedPropertiesContentProvider
(IContentProvider provider, Object[] keys) Provider limiting specified provider to specified keys. -
Method Summary
Modifier and TypeMethodDescriptionObject[]
getKeys()
List of property keys to which this provider limits.Object[]
Returns list of properties supported by this content provider.Source provider that this provider limits.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
List of property keys to which this provider limits.void
setProvider
(IContentProvider provider) Source provider that this provider limits.void
Sets new value of the given propertytoString()
Returns string representation of content.
-
Field Details
-
m_provider
-
m_keys
-
m_keySet
-
-
Constructor Details
-
LimitedPropertiesContentProvider
public LimitedPropertiesContentProvider()Blank provider. Must be initialized withsetProvider(com.webmethods.caf.faces.data.IContentProvider)
andsetKeys(java.lang.Object[])
. -
LimitedPropertiesContentProvider
Provider limiting specified provider to specified keys.
-
-
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
-
getProvider
Source provider that this provider limits. -
setProvider
Source provider that this provider limits. -
getKeys
List of property keys to which this provider limits. -
setKeys
List of property keys to which this provider limits.
-