|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sap.mw.jco.JCO.BasicRepository
The meta data repositories are needed to get the technical description
of functions and parameters used for fullfiling of RFC calls.
This class covers the implementation of basic repository functionality such as
caching and persistence of meta datas.
The BasicRepository serves as a base class for more elaborate repositories.
To fetch the meta datas at runtime from backend system use the JCO.Repository class.
Note: Since a repository caches the meta datas, it is strongly recommended
to create the instance of repository at global scope and use it if possible for all
calls to the same SAP backend.
Keep in mind, that the functions and paramters definitions are always the same inside of one
cluster of SAP application hosts, but can differ from other cluster.
Note: Derived classes have to call super(name) in their
constructors in order to initialize the superclass properly
JCO.Repository| Field Summary | |
protected Hashtable |
function_cache
|
protected String |
name
|
protected IRepository |
next_repository
|
protected Hashtable |
structure_cache
|
| Constructor Summary | |
JCO.BasicRepository(String name)
Constructs a new BasicRepository |
|
| Method Summary | |
void |
addFunctionInterfaceToCache(IMetaData meta)
Adds a function interface to the local cache. |
void |
addFunctionInterfaceToCache(String key,
IMetaData meta)
Adds a function interface to the local cache. |
void |
addStructureDefinitionToCache(IMetaData meta)
Adds a structure definition to the local cache. |
void |
addStructureDefinitionToCache(String key,
IMetaData meta)
Adds a structure definition to the local cache. |
String[] |
getCachedFunctionInterfaces()
Returns the names of the cached functions as a string array |
String[] |
getCachedStructureDefinitions()
Returns the names of the cached structures as a string array |
IMetaData |
getFunctionInterface(String function_name)
Returns the meta data for the passed function |
IFunctionTemplate |
getFunctionTemplate(String function_name)
Returns the template for the passed function. |
String |
getName()
Returns the repository name |
IRepository |
getNextRepository()
Returns the next repository that will be used if a function or structure could not be found in this one. |
IMetaData |
getStructureDefinition(String structure_name)
Returns the meta data for the passed structure |
IMetaData |
getTableDefinition(String table_name)
Returns the meta data for the passed table |
void |
load(String filename)
Load the repository from the specified file. |
void |
removeFunctionInterfaceFromCache(String function_name)
Removes a function interface from the local cache. |
void |
removeStructureDefinitionFromCache(String structure_name)
Removes a function interface from the local cache. |
void |
save(String filename)
Save the repository to the specified file. |
void |
setNextRepository(IRepository next)
Sets the next repository that will be used if a function or structure could not be found in this one. |
protected void |
writeHTML(String html_filename)
Dumps the whole repository to an HTML file This comes in handy for debugging purposes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected String name
protected IRepository next_repository
protected Hashtable function_cache
protected Hashtable structure_cache
| Constructor Detail |
public JCO.BasicRepository(String name)
name - the name of the repository| Method Detail |
public String getName()
getName in interface IRepositorypublic IFunctionTemplate getFunctionTemplate(String function_name)
getFunctionTemplate in interface IRepositoryfunction_name - the name of the function for which the template
is being returned.
JCO.Exception - if another error occurred during the retrieval
of the function interface with the group field set appropiately.public IMetaData getFunctionInterface(String function_name)
getFunctionInterface in interface IRepositoryfunction_name - the name of the function for which the meta data
is being returned
JCO.Exception - if an error occurred during the retrieval
of the function interface.public IMetaData getStructureDefinition(String structure_name)
getStructureDefinition in interface IRepositorystructure_name - the name of the structure for which the meta data
is being returned
JCO.Exception - if an error occurred during the retrieval
of the data structure definition.public IMetaData getTableDefinition(String table_name)
getTableDefinition in interface IRepositorytable_name - the name of the table for which the meta data
is being returned
JCO.Exception - if an error occurred during the retrieval
of the table definition.public IRepository getNextRepository()
getNextRepository in interface IRepositorypublic void setNextRepository(IRepository next)
setNextRepository in interface IRepositorynext - the next repository to use. Pass null if none.public void addFunctionInterfaceToCache(IMetaData meta)
addFunctionInterfaceToCache in interface IRepositorymeta - the meta data of the interface to add to the cache
public void addFunctionInterfaceToCache(String key,
IMetaData meta)
key - the key of the cache entrymeta - the meta data of the interface to add to the cachepublic void addStructureDefinitionToCache(IMetaData meta)
addStructureDefinitionToCache in interface IRepositorymeta - the meta data of a structure to add to the cache
public void addStructureDefinitionToCache(String key,
IMetaData meta)
key - the key of the cache entrymeta - the meta data of a structure to add to the cachepublic void removeFunctionInterfaceFromCache(String function_name)
removeFunctionInterfaceFromCache in interface IRepositoryfunction_name - the name of the function to be removed from the cachepublic void removeStructureDefinitionFromCache(String structure_name)
removeStructureDefinitionFromCache in interface IRepositorystructure_name - the name of the structure to be removed from the cachepublic String[] getCachedFunctionInterfaces()
getCachedFunctionInterfaces in interface IRepositorypublic String[] getCachedStructureDefinitions()
getCachedStructureDefinitions in interface IRepository
public void save(String filename)
throws IOException
save in interface IRepositoryfilename - the file to save the repository to.
IOException - in case of an I/O error.
public void load(String filename)
throws IOException
load in interface IRepositoryfilename - the file to load the repository from.
IOException - in case of an I/O error.protected void writeHTML(String html_filename)
html_filename - the HTML file
|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||