com.sap.mw.jco
Class JCO.Repository

java.lang.Object
  |
  +--com.sap.mw.jco.JCO.BasicRepository
        |
        +--com.sap.mw.jco.JCO.Repository
All Implemented Interfaces:
IRepository
Enclosing class:
JCO

public static class JCO.Repository
extends JCO.BasicRepository
implements IRepository

Implementation of the SAP system repository. The repository queries a remote SAP system(s) for function interfaces and/or structure definitions.

In order to retrieve the necessary information from the SAP system's data dictionary, the repository needs to call a number of RFMs for which the access rights have to be granted (Authorization Object: S_RFC, ACTVT: 16, FUGR).
R/3 ReleaseFunction Groups
since 3.1H RFC1, SG00, SRFC, SUNI, SYST
since 4.0A RFC1, SDIF, SG00, SRFC, SYST, SYSU, SUNI
since 4.6A RFC1, SDIF, SG00, SRFC, SYST, SYSU
since 4.6D RFC1, SDIFRUNTIME, SG00, SRFC, SYST, SYSU


Constructor Summary
JCO.Repository(java.lang.String name, JCO.Client client)
          Creates a new SAP system repository
JCO.Repository(java.lang.String name, java.lang.String pool_name)
          Creates a new SAP system repository
JCO.Repository(java.lang.String name, java.lang.String[] pool_names)
          Creates a new SAP system repository
 
Method Summary
 IMetaData getFunctionInterface(java.lang.String function_name)
          Returns the meta data for the specified function
 java.lang.String[] getPoolNames()
          Returns the array of pool names
 IMetaData getStructureDefinition(java.lang.String structure_name)
          Returns the meta data for the specified structure.
 IMetaData queryFunctionInterface(JCO.Client client, java.lang.String name)
          Queries the function meta data for the passed function name.
 IMetaData queryStructureDefinition(JCO.Client client, java.lang.String name)
          Queries the meta data for the structure with the specified name.
 IMetaData queryTableDefinition(JCO.Client client, java.lang.String name)
          Queries the meta data for the table with the specified the name.
 void setName(java.lang.String name)
          Sets the repository name
 void setPoolNames(java.lang.String[] pool_names)
          Sets the array of pool names
 
Methods inherited from class com.sap.mw.jco.JCO.BasicRepository
addFunctionInterfaceToCache, addFunctionInterfaceToCache, addStructureDefinitionToCache, addStructureDefinitionToCache, getCachedFunctionInterfaces, getCachedStructureDefinitions, getFunctionTemplate, getName, getNextRepository, getTableDefinition, load, removeFunctionInterfaceFromCache, removeStructureDefinitionFromCache, save, setNextRepository
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sap.mw.jco.IRepository
addFunctionInterfaceToCache, addStructureDefinitionToCache, getCachedFunctionInterfaces, getCachedStructureDefinitions, getFunctionTemplate, getName, getNextRepository, getTableDefinition, load, removeFunctionInterfaceFromCache, removeStructureDefinitionFromCache, save, setNextRepository
 

Constructor Detail

JCO.Repository

public JCO.Repository(java.lang.String name,
                      java.lang.String pool_name)
Creates a new SAP system repository
Parameters:
name - the name of the repository
pool_name - the name of the pool

JCO.Repository

public JCO.Repository(java.lang.String name,
                      java.lang.String[] pool_names)
Creates a new SAP system repository
Parameters:
name - the name of the repository
pool_names - the array of pool names

JCO.Repository

public JCO.Repository(java.lang.String name,
                      JCO.Client client)
Creates a new SAP system repository
Parameters:
name - the name of the repository
client - the client to use
Method Detail

setName

public void setName(java.lang.String name)
Sets the repository name
Parameters:
name - the name of the repository

getPoolNames

public java.lang.String[] getPoolNames()
Returns the array of pool names
Returns:
a string array of pool names

setPoolNames

public void setPoolNames(java.lang.String[] pool_names)
Sets the array of pool names
Parameters:
pool_names - the new array of pool names

getFunctionInterface

public IMetaData getFunctionInterface(java.lang.String function_name)
Returns the meta data for the specified function
Specified by:
getFunctionInterface in interface IRepository
Overrides:
getFunctionInterface in class JCO.BasicRepository
Parameters:
function_name - the name of the function for which the meta data is being returned.
Returns:
the meta data for the function or null if the function could not be found.
Throws:
JCO.Exception - if an error occurred during the retrieval of the function interface.

getStructureDefinition

public IMetaData getStructureDefinition(java.lang.String structure_name)
Returns the meta data for the specified structure.
Specified by:
getStructureDefinition in interface IRepository
Overrides:
getStructureDefinition in class JCO.BasicRepository
Parameters:
structure_name - the name of the structure for which the meta data is being returned.
Returns:
the meta data for the structure or null if the structure could not be found.
Throws:
JCO.Exception - if an error occurred during the retrieval of the data structure definition.

queryFunctionInterface

public final IMetaData queryFunctionInterface(JCO.Client client,
                                              java.lang.String name)
Queries the function meta data for the passed function name. This method is mainly used internally and will hardly be called directly by other applications.
Parameters:
client - the client connection to the remote SAP system.
name - the name of the function for which the meta data should be returned.
Returns:
The meta data that describe the parameters of the function.
Throws:
JCO.Exception - if either the function interface could not be found or another error occurred during the query.

queryStructureDefinition

public final IMetaData queryStructureDefinition(JCO.Client client,
                                                java.lang.String name)
Queries the meta data for the structure with the specified name. This method is mainly used internally and will hardly be called directly by other applications.
Parameters:
client - the client connection to the remote SAP system.
name - the name of the structure for which the meta data should be returned.
Returns:
The meta data that describe the fields of the structure.
Throws:
JCO.Exception - if either the data structure definition could not be found or another error occurred during the query.

queryTableDefinition

public final IMetaData queryTableDefinition(JCO.Client client,
                                            java.lang.String name)
Queries the meta data for the table with the specified the name. This method is mainly used internally and will hardly be called directly by other applications.
Parameters:
client - the client connection to the remote SAP system.
name - the table name for which the meta data should be returned.
Returns:
The meta data which describe the columns of the table.
Throws:
JCO.Exception - if either the table definition could not be found or another error occurred during the query.