ilog.server.jcomp
Class RpObject

java.lang.Object
  |
  +--ilog.server.jcomp.RpObject
All Implemented Interfaces:
RepresentationUpdate.Type, S2CTransactionStatus
Direct Known Subclasses:
IlsDSObject, Representation

public abstract class RpObject
extends Object
implements RepresentationUpdate.Type, S2CTransactionStatus

This is the base class for any representation objects. This class defines a generic API, on which the interaction protocol between a dynamic view server and its application components is based. Any representation object types that are referenced in a view specification must be implemented by a type that derives from this class. An instance of this class is configured by a representation object model specific to a representation.

A set of editing methods lets you create and update your representation objects. To actually update representation objects, you must redefine those methods. Symmetrically, this class defines a set of callback methods that should be invoked whenever a representation object is directly modified by an application component. These methods are responsible for sending modifications to the server.

The macros used in the C++ version of Rogue Wave Server to specify mappings (ILS_RP_ATTR_XXX, ILS_RP_DEFAULT_ATTR_XXX, etc.) are replaced by static methods with the same meaning. Typically, these "macros" are put into the static initializer of the corresponding representation class. You can also use the functions of the Mapping class to specify mappings.


   public class RowRp extends RpObject {
       ....
     public void setParent(TableRp p) {
       ...
     }
     public void setValue(int i, String val) {
       ...
     }
     public void setValue(int i, int val) {
       ...
     }
  
     static {
        ILS_RP_ATTR_REF("RowRp", "parent", "setParent", "TableRp");
        ILS_RP_INDEXED_ATTR_STRING("RowRp", "column", "setValue");
        ILS_RP_INDEXED_ATTR_INT("RowRp", "column", "setValue");
     }
   };
 

See Also:
Mapping, RpObjModel

Inner Class Summary
static class RpObject.IllegalCollector
           
 class RpObject.ModelNotSet
           
 class RpObject.RepresentationNotSet
           
 
Field Summary
protected  Representation _repres
           
 
Fields inherited from interface ilog.server.jcomp.RepresentationUpdate.Type
ADD, ADD_ORIG, CLOSE, COMP_FUNCALL, CREATION, DELETION, HREF_MODIF_LABEL, LOCAL_CREATION, LOCAL_RM, MAX, MODIFICATION, NOTIFY, NOUPDATE, OBJ_FUNCALL, OPEN_VIEW, PUSH_MAIN_ORIG, RM, RM_ORIG, ROLLBACK, SELECTION, SET_MAIN_ORIG, STATUS, VIEW_FUNCALL
 
Fields inherited from interface ilog.server.jcomp.S2CTransactionStatus
ACKNOWLEDGE, CP_ROLLBACK, CREATION, DEFAULT, GET_OBJ_IDS, GET_VIEW_IDS, NOTIFY, NOTIFY_CREATION, RECV_MESG, RECV_OBJ_IDS, RECV_VIEW_IDS, SV_ROLLBACK, SV_ROLLBACK_CREATION
 
Constructor Summary
protected RpObject(Representation rp, RpObjModel m)
           
 
Method Summary
protected  boolean ackAttrUpdate(int attrId, int trnsSt, int trnsId)
          Called by Representation.beginS2CTransaction (if this object is involved in the transaction) for each attribute involved in the server to component transaction - except if the transaction has been aborted.
 void ackOpenView(MvValue[] argv)
          This function is called by Rogue Wave Server in order to acknowledge or rollback a view opening performed with the acknoledged openView method.This function has an empty implementation and can be overriden.
 void afterInit()
          This function is called immediately after an object has been created when a representation object is instantiated by the server.
 void beforeDeletion(int trnsId)
          This method is called between the beginS2CUpdate and the endS2CUpdate in the transaction that delete the RpObject.
 void beginC2SUpdate()
          This function initializes a buffer where the updates performed on the representation object are stored until they are either committed (by a call to RpObject.endC2SUpdate) or discarded (by a call to RpObject.discardC2SUpdate).
 void beginC2SUpdate(int updType)
          This member function initializes a buffer where the updates performed on the representation objects are stored until they are either committed by a call to the function endC2SUpdate or discarded by a call to the function discardC2SUpdate.
protected  boolean beginS2CUpdate(int trnsSt, int trnsId)
          This function is called by Representation.beginS2CTransaction if this object is involved in the transaction.
 void discardC2SUpdate()
          This function discards the modifications stored in the update buffer.
protected  void dispose()
          This hook method is called when the object is "deleted".
 void endC2SUpdate()
          This function commits the updates performed on the representation object by flushing the update buffer.
protected  void endS2CUpdate(int trnsSt, int trnsId)
          This function is called automatically once the server has finished updating a representation object after a server component transaction.
 boolean execAsyncCallback(String funName, MvValue[] argv)
          same as execAsyncCallback(funName, argv, true)
 boolean execAsyncCallback(String funName, MvValue[] argv, boolean inTrans)
          Callbacks
 boolean execCallback(String funName, MvValue[] argv)
          Callbacks
 boolean execDuplexCallback(String funName, MvValue[] argv, String duplexFunName, MvValue[] duplexArgv)
          same as execDuplexCallback(funName, argv, duplexFunName, duplexArgv, resultIndex, 0, true)
 boolean execDuplexCallback(String funName, MvValue[] argv, String duplexFunName, MvValue[] duplexArgv, int resultIndex)
          same as execDuplexCallback(funName, argv, duplexFunName, duplexArgv, resultIndex, true)
 boolean execDuplexCallback(String funName, MvValue[] argv, String duplexFunName, MvValue[] duplexArgv, int resultIndex, boolean inTrans)
          This callback executes an asynchronous call to the funName function on the Server object associated with the representation object.
 boolean execSyncCallback(String funName, MvValue[] argv, MvValue result)
          Callbacks
 void finalize()
          This function performs finalization.
 int getAttributeId(String label)
          This function returns the attribute identifier corresponding to the attribute label.
 int getAttributeId(String attrId, int index)
          This function return the attribute identifier corresponding to an indexed attribute label.
 int getAttributeType(int attrId)
           
 String getLabel()
           
 MvRef getReference()
          This function returns a reference which identifies this representation object in the server/component protocol.
 Representation getRepresentation()
           
 int getRpObjectId()
           
 RpObjModel getRpObjModel()
           
static void ILS_RP_ATTR_BOOLEAN(String clName, String attrName, String accName)
           
static void ILS_RP_ATTR_CHAR(String clName, String attrName, String accName)
           
static void ILS_RP_ATTR_DOUBLE(String clName, String attrName, String accName)
           
static void ILS_RP_ATTR_FLOAT(String clName, String attrName, String accName)
           
static void ILS_RP_ATTR_HREF(String clName, String attrName, String accName)
           
static void ILS_RP_ATTR_INT(String clName, String attrName, String accName)
           
static void ILS_RP_ATTR_LONG(String clName, String attrName, String accName)
           
static void ILS_RP_ATTR_MVVALUE(String clName, String attrName, String accName)
           
static void ILS_RP_ATTR_REF(String clName, String attrName, String accName)
           
static void ILS_RP_ATTR_REF(String clName, String attrName, String accName, String attrType)
           
static void ILS_RP_ATTR_STRING(String clName, String attrName, String accName)
           
static void ILS_RP_ATTR_USERTYPE(String clName, String userType, String attrName, String accName)
           
static void ILS_RP_DEFAULT_ATTR_BOOLEAN(String clName, String accName)
           
static void ILS_RP_DEFAULT_ATTR_CHAR(String clName, String accName)
           
static void ILS_RP_DEFAULT_ATTR_DOUBLE(String clName, String accName)
           
static void ILS_RP_DEFAULT_ATTR_FLOAT(String clName, String accName)
           
static void ILS_RP_DEFAULT_ATTR_INT(String clName, String accName)
           
static void ILS_RP_DEFAULT_ATTR_LONG(String clName, String accName)
           
static void ILS_RP_DEFAULT_ATTR_MVVALUE(String clName, String accName)
           
static void ILS_RP_DEFAULT_ATTR_REF(String clName, String accName, String attrType)
           
static void ILS_RP_DEFAULT_ATTR_STRING(String clName, String accName)
           
static void ILS_RP_DEFAULT_ATTR_USERTYPE(String clName, String userType, String accName)
           
static void ILS_RP_DEFAULT_INDEXED_ATTR_BOOL(String clName, String accName)
           
static void ILS_RP_DEFAULT_INDEXED_ATTR_CHAR(String clName, String accName)
           
static void ILS_RP_DEFAULT_INDEXED_ATTR_DOUBLE(String clName, String accName)
           
static void ILS_RP_DEFAULT_INDEXED_ATTR_FLOAT(String clName, String accName)
           
static void ILS_RP_DEFAULT_INDEXED_ATTR_INT(String clName, String accName)
           
static void ILS_RP_DEFAULT_INDEXED_ATTR_LONG(String clName, String accName)
           
static void ILS_RP_DEFAULT_INDEXED_ATTR_MVVALUE(String clName, String accName)
           
static void ILS_RP_DEFAULT_INDEXED_ATTR_REF(String clName, String accName, String attrType)
           
static void ILS_RP_DEFAULT_INDEXED_ATTR_STRING(String clName, String accName)
           
static void ILS_RP_DEFAULT_INDEXED_ATTR_USERTYPE(String clName, String userType, String accName)
           
static void ILS_RP_INDEXED_ATTR_BOOLEAN(String clName, String attrName, String accName)
           
static void ILS_RP_INDEXED_ATTR_CHAR(String clName, String attrName, String accName)
           
static void ILS_RP_INDEXED_ATTR_DOUBLE(String clName, String attrName, String accName)
           
static void ILS_RP_INDEXED_ATTR_FLOAT(String clName, String attrName, String accName)
           
static void ILS_RP_INDEXED_ATTR_HREF(String clName, String attrName, String accName)
           
static void ILS_RP_INDEXED_ATTR_INT(String clName, String attrName, String accName)
           
static void ILS_RP_INDEXED_ATTR_LONG(String clName, String attrName, String accName)
           
static void ILS_RP_INDEXED_ATTR_MVVALUE(String clName, String attrName, String accName)
           
static void ILS_RP_INDEXED_ATTR_REF(String clName, String attrName, String accName)
           
static void ILS_RP_INDEXED_ATTR_STRING(String clName, String attrName, String accName)
           
static void ILS_RP_INDEXED_ATTR_USERTYPE(String clName, String userType, String attrName, String accName)
           
 boolean isEditable(int attrId)
           
 boolean isMatchingHRef(int attrId, RpObject HRefOwner, int HRefId)
          Component-to-server transaction callback.
 boolean isMatchingRef(int attrId, RpObject ref)
          Component-to-server transaction callback.
 boolean onAddToCollection(RpObject owner, int colId)
          This method should be called each time the application component adds a representation object to the object collection.
 boolean onDereference(int attrId)
          The same as onDereference(attrId, null, false)
 boolean onDereference(int attrId, MvValue[] argv, boolean force)
          This method lets you open a view by dereferencing a hyper-reference (see "Semantics of Dynamic View Type Specifications").
 boolean onDereference(int attrId, MvValue[] argv, MvValue[] ackArgv, int index, boolean force)
          This function is identical to the previous one except that Rogue Wave Server executes a call to the representation object function ackOpenView during the acknowledgement or the rollback of the transaction including the call to openView.In case of success, the function onCreation is also executed by Rogue Wave Server on the new representation, just after it has been created.
 boolean onNullifyRef(int id)
          Component-to-server transaction callback.
 boolean onRmFromCollection(RpObject owner, int colId)
          onRmFromCollection(owner, colId, false)
 boolean onRmFromCollection(RpObject owner, int colId, boolean isDesproyed)
          This method should be called every time the application component removes a representation object from a given collection of objects.
 void onRmRepresentation()
           
 void onSuppress(boolean isDestroyed)
          Component-to-server transaction callback.
 boolean onUpdate(int attrId, Object value)
          Component-to-server transaction callback.
 boolean onUpdate(int id, RpObject objRef, int attrRefId)
          Component-to-server transaction callback.
 void openView(String viewName)
          same as openView(viewName, null, false)
 void openView(String viewName, MvValue[] argv)
          same as openView(viewName, argv, false)
 void openView(String viewName, MvValue[] argv, boolean force)
          This method requests the server to open a view on the server object associated with this representation object.
 void openView(String viewName, MvValue[] argv, MvValue[] ackArgv, int index, boolean force)
          This function is identical to the previous one except that Rogue Wave Server executes a call to the representation object function ackOpenView ackOpenView during the acknowledgement or rollback of the transaction that includes the call to openView.
protected  boolean performUpdate(ilog.server.jcomp.RpObjectBasicUpdate upd)
           
protected  boolean performUpdate(ilog.server.jcomp.RpObjectBasicUpdate upd, int updateType)
           
protected  void setAny(int id, Any value)
          Called by the server to set the value this attribute when it has no associated modifier.
protected  void setAttributeValue(int id, Object v)
          This function sets the value of an attribute when no modifier is found.
protected  void setBoolean(int id, boolean v)
          Called by the server to set the value this attribute when it has no associated modifier.
protected  void setChar(int id, char v)
          Called by the server to set the value this attribute when it has no associated modifier.
 boolean setConstAttribute(int attrId)
          This function sets the value of a constant attribute for a representation object.
 void setConstAttributes()
          This function sets the value of the constant attributes of a representation object.
protected  void setDouble(int id, double value)
          Called by the server to set the value this attribute when it has no associated modifier.
protected  void setFloat(int id, float v)
          Called by the server to set the value this attribute when it has no associated modifier.
protected  void setHRef(int id, String v)
          Called by the server to set the value this attribute when it has no associated modifier.
protected  void setLong(int id, long v)
          Called by the server to set the value this attribute when it has no associated modifier.
protected  void setMvValue(int id, MvValue v)
          Called by the server to set the value this attribute when it has no associated modifier.
protected  void setReference(int id, RpObject v)
          Called by the server to set the value this attribute when it has no associated modifier.
 void setRpStatus(int status)
           
protected  void setSelection()
           
protected  void setShort(int id, short v)
          Called by the server to set the value this attribute when it has no associated modifier.
protected  void setString(int id, String v)
          Called by the server to set the value this attribute when it has no associated modifier.
protected  void setUserTypeValue(int attrId, MvUserType v)
          Called by the server to set the value this attribute when it has no associated modifier.
protected  void setValue(int id, Object v)
          This function is called by the server to set the value of this attribute when it has no associated modifier.
 boolean testCollection(RpObject owner, int colId)
          This method tests whether the representation object can be added to a given collection of objects.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_repres

protected Representation _repres
Constructor Detail

RpObject

protected RpObject(Representation rp,
                   RpObjModel m)
Parameters:
rp: - The representation into which this representation object will be inserted.
m: - The associated representation object model.
Method Detail

getRpObjectId

public final int getRpObjectId()

getAttributeId

public final int getAttributeId(String label)
This function returns the attribute identifier corresponding to the attribute label. This identifier reflects the order in which the attributes appear in the view specification (starting from 1).
Parameters:
label: - The attribute label.

getAttributeId

public int getAttributeId(String attrId,
                          int index)
This function return the attribute identifier corresponding to an indexed attribute label. This identifier reflects the order in which the attributes appear in the view specification (starting from 1).
Parameters:
label: - The attribute label.
index: - The attribute index.

getAttributeType

public final int getAttributeType(int attrId)
Parameters:
attrId: - The identifier of an attribute attached to this representation object.
See Also:
MvDataType

setConstAttribute

public boolean setConstAttribute(int attrId)
This function sets the value of a constant attribute for a representation object. The constant attribute is identified by the attribute identifier passed as parameter. It must have been specified with a literal value in the dynamic-view type specification.
Parameters:
attrId - the attribute Identifier
Returns:
false if attrId does not identify a constant attribute true otherwise.

setConstAttributes

public void setConstAttributes()
This function sets the value of the constant attributes of a representation object. The constant attributes are those specified with a literal value in the dynamic view type specification. This function is particularly useful when a represntation object is created directly on the component side because in that case the value of contant attributes is not notified by the server

getRpObjModel

public final RpObjModel getRpObjModel()

getRepresentation

public final Representation getRepresentation()

isEditable

public final boolean isEditable(int attrId)
Parameters:
attrId: - An attribute identifier.

getReference

public final MvRef getReference()
This function returns a reference which identifies this representation object in the server/component protocol. At server level, the function IlsMvComponentItf::getSvObject lets you get the corresponding server object.
See Also:
MvValue

beginS2CUpdate

protected boolean beginS2CUpdate(int trnsSt,
                                 int trnsId)
This function is called by Representation.beginS2CTransaction if this object is involved in the transaction. It can be overridden to control the execution of the transaction.

If this method return strue, the notification, acknowledgement or rollback is forwarded to each attribute affected by the transaction. If it returns false, the transaction aborts for this representation object.

Parameters:
trnsSt: - The transaction status (forwarded by Representation.beginS2CTransaction).
trnsId: - The transaction identifier (forwarded by Representation.beginS2CTransaction).
See Also:
Representation.beginS2CTransaction(int, int)

endS2CUpdate

protected void endS2CUpdate(int trnsSt,
                            int trnsId)
This function is called automatically once the server has finished updating a representation object after a server component transaction.

This method is empty.

Parameters:
trnsSt: - The transaction status
trnsId: - The transaction identifier

ackAttrUpdate

protected boolean ackAttrUpdate(int attrId,
                                int trnsSt,
                                int trnsId)
Called by Representation.beginS2CTransaction (if this object is involved in the transaction) for each attribute involved in the server to component transaction - except if the transaction has been aborted.

If a notification cycle or an assynchronous rollback is performed. The attribute is actually modified if and only if this method returns true.

Parameters:
attrId - The attribute identifier
trnsSt - The transaction status (forwarded by Representation.beginS2CUpdate).
trnsId - The transaction identifier (forwarded by Representation.beginS2CUpdate).
Returns:
true.
See Also:
beginS2CUpdate(int, int), Representation.beginS2CTransaction(int, int)

beginC2SUpdate

public final void beginC2SUpdate()
This function initializes a buffer where the updates performed on the representation object are stored until they are either committed (by a call to RpObject.endC2SUpdate) or discarded (by a call to RpObject.discardC2SUpdate).

You must call this method just before a serie of updates. If you do not invoke it explicitly, it will be called implicitly whenever an object is modified.
See Also:
endC2SUpdate(), discardC2SUpdate(), onUpdate(int, Object)

beginC2SUpdate

public final void beginC2SUpdate(int updType)
This member function initializes a buffer where the updates performed on the representation objects are stored until they are either committed by a call to the function endC2SUpdate or discarded by a call to the function discardC2SUpdate. You should use this function when a representation object is created locally on a component without any collector, with the type ILS_RP_CREATION passed as the argument to notify the server that a new representation object has been created locally.

endC2SUpdate

public final void endC2SUpdate()
This function commits the updates performed on the representation object by flushing the update buffer.

You must call this method after a series of updates has been performed on this representation object and only if the method RpObject.beginC2SUpdate was called previously and explicitly.

See Also:
beginC2SUpdate()

discardC2SUpdate

public final void discardC2SUpdate()
This function discards the modifications stored in the update buffer.

openView

public void openView(String viewName,
                     MvValue[] argv,
                     boolean force)
This method requests the server to open a view on the server object associated with this representation object.
Parameters:
viewName: - The name of the view to be opened
argv: - This argument is passed to the constructor of the view.
force: - Only considered if the same view has already been opened by the component. If true, a new view is opened, otherwise Representation.setSelection is called on the representation associated with the existing view.

openView

public void openView(String viewName,
                     MvValue[] argv)
same as openView(viewName, argv, false)

openView

public void openView(String viewName)
same as openView(viewName, null, false)

openView

public void openView(String viewName,
                     MvValue[] argv,
                     MvValue[] ackArgv,
                     int index,
                     boolean force)
This function is identical to the previous one except that Rogue Wave Server executes a call to the representation object function ackOpenView ackOpenView during the acknowledgement or rollback of the transaction that includes the call to openView. In case of success, the function onCreation is also executed by Rogue Wave Server on the new representation, just after it has been created. This function is called with the same argument values than ackOpenView. But while ackOpenView is called on the represention object during the acknowledgement/rollback of the transaction, onCreation is called on the representation itself during the notification phase.
Parameters:
objId: - The object identifier.
viewId: - The view identifier.
params: - If the view opens successfully, these values are used to initialize the dynamic view parameters as they are declared in the view specification file : the first value in the array is assigned to the first view parameter, the second value to the second view parameter, and so forth.
ackparams - : An array of MvValue objects : it will be given to the ackOpenView method as parameter. It can be equal to null.
index - : The index in the ackparams array that will contain the status of the opening view encapsulated in an MvValue whose type is Character.
force: - If set to true, this parameter requires to force the opening of a view that was previously opened by the component. If this parameter is set to false and the view has already been opened by the component, the view is not duplicated, but the Representation.setSelection method is called on the representation associated with this view.
See Also:
ackOpenView(ilog.server.jcomp.MvValue[]), OpenViewStatus, Representation.onCreation(ilog.server.jcomp.MvValue[]), Representation.setSelection()

ackOpenView

public void ackOpenView(MvValue[] argv)
This function is called by Rogue Wave Server in order to acknowledge or rollback a view opening performed with the acknoledged openView method.This function has an empty implementation and can be overriden.
Parameters:
The - MvValue array given to the openView method (parameter ackParams) *
See Also:
openView(java.lang.String, ilog.server.jcomp.MvValue[], ilog.server.jcomp.MvValue[], int, boolean), OpenViewStatus

setValue

protected void setValue(int id,
                        Object v)
This function is called by the server to set the value of this attribute when it has no associated modifier.
Parameters:
id: - An attribute identifier.
v: - the value.

setAttributeValue

protected void setAttributeValue(int id,
                                 Object v)
This function sets the value of an attribute when no modifier is found.

The default behavior consists in using the mechanism associated with the ILS_RP_DEFAULT_XXX set of macros.

This function can be redefined, especially if you use another mapping.

Parameters:
id: - The attribute identifier.
v: - The value.
See Also:
Mapping

onSuppress

public void onSuppress(boolean isDestroyed)
Component-to-server transaction callback.

This function notifies the server about the destruction of this representation object.

This function should be called before the destruction in case the destruction is locally triggered by the application component.

onUpdate

public boolean onUpdate(int attrId,
                        Object value)
Component-to-server transaction callback.

This function should be called when the application component needs to set the value of an attribute. It allows the server to be notified about this modification.
Parameters:
attrId: - The attribute identifier.
value: - The new value.

onUpdate

public boolean onUpdate(int id,
                        RpObject objRef,
                        int attrRefId)
Component-to-server transaction callback.

This function is called when the application component needs to replace the target object of a server relation.
Parameters:
id: - The identifier of the attribute attached to the representation object (must be a (hyper-)reference.
objRef: - A representation object and
attrRefId: - An identifier of an attribute of that object.

onNullifyRef

public boolean onNullifyRef(int id)
Component-to-server transaction callback.

This function should be called when the application component needs to reset the id reference attribute to null. It allows the server to be notified about this modification.
Parameters:
id: - The attribute identifier.

isMatchingRef

public boolean isMatchingRef(int attrId,
                             RpObject ref)
Component-to-server transaction callback.

This function tests whether the id attribute can be assigned the value of the object. More specifically, it checks whether the update might impair the type integrity of the server.
Parameters:
attrId: - The attribute identifier.
ref: - The new potential value.

isMatchingHRef

public boolean isMatchingHRef(int attrId,
                              RpObject HRefOwner,
                              int HRefId)
Component-to-server transaction callback.

This function tests whether the id attribute can be assigned a given hyper-reference. More specifically, it checks whether the update might impair the type integrity of the server.
Parameters:
attrId: - The attribute identifier.
HRefOwner: - The owner of the reference.
HRefId: - The reference identifier.

onDereference

public boolean onDereference(int attrId,
                             MvValue[] argv,
                             boolean force)
This method lets you open a view by dereferencing a hyper-reference (see "Semantics of Dynamic View Type Specifications").
Parameters:
attrId: - The attribute identifier, which must be a hyper-reference.
argv: - An array of values, which will be passed to the constructor of IlsMvView or of a derived class so as to initialize the view parameter values. (See the IlsMvView constructor.)
force: - Only considered if the same view has already been opened by the component. If true, a new view is opened, otherwise Representation.setSelection is called on the representation associated with the existing view.

onDereference

public boolean onDereference(int attrId)
The same as onDereference(attrId, null, false)
See Also:
onDereference(int)

onDereference

public boolean onDereference(int attrId,
                             MvValue[] argv,
                             MvValue[] ackArgv,
                             int index,
                             boolean force)
This function is identical to the previous one except that Rogue Wave Server executes a call to the representation object function ackOpenView during the acknowledgement or the rollback of the transaction including the call to openView.In case of success, the function onCreation is also executed by Rogue Wave Server on the new representation, just after it has been created. This function is called with the same argument values than ackOpenView. But while ackOpenView is called on the represention object during the acknowledgement/rollback of the transaction, onCreation is called on the representation itself during the notification phase.
Parameters:
attrId: - The attribute identifier, which must be a hyper-reference.
argv: - An array of values, which will be passed to the constructor of IlsMvView or of a derived class so as to initialize the view parameter values. (See the IlsMvView constructor.)
ackparams - : An array of MvValue objects : it will be given to the ackOpenView method as parameter. It can be equal to null.
index - : The index in the ackparams array that will contain the status of the opening view encapsulated in an MvValue whose type is Character.
force: - Only considered if the same view has already been opened by the component. If true, a new view is opened, otherwise Representation.setSelection is called on the representation associated with the existing view.
See Also:
openView(java.lang.String, ilog.server.jcomp.MvValue[], ilog.server.jcomp.MvValue[], int, boolean), ackOpenView(ilog.server.jcomp.MvValue[]), OpenViewStatus

onAddToCollection

public boolean onAddToCollection(RpObject owner,
                                 int colId)
This method should be called each time the application component adds a representation object to the object collection. It allows the server to be notified about this modification.
Parameters:
owner: - The collection owner.
colId: - The collection identifier.

onRmFromCollection

public boolean onRmFromCollection(RpObject owner,
                                  int colId,
                                  boolean isDesproyed)
This method should be called every time the application component removes a representation object from a given collection of objects.
Parameters:
owner: - The collection owner.
colId: - The collection identifier.

onRmFromCollection

public boolean onRmFromCollection(RpObject owner,
                                  int colId)
onRmFromCollection(owner, colId, false)

testCollection

public boolean testCollection(RpObject owner,
                              int colId)
This method tests whether the representation object can be added to a given collection of objects.
Parameters:
owner: - The collection owner.
colId: - The collection identifier.

execCallback

public boolean execCallback(String funName,
                            MvValue[] argv)
Callbacks

This function executes a given function in asynchronous mode on the Server object associated with the representation object.
Parameters:
funName: - The function name.
argv: - The arguments.
Returns:
false if the request callback couldn't be sent, true otherwise

execAsyncCallback

public boolean execAsyncCallback(String funName,
                                 MvValue[] argv,
                                 boolean inTrans)
Callbacks

This function executes a given function in asynchronous mode on the Server object associated with the representation object.
Parameters:
funName: - The function name.
argv: - The arguments.
inTrans - This parameter indicates if the callback must be executed using the transaction mechanism or not (see Transaction control in MvComponent). If equal to true and if no current transaction has been initialized, a new one is implicitly created and commited.
Returns:
false if the request callback couldn't be sent, true otherwise

execAsyncCallback

public boolean execAsyncCallback(String funName,
                                 MvValue[] argv)
same as execAsyncCallback(funName, argv, true)

execSyncCallback

public boolean execSyncCallback(String funName,
                                MvValue[] argv,
                                MvValue result)
Callbacks

This function executes a given function in synchronous mode on the Server object associated with the representation object.
Parameters:
funName: - The function name.
argv: - The arguments.
result - Must contain the default return value of the function funName. When the execSyncCallback function returns, it contains the result of funNamm. It must be not equal to null.
Returns:
false if the request callback couldn't be sent, true otherwise

execDuplexCallback

public boolean execDuplexCallback(String funName,
                                  MvValue[] argv,
                                  String duplexFunName,
                                  MvValue[] duplexArgv,
                                  int resultIndex,
                                  boolean inTrans)
This callback executes an asynchronous call to the funName function on the Server object associated with the representation object. The result of the function is sent back to the caller through a call to the duplex global function duplexFunName.
Parameters:
funName - The function name to invoke
argv - The arguments passed to the function funName
duplexFunName - The duplex global function name
duplexArgv - The duplex global function arguments
resultIndex - The result of the funName function will be put at the resultIndex position in the array of arguments to the duplex function
inTrans - this parameter indicates if the callback must be executed using the transaction mechanism or not (see Transaction control in MvComponent). If equal to true and if no current transaction has been initialized, a new one is implicitly created and commited.
Returns:
false if the request callback couldn't be sent, true otherwise

execDuplexCallback

public boolean execDuplexCallback(String funName,
                                  MvValue[] argv,
                                  String duplexFunName,
                                  MvValue[] duplexArgv,
                                  int resultIndex)
same as execDuplexCallback(funName, argv, duplexFunName, duplexArgv, resultIndex, true)

execDuplexCallback

public boolean execDuplexCallback(String funName,
                                  MvValue[] argv,
                                  String duplexFunName,
                                  MvValue[] duplexArgv)
same as execDuplexCallback(funName, argv, duplexFunName, duplexArgv, resultIndex, 0, true)

onRmRepresentation

public void onRmRepresentation()

setBoolean

protected void setBoolean(int id,
                          boolean v)
Called by the server to set the value this attribute when it has no associated modifier.
Parameters:
id - A boolean attribute identifier.
v - the value.

setAny

protected void setAny(int id,
                      Any value)
Called by the server to set the value this attribute when it has no associated modifier.
Parameters:
id - An Any attribute identifier.
v - the value.

setChar

protected void setChar(int id,
                       char v)
Called by the server to set the value this attribute when it has no associated modifier.
Parameters:
id - A char attribute identifier.
v - the value.

setShort

protected void setShort(int id,
                        short v)
Called by the server to set the value this attribute when it has no associated modifier.
Parameters:
id - A short attribute identifier.
v - the value.

setLong

protected void setLong(int id,
                       long v)
Called by the server to set the value this attribute when it has no associated modifier.
Parameters:
id - A long attribute identifier.
v - the value.

setFloat

protected void setFloat(int id,
                        float v)
Called by the server to set the value this attribute when it has no associated modifier.
Parameters:
id - A float attribute identifier.
v - the value.

setUserTypeValue

protected void setUserTypeValue(int attrId,
                                MvUserType v)
Called by the server to set the value this attribute when it has no associated modifier.
Parameters:
id - A MvUserType attribute identifier
v - the value.

setDouble

protected void setDouble(int id,
                         double value)
Called by the server to set the value this attribute when it has no associated modifier.
Parameters:
id - A double attribute identifier.
v - the value.

setString

protected void setString(int id,
                         String v)
Called by the server to set the value this attribute when it has no associated modifier.
Parameters:
id - A String attribute identifier.
v - the value.

setReference

protected void setReference(int id,
                            RpObject v)
Called by the server to set the value this attribute when it has no associated modifier.
Parameters:
id - A RpObject attribute identifier.
v - the value.

setHRef

protected void setHRef(int id,
                       String v)
Called by the server to set the value this attribute when it has no associated modifier.
Parameters:
id - A HRef attribute identifier.
v - the value.

setMvValue

protected void setMvValue(int id,
                          MvValue v)
Called by the server to set the value this attribute when it has no associated modifier.
Parameters:
id - A MvValue attribute identifier.
v - the value.

setSelection

protected void setSelection()

dispose

protected void dispose()
This hook method is called when the object is "deleted".

When the component receives the order of deletion or when the garbage collector reclaims the object.


finalize

public void finalize()
              throws Throwable
This function performs finalization.

It calls dispose() if this was not previously called.

Overrides:
finalize in class Object
Throws:
Throwable - Not removed from java.lang.Object.
See Also:
dispose()

setRpStatus

public void setRpStatus(int status)

afterInit

public void afterInit()
This function is called immediately after an object has been created when a representation object is instantiated by the server. When this method has been called the representation object has been assigned an identifier and you can use it to perform component-to-server transactions via callback member functions

beforeDeletion

public void beforeDeletion(int trnsId)
This method is called between the beginS2CUpdate and the endS2CUpdate in the transaction that delete the RpObject. RpObject will be effectively destroyed just after the endS2CUpdate. Default implementation do nothing.
Parameters:
id - the transaction id.

getLabel

public String getLabel()

toString

public String toString()
Overrides:
toString in class Object

performUpdate

protected final boolean performUpdate(ilog.server.jcomp.RpObjectBasicUpdate upd)

performUpdate

protected final boolean performUpdate(ilog.server.jcomp.RpObjectBasicUpdate upd,
                                      int updateType)

ILS_RP_ATTR_BOOLEAN

public static void ILS_RP_ATTR_BOOLEAN(String clName,
                                       String attrName,
                                       String accName)

ILS_RP_ATTR_CHAR

public static void ILS_RP_ATTR_CHAR(String clName,
                                    String attrName,
                                    String accName)

ILS_RP_ATTR_INT

public static void ILS_RP_ATTR_INT(String clName,
                                   String attrName,
                                   String accName)

ILS_RP_ATTR_LONG

public static void ILS_RP_ATTR_LONG(String clName,
                                    String attrName,
                                    String accName)

ILS_RP_ATTR_REF

public static void ILS_RP_ATTR_REF(String clName,
                                   String attrName,
                                   String accName,
                                   String attrType)

ILS_RP_ATTR_FLOAT

public static void ILS_RP_ATTR_FLOAT(String clName,
                                     String attrName,
                                     String accName)

ILS_RP_ATTR_DOUBLE

public static void ILS_RP_ATTR_DOUBLE(String clName,
                                      String attrName,
                                      String accName)

ILS_RP_ATTR_STRING

public static void ILS_RP_ATTR_STRING(String clName,
                                      String attrName,
                                      String accName)

ILS_RP_ATTR_USERTYPE

public static void ILS_RP_ATTR_USERTYPE(String clName,
                                        String userType,
                                        String attrName,
                                        String accName)

ILS_RP_ATTR_HREF

public static void ILS_RP_ATTR_HREF(String clName,
                                    String attrName,
                                    String accName)

ILS_RP_ATTR_REF

public static void ILS_RP_ATTR_REF(String clName,
                                   String attrName,
                                   String accName)

ILS_RP_ATTR_MVVALUE

public static void ILS_RP_ATTR_MVVALUE(String clName,
                                       String attrName,
                                       String accName)

ILS_RP_INDEXED_ATTR_BOOLEAN

public static void ILS_RP_INDEXED_ATTR_BOOLEAN(String clName,
                                               String attrName,
                                               String accName)

ILS_RP_INDEXED_ATTR_CHAR

public static void ILS_RP_INDEXED_ATTR_CHAR(String clName,
                                            String attrName,
                                            String accName)

ILS_RP_INDEXED_ATTR_INT

public static void ILS_RP_INDEXED_ATTR_INT(String clName,
                                           String attrName,
                                           String accName)

ILS_RP_INDEXED_ATTR_LONG

public static void ILS_RP_INDEXED_ATTR_LONG(String clName,
                                            String attrName,
                                            String accName)

ILS_RP_INDEXED_ATTR_FLOAT

public static void ILS_RP_INDEXED_ATTR_FLOAT(String clName,
                                             String attrName,
                                             String accName)

ILS_RP_INDEXED_ATTR_DOUBLE

public static void ILS_RP_INDEXED_ATTR_DOUBLE(String clName,
                                              String attrName,
                                              String accName)

ILS_RP_INDEXED_ATTR_STRING

public static void ILS_RP_INDEXED_ATTR_STRING(String clName,
                                              String attrName,
                                              String accName)

ILS_RP_INDEXED_ATTR_USERTYPE

public static void ILS_RP_INDEXED_ATTR_USERTYPE(String clName,
                                                String userType,
                                                String attrName,
                                                String accName)

ILS_RP_INDEXED_ATTR_HREF

public static void ILS_RP_INDEXED_ATTR_HREF(String clName,
                                            String attrName,
                                            String accName)

ILS_RP_INDEXED_ATTR_REF

public static void ILS_RP_INDEXED_ATTR_REF(String clName,
                                           String attrName,
                                           String accName)

ILS_RP_INDEXED_ATTR_MVVALUE

public static void ILS_RP_INDEXED_ATTR_MVVALUE(String clName,
                                               String attrName,
                                               String accName)

ILS_RP_DEFAULT_ATTR_BOOLEAN

public static void ILS_RP_DEFAULT_ATTR_BOOLEAN(String clName,
                                               String accName)

ILS_RP_DEFAULT_ATTR_CHAR

public static void ILS_RP_DEFAULT_ATTR_CHAR(String clName,
                                            String accName)

ILS_RP_DEFAULT_ATTR_INT

public static void ILS_RP_DEFAULT_ATTR_INT(String clName,
                                           String accName)

ILS_RP_DEFAULT_ATTR_LONG

public static void ILS_RP_DEFAULT_ATTR_LONG(String clName,
                                            String accName)

ILS_RP_DEFAULT_ATTR_FLOAT

public static void ILS_RP_DEFAULT_ATTR_FLOAT(String clName,
                                             String accName)

ILS_RP_DEFAULT_ATTR_DOUBLE

public static void ILS_RP_DEFAULT_ATTR_DOUBLE(String clName,
                                              String accName)

ILS_RP_DEFAULT_ATTR_STRING

public static void ILS_RP_DEFAULT_ATTR_STRING(String clName,
                                              String accName)

ILS_RP_DEFAULT_ATTR_USERTYPE

public static void ILS_RP_DEFAULT_ATTR_USERTYPE(String clName,
                                                String userType,
                                                String accName)

ILS_RP_DEFAULT_ATTR_REF

public static void ILS_RP_DEFAULT_ATTR_REF(String clName,
                                           String accName,
                                           String attrType)

ILS_RP_DEFAULT_ATTR_MVVALUE

public static void ILS_RP_DEFAULT_ATTR_MVVALUE(String clName,
                                               String accName)

ILS_RP_DEFAULT_INDEXED_ATTR_BOOL

public static void ILS_RP_DEFAULT_INDEXED_ATTR_BOOL(String clName,
                                                    String accName)

ILS_RP_DEFAULT_INDEXED_ATTR_CHAR

public static void ILS_RP_DEFAULT_INDEXED_ATTR_CHAR(String clName,
                                                    String accName)

ILS_RP_DEFAULT_INDEXED_ATTR_INT

public static void ILS_RP_DEFAULT_INDEXED_ATTR_INT(String clName,
                                                   String accName)

ILS_RP_DEFAULT_INDEXED_ATTR_LONG

public static void ILS_RP_DEFAULT_INDEXED_ATTR_LONG(String clName,
                                                    String accName)

ILS_RP_DEFAULT_INDEXED_ATTR_FLOAT

public static void ILS_RP_DEFAULT_INDEXED_ATTR_FLOAT(String clName,
                                                     String accName)

ILS_RP_DEFAULT_INDEXED_ATTR_DOUBLE

public static void ILS_RP_DEFAULT_INDEXED_ATTR_DOUBLE(String clName,
                                                      String accName)

ILS_RP_DEFAULT_INDEXED_ATTR_STRING

public static void ILS_RP_DEFAULT_INDEXED_ATTR_STRING(String clName,
                                                      String accName)

ILS_RP_DEFAULT_INDEXED_ATTR_USERTYPE

public static void ILS_RP_DEFAULT_INDEXED_ATTR_USERTYPE(String clName,
                                                        String userType,
                                                        String accName)

ILS_RP_DEFAULT_INDEXED_ATTR_REF

public static void ILS_RP_DEFAULT_INDEXED_ATTR_REF(String clName,
                                                   String accName,
                                                   String attrType)

ILS_RP_DEFAULT_INDEXED_ATTR_MVVALUE

public static void ILS_RP_DEFAULT_INDEXED_ATTR_MVVALUE(String clName,
                                                       String accName)