public class DefaultDynObjectManager extends Object implements DynObjectManager
DynObjectManager implementation.DYNCLASS_NAME_SEPARATOR, NULLCODE| Constructor and Description |
|---|
DefaultDynObjectManager() |
| 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 dynClass)
Create a new DynObject associated to the DynStruct or DynClass
passed as parameter.
|
DynObject |
createDynObject(String dynClassName)
Crea un nuevo objeto asociandole como clase base la indicada que tiene el
nombre indicado.
|
DynObject |
createDynObject(String dynClassName,
String namespace)
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(DynClass[] superClasses) |
DynClass |
get(String theName)
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) |
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.
|
int |
getDynMethodCode(Class theClass,
String methodName) |
int |
getDynMethodCode(DynClass dynClass,
String methodName) |
static DefaultDynObjectManager |
getManager() |
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(XmlPullParser parser,
ClassLoader loader,
String defaultNamespace)
Load the classes defined in the resource and return a Map
with its.
|
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) |
public static DefaultDynObjectManager getManager()
public DynClass createDynClass(String name, String description)
DynObjectManagercreateDynClass in interface DynObjectManagername - , the name used for DynClass name.description - , the description associated to the
new DynClass.public DynClass createDynClass(String namespace, String name, String description)
DynObjectManagercreateDynClass in interface DynObjectManagernamespace - , the namespace used for the new DynClass.name - , the name used for the new DynClass.description - , the description associated to the
new DynClass.public void add(DynClass dynClass)
DynObjectManageradd in interface DynObjectManagerpublic DynClass add(String name, String description)
DynObjectManageradd in interface DynObjectManagerpublic DynClass add(String name)
DynObjectManageradd in interface DynObjectManagerpublic void remove(DynStruct dynClass)
remove in interface DynObjectManagerpublic DynClass get(String theName)
DynObjectManagerget in interface DynObjectManagertheName - , nombre de la clase que queremos obtener.public DynClass get(String namespace, String name)
DynObjectManagerget in interface DynObjectManagername - , nombre de la clase que queremos obtener.public int getCount()
DynObjectManagergetCount in interface DynObjectManagerpublic List getNames()
DynObjectManagergetNames in interface DynObjectManagerpublic boolean has(String name)
DynObjectManagerhas in interface DynObjectManagerpublic boolean has(String namespace, String name)
DynObjectManagerhas in interface DynObjectManagerpublic Iterator iterator()
DynObjectManageriterator in interface DynObjectManagerpublic DynObject createDynObject(String dynClassName)
DynObjectManagercreateDynObject in interface DynObjectManagerpublic DynObject createDynObject(String dynClassName, String namespace)
DynObjectManagercreateDynObject in interface DynObjectManagerpublic DynObject createDynObject(DynStruct dynClass)
DynObjectManagercreateDynObject in interface DynObjectManagerdynClass - or dynClass to use for create the dynObjectpublic void consolide()
DynObjectManagerconsolide in interface DynObjectManagerpublic int registerDynMethod(DynClass dynClass, DynMethod dynMethod)
DynObjectManagerregisterDynMethod in interface DynObjectManagerdynClass - class over the method is registreddynMethod - method to registrypublic int registerDynMethod(Class theClass, DynMethod dynMethod)
DynObjectManagerregisterDynMethod in interface DynObjectManagertheClass - class over the method is registreddynMethod - method to registrypublic int registerDynMethod(DynMethod dynMethod)
DynObjectManagerregisterDynMethod in interface DynObjectManagerdynMethod - method to registrypublic Object invokeDynMethod(Object self, int code, DynObject context) throws DynMethodException
DynObjectManagerinvokeDynMethod in interface DynObjectManagerself - object over the method is invokedcode - code for the method to invokecontext - paramters of methodDynMethodExceptionpublic int getDynMethodCode(DynClass dynClass, String methodName) throws DynMethodException
DynMethodExceptionpublic int getDynMethodCode(Class theClass, String methodName) throws DynMethodException
DynMethodExceptionpublic DynMethod getDynMethod(int code) throws DynMethodException
getDynMethod in interface DynObjectManagerDynMethodExceptionpublic DynMethod getDynMethod(String methodName) throws DynMethodException
DynObjectManagergetDynMethod in interface DynObjectManagermethodName - name of the requeted methodDynMethodExceptionpublic DynMethod getDynMethod(Object obj, int code) throws DynMethodException
getDynMethod in interface DynObjectManagerDynMethodExceptionpublic DynMethod getDynMethod(Class theClass, int code) throws DynMethodException
getDynMethod in interface DynObjectManagerDynMethodExceptionpublic DynMethod getDynMethod(DynClass dynClass, int code) throws DynMethodException
getDynMethod in interface DynObjectManagerDynMethodExceptionpublic DynMethod getDynMethod(DynObject dynObject, int code) throws DynMethodException
DynObjectManagergetDynMethod in interface DynObjectManagercode - code of the requeted methodDynMethodExceptionpublic void validate(DynObject object)
validate in interface DynObjectManagerpublic Class getDefaultClassOfType(int type)
getDefaultClassOfType in interface DynObjectManagerpublic String exportSimpleDynClassDefinitions(DynClass dynClass)
exportSimpleDynClassDefinitions in interface DynObjectManagerpublic void exportSimpleDynClassDefinitions(File out, DynClass dynClass) throws FileNotFoundException
exportSimpleDynClassDefinitions in interface DynObjectManagerFileNotFoundExceptionpublic void exportSimpleDynClassDefinitions(OutputStream out, DynClass dynClass)
exportSimpleDynClassDefinitions in interface DynObjectManagerpublic Map importDynClassDefinitions(InputStream resource, ClassLoader loader) throws XmlPullParserException, IOException
DynObjectManagerimportDynClassDefinitions in interface DynObjectManagerresource - , XML with the definition of dynamic
classes.loader - , loader used to load classes used in
"classOfValue" in the resource.XmlPullParserExceptionIOExceptionpublic Map importDynClassDefinitions(XmlPullParser parser, ClassLoader loader, String defaultNamespace) throws XmlPullParserException, IOException
DynObjectManagerimportDynClassDefinitions in interface DynObjectManagerparser - , 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.XmlPullParserExceptionIOExceptionpublic DynObjectPagingHelper createDynObjectPagingHelper(DynObjectSet set) throws BaseException
DynObjectManagerDynObjectPagingHelper to page the data of a
DynObjectSet.createDynObjectPagingHelper in interface DynObjectManagerset - to page the data ofDynObjectPagingHelperBaseException - if there is an error creating the paging helper, usually
because of an error getting the data of the
DynObjectSetpublic DynObjectPagingHelper createDynObjectPagingHelper(DynObjectSet set, int pageSize) throws BaseException
DynObjectManagerDynObjectPagingHelper to page the data of a
DynObjectSet.createDynObjectPagingHelper in interface DynObjectManagerset - to page the data ofpageSize - the size of the page to load using the helperDynObjectPagingHelperBaseException - if there is an error creating the paging helper, usually
because of an error getting the data of the
DynObjectSetpublic DynClassName createDynClassName(String namespace, String name)
DynObjectManagerDynClassName with a DynClass
name and its namespace.createDynClassName in interface DynObjectManagernamespace - where the DynClass belongs toname - of the DynClassDynClassNamepublic DynClassName createDynClassName(String name)
DynObjectManagerDynClassName with a DynClass
name or fullnamecreateDynClassName in interface DynObjectManagername - of the DynClass. It might be a simple name or a
composed full name (namespace and name)DynClassNamepublic Iterator iterator(String nameSpace)
DynObjectManageriterator in interface DynObjectManagerpublic Object getAttributeValue(Object obj, String name)
getAttributeValue in interface DynObjectManagerpublic void setAttributeValue(Object obj, String name, Object value)
setAttributeValue in interface DynObjectManagerpublic DynObjectEncoder createSimpleDynObjectEncoder()
createSimpleDynObjectEncoder in interface DynObjectManagerpublic void copy(DynObject source, DynObject target)
copy in interface DynObjectManagerpublic void clear(DynObject obj)
clear in interface DynObjectManagerpublic DynField createDynField(String name)
createDynField in interface DynObjectManager