OracleJavaScript API Reference for Oracle ADF Faces

 

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

oracle.adfinternal.view.js.comm
Class AdfMarshalingService

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adfinternal.view.js.comm.AdfMarshalingService

public class AdfMarshalingService
extends AdfObject
AdfMarshalingService class



Field Summary

private Object
_nameMap
private Object
_typeMap


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

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfMarshalingService()
AdfMarshalingService class


Method Summary

private static Object
_createElementNS(Object doc, Object nmspace, Object name)
private static Object
_DE()
public static Object
getDefault()
Returns the default global static instance of AdfMarshalingService
private Object
_getEncoderEntryByType(Object type)
protected Object
Init()
Initializes the instance.
public Object
marshal(Object parentElem, Object obj, Object objStack)
Marshals a Javascript object into XML This method returns a newly created XML element or null if the object could not be parshaled because it was a part of a circular reference Parameters:
private static Object
_ObjectStack()
public Object
registerEncoder(Object encoder)
Registers a custom encoder Parameter:


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

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


Field Detail


_nameMap

private Object _nameMap

_typeMap

private Object _typeMap

Constructor Detail


AdfMarshalingService

public AdfMarshalingService()

AdfMarshalingService class

Method Detail


_createElementNS

private static Object _createElementNS(Object doc,
                                       Object nmspace,
                                       Object name)

Parameters:
doc    
nmspace    
name    
Return:
Object

_DE

private static Object _DE()

Return:
Object

getDefault

public static Object getDefault()

Returns the default global static instance of AdfMarshalingService

Return:
Object

_getEncoderEntryByType

private Object _getEncoderEntryByType(Object type)

Parameters:
type    
Return:
Object

Init

protected Object Init()

Initializes the instance. Subclasses of AdfObject must call their superclass' Init

Return:
Object
Overrides:
AdfObject.Init()

marshal

public Object marshal(Object parentElem,
                      Object obj,
                      Object objStack)

Marshals a Javascript object into XML This method returns a newly created XML element or null if the object could not be parshaled because it was a part of a circular reference Parameters: parentElem - parent XML element where the newly created element should be added obj - object to be marshaled objStack - a context object used by the recursive marshal() calls to prevent circular references from being expanded. When marshal() method is called with a top-level object, this parameter should be null

Parameters:
parentElem    
obj    
objStack    
Return:
Object

_ObjectStack

private static Object _ObjectStack()

Return:
Object

registerEncoder

public Object registerEncoder(Object encoder)

Registers a custom encoder Parameter: encoder - custom encoder instance that is expected to implement the following methods (see AdfMarshalingService._DE for reference): <String >getNamespace() - returns encoder's unique XML namespace getTypeMap() - returns a map whose keys are the supported Javascript types (functions), and the values are their corresponding XML element tag names. For example, the following code could be use to create a map: var map = new Object(); map[MyType] = "MyType"; //MyType is a Javascript class <void> encode(elem, obj, objStack, service) - marshals Javascript types into XML Parameters: elem - XML element representing the object to be marshaled. The element is created by the marshaling framework, and not this method. The framework is also responsible for setting the correct XML namespace obj - object to be marshaled objStack - a context object used by the marshaling framework to detect circular references. This parameter should be passed to the marshal() calls made by the encoder service - marshaling service instance. This instance should be used to delegate marshaling of other types to the framework (when marshaling object properties, for example)

Parameters:
encoder    
Return:
Object

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

 

Generated on 2011.04.27 02:28 UTC
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.