public interface DynObjectManager
Modifier and Type | Field and Description |
---|---|
static java.lang.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(java.lang.String name)
Create and add to the manager a class with the name
passed as parameter in the default namespace.
|
DynClass |
add(java.lang.String name,
java.lang.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 |
createCopy(DynClass source) |
DynClass |
createDynClass(java.lang.String name,
java.lang.String description)
Create a instance of DynClass with the name and description
Indicated as parameters.
|
DynClass |
createDynClass(java.lang.String namespace,
java.lang.String name,
java.lang.String description)
Create a instance of DynClass with the name and description
Indicated as parameters.
|
DynClassName |
createDynClassName(java.lang.String name)
Creates a
DynClassName with a DynClass
name or fullname |
DynClassName |
createDynClassName(java.lang.String namespace,
java.lang.String name)
Creates a
DynClassName with a DynClass
name and its namespace. |
DynField |
createDynField(java.lang.String name) |
DynObject |
createDynObject(DynStruct dynStruct)
Create a new DynObject associated to the DynStruct or DynClass
passed as parameter.
|
DynObject |
createDynObject(java.lang.String classname)
Crea un nuevo objeto asociandole como clase base la indicada que tiene el
nombre indicado.
|
DynObject |
createDynObject(java.lang.String namespace,
java.lang.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() |
boolean |
equals(DynObject obj1,
DynObject obj2) |
java.lang.String |
exportSimpleDynClassDefinitions(DynClass dynClass) |
void |
exportSimpleDynClassDefinitions(java.io.File out,
DynClass dynClass) |
void |
exportSimpleDynClassDefinitions(java.io.OutputStream out,
DynClass dynClass) |
DynClass |
get(java.lang.String name)
Obtiene la clase asociado al nombre indicado.
|
DynClass |
get(java.lang.String namespace,
java.lang.String name)
Obtiene el la clase asociado al nombre indicado dentro del
namespace pedido.
|
java.lang.Object |
getAttributeValue(java.lang.Object obj,
java.lang.String name) |
int |
getCount()
Return the count of registered DynClass.
|
java.lang.Class |
getDefaultClassOfType(int type)
Deprecated.
use DataTypesManager.getDefaultClass
|
DynMethod |
getDynMethod(java.lang.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(java.lang.Object obj,
int code) |
DynMethod |
getDynMethod(java.lang.String methodName)
Retrieve an anonimous method registered in the manager.
|
java.util.List |
getNames()
Return the list of names of all registered DynClass.
|
UnmodifiableBasicMap<java.lang.String,DynField> |
getTags() |
boolean |
has(java.lang.String name)
Comprueba si esta registrada una clase.
|
boolean |
has(java.lang.String namespace,
java.lang.String name)
Comprueba si esta registrada una clase.
|
int |
hashCode(DynObject obj) |
java.util.Map |
importDynClassDefinitions(java.io.InputStream resource,
java.lang.ClassLoader loader)
Load the classes defined in the resource.
|
java.util.Map |
importDynClassDefinitions(java.io.InputStream resource,
java.lang.ClassLoader loader,
java.lang.String defaultNamespace)
Load the classes defined in the resource and return a Map
with its.
|
java.util.Map |
importDynClassDefinitions(XmlPullParser parser,
java.lang.ClassLoader loader,
java.lang.String defaultNamespace)
Load the classes defined in the resource.
|
java.lang.Object |
invokeDynMethod(java.lang.Object self,
int code,
DynObject context)
Invoke the method of the indicated code for the object self, with
parameters in context.
|
java.util.Iterator |
iterator()
Return an iterator over all registered DynClass.
|
java.util.Iterator |
iterator(java.lang.String namespace)
Return an iterator over all registered DynClass with the same namespace.
|
int |
registerDynMethod(java.lang.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.
|
DynField |
registerTag(java.lang.String name,
java.lang.String description) |
DynField |
registerTag(java.lang.String name,
java.lang.String description,
DynMethod valuesMethod) |
DynField |
registerTag(java.lang.String name,
java.lang.String description,
java.lang.String[] values) |
void |
remove(DynStruct dynClass) |
void |
setAttributeValue(java.lang.Object obj,
java.lang.String name,
java.lang.Object value) |
void |
validate(DynObject object) |
static final java.lang.String DYNCLASS_NAME_SEPARATOR
static final int NULLCODE
DynClass createDynClass(java.lang.String name, java.lang.String description)
name
- , the name used for DynClass name.description
- , the description associated to the
new DynClass.DynObjectEncoder createSimpleDynObjectEncoder()
DynClass createDynClass(java.lang.String namespace, java.lang.String name, java.lang.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.java.lang.String exportSimpleDynClassDefinitions(DynClass dynClass)
void exportSimpleDynClassDefinitions(java.io.File out, DynClass dynClass) throws java.io.FileNotFoundException
java.io.FileNotFoundException
void exportSimpleDynClassDefinitions(java.io.OutputStream out, DynClass dynClass)
java.util.Map importDynClassDefinitions(java.io.InputStream resource, java.lang.ClassLoader loader, java.lang.String defaultNamespace) throws XmlPullParserException, java.io.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
java.io.IOException
java.util.Map importDynClassDefinitions(java.io.InputStream resource, java.lang.ClassLoader loader) throws XmlPullParserException, java.io.IOException
resource
- , XML with the definition of dynamic
classes.loader
- , loader used to load classes used in
"classOfValue" in the resource.XmlPullParserException
java.io.IOException
java.util.Map importDynClassDefinitions(XmlPullParser parser, java.lang.ClassLoader loader, java.lang.String defaultNamespace) throws XmlPullParserException, java.io.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
java.io.IOException
void add(DynClass dynClass) throws DuplicateDynClassException
dynClass
- DuplicateDynClassException
DynClass add(java.lang.String name, java.lang.String description)
name
- description
- DynClass add(java.lang.String name)
name
- description
- void remove(DynStruct dynClass)
DynClass get(java.lang.String name)
name
- , nombre de la clase que queremos obtener.DynClass get(java.lang.String namespace, java.lang.String name)
name
- , nombre de la clase que queremos obtener.boolean has(java.lang.String name)
boolean has(java.lang.String namespace, java.lang.String name)
int getCount()
java.util.Iterator iterator()
java.util.Iterator iterator(java.lang.String namespace)
java.util.List getNames()
DynObject createDynObject(DynStruct dynStruct)
dynStruct
- or dynClass to use for create the dynObjectDynObject createDynObject(java.lang.String classname)
dynClassName
- DynObject createDynObject(java.lang.String namespace, java.lang.String classname)
dynClassName
- void consolide()
int registerDynMethod(DynClass dynClass, DynMethod dynMethod)
dynClass
- class over the method is registreddynMethod
- method to registryint registerDynMethod(java.lang.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(java.lang.Object obj, int code) throws DynMethodException
DynMethodException
DynMethod getDynMethod(java.lang.Class theClass, int code) throws DynMethodException
DynMethodException
DynMethod getDynMethod(int code) throws DynMethodException
DynMethodException
DynMethod getDynMethod(java.lang.String methodName) throws DynMethodException
methodName
- name of the requeted methodDynMethodException
java.lang.Object invokeDynMethod(java.lang.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
java.lang.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(java.lang.String namespace, java.lang.String name)
DynClassName
with a DynClass
name and its namespace.namespace
- where the DynClass
belongs toname
- of the DynClass
DynClassName
DynClassName createDynClassName(java.lang.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
java.lang.Object getAttributeValue(java.lang.Object obj, java.lang.String name)
void setAttributeValue(java.lang.Object obj, java.lang.String name, java.lang.Object value)
int hashCode(DynObject obj)
void clear(DynObject obj)
DynField createDynField(java.lang.String name)
DynField registerTag(java.lang.String name, java.lang.String description)
DynField registerTag(java.lang.String name, java.lang.String description, java.lang.String[] values)
DynField registerTag(java.lang.String name, java.lang.String description, DynMethod valuesMethod)
UnmodifiableBasicMap<java.lang.String,DynField> getTags()