ilog.tgo.faces
Class IltFacesPropertyAccessor

java.lang.Object
  extended by ilog.tgo.faces.IltFacesPropertyAccessor

public class IltFacesPropertyAccessor
extends Object

IltFacesPropertyAccessor represents the abstraction in charge of providing access to TGO object properties. It is used to make object details available on remote clients.

See the following section in the Programmers Documentation for more details:

Building Web Applications > The Network View Faces Component > Configuring a Network View Faces Component > Interacting with the Network View Component.

Since:
JViews 8.0

Constructor Summary
IltFacesPropertyAccessor()
          Creates a new IltFacesPropertyAccessor instance.
 
Method Summary
protected  boolean acceptGetProperty(IlpGraphicView view, IlpRepresentationObject object, String propertyName)
          This default implementation calls acceptProperty(IlpGraphicView, IlpRepresentationObject, String).
protected  boolean acceptProperty(IlpGraphicView view, IlpRepresentationObject object, String propertyName)
          Returns whether or not a given property can be accessed.
 Map getProperties(IlpGraphicView view, IlpRepresentationObject object)
          Returns the properties of the given object.
protected  List getPropertyNames(IlpGraphicView view, IlpRepresentationObject object)
          Returns the properties that will be exposed for the given IlpRepresentationObject and IlpGraphicView instances.
protected  Object getStringFromValue(IlpGraphicView view, IlpRepresentationObject object, String propertyName, Object propertyValue)
          Converts the provided in-memory property representation to a client-side String representation of a property value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IltFacesPropertyAccessor

public IltFacesPropertyAccessor()
Creates a new IltFacesPropertyAccessor instance.

Method Detail

getProperties

public Map getProperties(IlpGraphicView view,
                         IlpRepresentationObject object)
Returns the properties of the given object.

By default, the property names provided are treated as the attribute names of the IlpObject instance taken from the provided IlpRepresentationObject object.

Parameters:
view - The IlpGraphicView representing the object.
object - The IlpRepresentationObject of interest.
Returns:
A Map containing property names as keys. The values associated with the keys are in the form of String objects.

getPropertyNames

protected List getPropertyNames(IlpGraphicView view,
                                IlpRepresentationObject object)
Returns the properties that will be exposed for the given IlpRepresentationObject and IlpGraphicView instances.

You can redefine this method to filter out properties.

By default the property names returned are the names of the attributes taken from the IlpObject instances in object.

Parameters:
view - The IlpGraphicView representing the object.
object - The IlpRepresentationObject of interest.
Returns:
The names of the properties.

acceptProperty

protected boolean acceptProperty(IlpGraphicView view,
                                 IlpRepresentationObject object,
                                 String propertyName)
Returns whether or not a given property can be accessed.

By default all properties are accepted.

This method should be overridden to minimize the number of properties accepted. All accepted properties are ultimately sent to remote clients.

Parameters:
view - The IlpGraphicView representing the object.
object - The IlpRepresentationObject of interest.
propertyName - The name of the property.
Returns:
If the property can be accessed, true is returned.

acceptGetProperty

protected boolean acceptGetProperty(IlpGraphicView view,
                                    IlpRepresentationObject object,
                                    String propertyName)
This default implementation calls acceptProperty(IlpGraphicView, IlpRepresentationObject, String).

This can be redefined to filter the accepted properties for read operations.

Parameters:
view - The IlpGraphicView instance representing the object.
object - The IlpRepresentationObject of interest.
propertyName - The name of the property.
Returns:
If the property can be accessed as a get operation, true is returned.

getStringFromValue

protected Object getStringFromValue(IlpGraphicView view,
                                    IlpRepresentationObject object,
                                    String propertyName,
                                    Object propertyValue)
Converts the provided in-memory property representation to a client-side String representation of a property value.

This default implementation uses the IlpTypeConverter associated with the IlpGraphicView's IlpContext.

By default, an empty String is returned if the value of the property is IltObject.VALUE_NOT_SET.

Parameters:
view - The IlpGraphicView instance representing the object.
object - The IlpRepresentationObject instance of interest.
propertyName - The name of the property.
propertyValue - The object value for the property.
Returns:
A String representation suitable for the client-side.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.