OracleJavaScript API Reference for Oracle ADF Faces

 

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

oracle.adfinternal.view.js.monitoring
Class AdfUserActivityInfo

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adfinternal.view.js.monitoring.AdfUserActivityInfo

public class AdfUserActivityInfo
extends AdfObject



Field Summary

private Object
_clientEndTime
private Object
_clientStartTime
private Object
_contextId
private Object
_eventInfo
private Object
_pprTargets


Fields inherited from oracle.adf.view.js.base.AdfObject

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfUserActivityInfo()


Method Summary

public static Object
cleanInstanceMap()
Flushes the instance map, by calling cleanup() on all the objects stored in the AdfUserActivityInfo._instanceMap map.
public Object
cleanup()
Flushes the contents of the AdfUserActivityInfo object and initializes them to null.
private static Object
_getAsObject(String userActInfoStr, String type)
Takes the JSON String representation passed in (userActInfoStr) and unmarshals it to retrieve the JS Object out of it and then updates the UserActivityInfo object of the specified "type".
public String
getClientEndTime()
Returns the client end time
public String
getClientStartTime()
Returns the client start time
public String
getContextId()
Returns the context Id
private Object
_getCurrentTime()
Returns the current time.
public Object
getEventInfo()
Returns the eventInfo
public static AdfUserActivityInfo
getInstance(String type)
Returns a new instance by type.
private String
_getJSONString()
Returns a String that is a string representation of the AdfUserActivtyInfo object marsahled in JSON format.
public static String
getMarshaledObject()
Marshals information for the previous and the current (or primary) requests to be sent to server.
public String
getParentContextId()
Returns the parent context Id for the secondary request case.
public String
getPprTargets()
Returns the partial targets
protected Object
Init()
Method to initialize AdfUserActivityInfo instance.
public static Object
restoreFromSessionStorage()
Restores the user activity information stored in the session storage into UserActivityInfo objects.
public static Object
saveToSessionStorage()
Before the redirect request happens save the user activity information for the previous request and the clientStartTime for the redirect (or the new primary request) in the session storage.
public static Object
saveToSessionStorageByType(String type)
Saves information pertaining to the specified type into the session storage.
public Object
setClientEndTime(Object clientEndTime)
Sets the client end time.
public Object
setClientStartTime(Object clientStartTime)
Sets the client start time.
public Object
setContextId(Object contextId)
Sets the context id.
public Object
setEventInfo(Object eventInfo)
Sets the event info.
public Object
setParentContextId(Object parentContextId)
Sets the parent context id.
public Object
setPprTargets(Object pprTargets)
Sets the Partial targets.


Methods inherited from oracle.adf.view.js.base.AdfObject

adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, toDebugString, toString


Field Detail


_clientEndTime

private Object _clientEndTime

_clientStartTime

private Object _clientStartTime

_contextId

private Object _contextId

_eventInfo

private Object _eventInfo

_pprTargets

private Object _pprTargets

Constructor Detail


AdfUserActivityInfo

public AdfUserActivityInfo()

Method Detail


cleanInstanceMap

public static Object cleanInstanceMap()

Flushes the instance map, by calling cleanup() on all the objects stored in the AdfUserActivityInfo._instanceMap map. This function can be called when its no longer needed to store any userActivity data. Usage : AdfUserActivityInfo.cleanInstanceMap()

Return:
Object

cleanup

public Object cleanup()

Flushes the contents of the AdfUserActivityInfo object and initializes them to null. This method is called on an instance of AdfUserActivityInfo. Usage : userActivityInfo.cleanup() where userActivityInfo is an instance of AdfUserActivityInfo.

Return:
Object

_getAsObject

private static Object _getAsObject(String userActInfoStr,
                                   String type)

Takes the JSON String representation passed in (userActInfoStr) and unmarshals it to retrieve the JS Object out of it and then updates the UserActivityInfo object of the specified "type". In some cases, if a value already exists in the object, it takes precedence over the value stored in session storage as it may be older.

Parameters:
userActInfoStr  -  the marshaled JSON String representation of UserActivityInfo Object
type  -  the type of AdfUserActivityInfo object.
Return:
Object

getClientEndTime

public String getClientEndTime()

Returns the client end time

Return:
String - client end time

getClientStartTime

public String getClientStartTime()

Returns the client start time

Return:
String - client start time

getContextId

public String getContextId()

Returns the context Id

Return:
String - context Id

_getCurrentTime

private Object _getCurrentTime()

Returns the current time.

Return:
Object

getEventInfo

public Object getEventInfo()

Returns the eventInfo

Return:
Object - eventInfo

getInstance

public static AdfUserActivityInfo getInstance(String type)

Returns a new instance by type. Internally UserActivityInfo maintains a static map, of UserActivityInfo objects. This is required in cases where we need to store data for more than one request. The method should be called when caller needs a UserActivityInfo object for the specified type. "previous<n>"- previous requests. In some cases the client keeps track of information for more than one request that was prior to the primary. A higher number for n indicates an older request. n=0 is "previous". "previous" - the request prior to the "primary". "primary" - the primary request. The one that is being sent to the server. "secondary" - the secondary request that is associated to the primary request.

Parameters:
type  -  Valid types include "previous", "primary", "secondary",. In special cases, such as redirect, it may be required to store multiple previous requests' information. In such cases the type of the form "previous<n>" can be used where <n> is a number identifying the specific instance of a previous request.
Return:
AdfUserActivityInfo - an instance of UserActivityInfo object if one already exists for the type, otherwise a new instance of UserActivityInfo object is created.

_getJSONString

private String _getJSONString()

Returns a String that is a string representation of the AdfUserActivtyInfo object marsahled in JSON format.

Return:
String - the JSON String representation of UserActivityInfo Object

getMarshaledObject

public static String getMarshaledObject()

Marshals information for the previous and the current (or primary) requests to be sent to server. This method is usually called when a partial request is about to be made to the server. A call to this method cleans up all UserActivityInfo objects. TODO If we cleanup our data at the end of this call then in the event of an error with the request, all past data gets lost. particularly if there were previous requests' data. Perhaps we should cleanup after a successful partial response returns.

Return:
String - an XML String representation of the given dom node and its children

getParentContextId

public String getParentContextId()

Returns the parent context Id for the secondary request case.

Return:
String - praent context Id

getPprTargets

public String getPprTargets()

Returns the partial targets

Return:
String - comma separated string of partial target ids

Init

protected Object Init()

Method to initialize AdfUserActivityInfo instance.

Return:
Object
Overrides:
AdfObject.Init()

restoreFromSessionStorage

public static Object restoreFromSessionStorage()

Restores the user activity information stored in the session storage into UserActivityInfo objects. Once the information is restored the session storage data is removed.

Return:
Object

saveToSessionStorage

public static Object saveToSessionStorage()

Before the redirect request happens save the user activity information for the previous request and the clientStartTime for the redirect (or the new primary request) in the session storage.

Return:
Object

saveToSessionStorageByType

public static Object saveToSessionStorageByType(String type)

Saves information pertaining to the specified type into the session storage.

Parameters:
type  -  the type of AdfUserActivityInfo object.
Return:
Object

setClientEndTime

public Object setClientEndTime(Object clientEndTime)

Sets the client end time.

Parameters:
clientEndTime    
Return:
Object

setClientStartTime

public Object setClientStartTime(Object clientStartTime)

Sets the client start time.

Parameters:
clientStartTime    
Return:
Object

setContextId

public Object setContextId(Object contextId)

Sets the context id.

Parameters:
contextId    
Return:
Object

setEventInfo

public Object setEventInfo(Object eventInfo)

Sets the event info.

Parameters:
eventInfo    
Return:
Object

setParentContextId

public Object setParentContextId(Object parentContextId)

Sets the parent context id.

Parameters:
parentContextId    
Return:
Object

setPprTargets

public Object setPprTargets(Object pprTargets)

Sets the Partial targets.

Parameters:
pprTargets    
Return:
Object

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

 

Generated on 2009.09.25 03:44 UTC
Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved.