public interface DynObjectManager
Modifier and Type | Field and Description |
---|---|
static String |
DYNCLASS_NAME_SEPARATOR |
static int |
NULLCODE
Null value for method id.
|
Modifier and Type | Method and Description |
---|---|
void |
add(DynClass dynClass)
Aņade la dynClass a la lista de clases registradas.
|
DynClass |
add(String name)
Create and add to the manager a class with the name
passed as parameter in the default namespace.
|
DynClass |
add(String name,
String description)
Create and add to the manager a class with the name
passed as parameter in the default namespace.
|
void |
clear(DynObject obj) |
void |
consolide()
Actualiza todas las DynClasses registradas para reflejar la
herencia de forma adecuada.
|
void |
copy(DynObject source,
DynObject target) |
DynClass |
createDynClass(String name,
String description)
Create a instance of DynClass with the name and description
Indicated as parameters.
|
DynClass |
createDynClass(String namespace,
String name,
String description)
Create a instance of DynClass with the name and description
Indicated as parameters.
|
DynClassName |
createDynClassName(String name)
Creates a
DynClassName with a DynClass
name or fullname |
DynClassName |
createDynClassName(String namespace,
String name)
Creates a
DynClassName with a DynClass
name and its namespace. |
DynField |
createDynField(String name) |
DynObject |
createDynObject(DynStruct dynStruct)
Create a new DynObject associated to the DynStruct or DynClass
passed as parameter.
|
DynObject |
createDynObject(String classname)
Crea un nuevo objeto asociandole como clase base la indicada que tiene el
nombre indicado.
|
DynObject |
createDynObject(String namespace,
String classname)
Crea un nuevo objeto asociandole como clase base la indicada que tiene el
nombre indicado.
|
DynObjectPagingHelper |
createDynObjectPagingHelper(DynObjectSet set)
Creates a new
DynObjectPagingHelper to page the data of a
DynObjectSet . |
DynObjectPagingHelper |
createDynObjectPagingHelper(DynObjectSet set,
int pageSize)
Creates a new
DynObjectPagingHelper to page the data of a
DynObjectSet . |
DynObjectEncoder |
createSimpleDynObjectEncoder() |
String |
exportSimpleDynClassDefinitions(DynClass dynClass) |
void |
exportSimpleDynClassDefinitions(File out,
DynClass dynClass) |
void |
exportSimpleDynClassDefinitions(OutputStream out,
DynClass dynClass) |
DynClass |
get(String name)
Obtiene la clase asociado al nombre indicado.
|
DynClass |
get(String namespace,
String name)
Obtiene el la clase asociado al nombre indicado dentro del
namespace pedido.
|
Object |
getAttributeValue(Object obj,
String name) |
int |
getCount()
Return the count of registered DynClass.
|
Class |
getDefaultClassOfType(int type)
Deprecated.
use DataTypesManager.getDefaultClass
|
DynMethod |
getDynMethod(Class theClass,
int code) |
DynMethod |
getDynMethod(DynClass dynClass,
int code) |
DynMethod |
getDynMethod(DynObject dynObject,
int code)
Obtain the method for the indicated code of the dynObject.
|
DynMethod |
getDynMethod(int code) |
DynMethod |
getDynMethod(Object obj,
int code) |
DynMethod |
getDynMethod(String methodName)
Retrieve an anonimous method registered in the manager.
|
List |
getNames()
Return the list of names of all registered DynClass.
|
boolean |
has(String name)
Comprueba si esta registrada una clase.
|
boolean |
has(String namespace,
String name)
Comprueba si esta registrada una clase.
|
Map |
importDynClassDefinitions(InputStream resource,
ClassLoader loader)
Load the classes defined in the resource.
|
Map |
importDynClassDefinitions(InputStream resource,
ClassLoader loader,
String defaultNamespace)
Load the classes defined in the resource and return a Map
with its.
|
Map |
importDynClassDefinitions(XmlPullParser parser,
ClassLoader loader,
String defaultNamespace)
Load the classes defined in the resource.
|
Object |
invokeDynMethod(Object self,
int code,
DynObject context)
Invoke the method of the indicated code for the object self, with
parameters in context.
|
Iterator |
iterator()
Return an iterator over all registered DynClass.
|
Iterator |
iterator(String namespace)
Return an iterator over all registered DynClass with the same namespace.
|
int |
registerDynMethod(Class theClass,
DynMethod dynMethod)
Register the method in the class.
|
int |
registerDynMethod(DynClass dynClass,
DynMethod dynMethod)
Register the method in the dynClass.
|
int |
registerDynMethod(DynMethod dynMethod)
Register an anonimous method.
|
void |
remove(DynStruct dynClass) |
void |
setAttributeValue(Object obj,
String name,
Object value) |
void |
validate(DynObject object) |
static final String DYNCLASS_NAME_SEPARATOR
static final int NULLCODE
DynClass createDynClass(String name, String description)
name
- , the name used for DynClass name.description
- , the description associated to the
new DynClass.DynObjectEncoder createSimpleDynObjectEncoder()
DynClass createDynClass(String namespace, String name, String description)
namespace
- , the namespace used for the new DynClass.name
- , the name used for the new DynClass.description
- , the description associated to the
new DynClass.void exportSimpleDynClassDefinitions(File out, DynClass dynClass) throws FileNotFoundException
FileNotFoundException
void exportSimpleDynClassDefinitions(OutputStream out, DynClass dynClass)
Map importDynClassDefinitions(InputStream resource, ClassLoader loader, String defaultNamespace) throws XmlPullParserException, IOException
resource
- , XML with the definition of dynamic
classes.loader
- , loader used to load classes used in
"classOfValue" in the resource.defaultNamespace
- , namespace used in classes that do not
specify a namespace in the resource.XmlPullParserException
IOException
Map importDynClassDefinitions(InputStream resource, ClassLoader loader) throws XmlPullParserException, IOException
resource
- , XML with the definition of dynamic
classes.loader
- , loader used to load classes used in
"classOfValue" in the resource.XmlPullParserException
IOException
Map importDynClassDefinitions(XmlPullParser parser, ClassLoader loader, String defaultNamespace) throws XmlPullParserException, IOException
parser
- , XML parser used in the definition of dynamic
classes.loader
- , loader used to load classes used in
"classOfValue" in the resource.defaultNamespace
- , namespace used in classes that do not
specify a namespace in the resource.XmlPullParserException
IOException
void add(DynClass dynClass) throws DuplicateDynClassException
dynClass
- DuplicateDynClassException
DynClass add(String name, String description)
name
- description
- DynClass add(String name)
name
- description
- void remove(DynStruct dynClass)
DynClass get(String name)
name
- , nombre de la clase que queremos obtener.DynClass get(String namespace, String name)
name
- , nombre de la clase que queremos obtener.boolean has(String name)
boolean has(String namespace, String name)
int getCount()
Iterator iterator()
Iterator iterator(String namespace)
List getNames()
DynObject createDynObject(DynStruct dynStruct)
dynStruct
- or dynClass to use for create the dynObjectDynObject createDynObject(String classname)
dynClassName
- DynObject createDynObject(String namespace, String classname)
dynClassName
- void consolide()
int registerDynMethod(DynClass dynClass, DynMethod dynMethod)
dynClass
- class over the method is registreddynMethod
- method to registryint registerDynMethod(Class theClass, DynMethod dynMethod)
theClass
- class over the method is registreddynMethod
- method to registryint registerDynMethod(DynMethod dynMethod)
dynMethod
- method to registryDynMethod getDynMethod(DynObject dynObject, int code) throws DynMethodException
dynObject
- code
- code of the requeted methodDynMethodException
DynMethod getDynMethod(DynClass dynClass, int code) throws DynMethodException
DynMethodException
DynMethod getDynMethod(Object obj, int code) throws DynMethodException
DynMethodException
DynMethod getDynMethod(Class theClass, int code) throws DynMethodException
DynMethodException
DynMethod getDynMethod(int code) throws DynMethodException
DynMethodException
DynMethod getDynMethod(String methodName) throws DynMethodException
methodName
- name of the requeted methodDynMethodException
Object invokeDynMethod(Object self, int code, DynObject context) throws DynMethodException
self
- object over the method is invokedcode
- code for the method to invokecontext
- paramters of methodDynMethodException
void validate(DynObject object) throws DynObjectValidateException
DynObjectValidateException
Class getDefaultClassOfType(int type)
DynObjectPagingHelper createDynObjectPagingHelper(DynObjectSet set) throws BaseException
DynObjectPagingHelper
to page the data of a
DynObjectSet
.set
- to page the data ofDynObjectPagingHelper
BaseException
- if there is an error creating the paging helper, usually
because of an error getting the data of the
DynObjectSet
DynObjectPagingHelper createDynObjectPagingHelper(DynObjectSet set, int pageSize) throws BaseException
DynObjectPagingHelper
to page the data of a
DynObjectSet
.set
- to page the data ofpageSize
- the size of the page to load using the helperDynObjectPagingHelper
BaseException
- if there is an error creating the paging helper, usually
because of an error getting the data of the
DynObjectSet
DynClassName createDynClassName(String namespace, String name)
DynClassName
with a DynClass
name and its namespace.namespace
- where the DynClass
belongs toname
- of the DynClass
DynClassName
DynClassName createDynClassName(String name)
DynClassName
with a DynClass
name or fullnamename
- of the DynClass
. It might be a simple name or a
composed full name (namespace and name)DynClassName
void clear(DynObject obj)