Cool documentation

com.sap.tc.col.client.generic.api
Interface IServiceFacade


public interface IServiceFacade

interface ServiceFacade is the central entry point for the GCP User (Generic Client Proxy). Beside the entry point function, there are the following main tasks:


Method Summary
 boolean check()
          Checks if the current backend transaction is in a state, where it can be committed using the save() method without error.
 void cleanup()
          Performs a rollback on the current backend transaction.
 void closeConnection()
          Closes the connection to the backend server.
 void flush()
          Flushes the service queue, which is associated with this instance.
 IMessageList getAllMessages()
          Returns a list of all messages currently held by the frontend message handler.
 IMessageList getAndClearSystemMessages()
          Returns the list with all system messages held by the frontend message handler and removes them at the same time.
 IMessageList getMessages()
          Deprecated. use
getAndClearSystemMessages()
instead
 IServiceModule getServiceModule(java.lang.String serviceModuleName)
          returns the ServiceModule with given name or throws an IllegalArgumentException, if serviceModuleName is no existing ServiceModule
 IServiceModule getServiceModule(java.lang.String serviceModuleName, java.lang.String configuration)
          returns the ServiceModule with given name to the given configuration or throws an IllegalArgumentException, if serviceModuleName is no existing ServiceModule or configuration is no valid configuration
 java.lang.String[] getServiceModuleConfigurationNames(java.lang.String serviceModuleName)
          returns an array with all configuration names for the ServiceModule with given name
 IServiceModuleDescriptor getServiceModuleDescriptor(java.lang.String serviceModuleName)
          returns the meta data of the ServiceModule with given name.
 IServiceModuleDescriptor getServiceModuleDescriptor(java.lang.String serviceModuleName, java.lang.String configuration)
          returns the meta data of the ServiceModule with given name to the given configuration.
 java.lang.String[] getServiceModuleNames()
          returns an array with all ServiceModule names
 void initLocalLogging()
          Init local Logging in the GCP.
 boolean isDirty()
          returns true if changing calls (insert, update, delete, Action) are pending or not commited, or false otherwise.
 void resetLockCache()
          resets the local Lock cache.
 boolean save()
          Performs a commit on the current backend transaction.
 void setDebug(boolean enabled, java.lang.String serviceModuleName, java.lang.String guiHost)
          Enables or disables backend debugging.
 

Method Detail

getServiceModule

public IServiceModule getServiceModule(java.lang.String serviceModuleName)
returns the ServiceModule with given name or throws an IllegalArgumentException, if serviceModuleName is no existing ServiceModule

Parameters:
serviceModuleName - the name of the service module
Returns:
IServiceModule the service module

getServiceModule

public IServiceModule getServiceModule(java.lang.String serviceModuleName,
                                       java.lang.String configuration)
returns the ServiceModule with given name to the given configuration or throws an IllegalArgumentException, if serviceModuleName is no existing ServiceModule or configuration is no valid configuration

Parameters:
serviceModuleName - the name of the service module
configuration - the name of a predefined ServiceModule configuration
Returns:
IServiceModule the service module

getServiceModuleDescriptor

public IServiceModuleDescriptor getServiceModuleDescriptor(java.lang.String serviceModuleName)
returns the meta data of the ServiceModule with given name.
Parameters:
serviceModuleName - the name of the ServiceModuleDescriptor to get
Returns:
IServiceModuleDescriptor the meta data of the ServiceModule with given name

getServiceModuleDescriptor

public IServiceModuleDescriptor getServiceModuleDescriptor(java.lang.String serviceModuleName,
                                                           java.lang.String configuration)
returns the meta data of the ServiceModule with given name to the given configuration.

Parameters:
serviceModuleName - the name of the ServiceModuleDescriptor to get
configuration - the name of a predefined ServiceModule configuration
Returns:
IServiceModuleDescriptor the meta data of the ServiceModule with given name

getServiceModuleNames

public java.lang.String[] getServiceModuleNames()
returns an array with all ServiceModule names
Returns:
String[] an array with all ServiceModule names

getServiceModuleConfigurationNames

public java.lang.String[] getServiceModuleConfigurationNames(java.lang.String serviceModuleName)
returns an array with all configuration names for the ServiceModule with given name
Parameters:
serviceModuleName - the name of the ServiceModule
Returns:
String[] an array with all ServiceModule configuration names

flush

public void flush()
Flushes the service queue, which is associated with this instance. Before flushing the queue all pending changes of the different ServiceModules are appended to the queue. After flushing the queue, all ServiceModules will update their data correspondingly.


isDirty

public boolean isDirty()
returns true if changing calls (insert, update, delete, Action) are pending or not commited, or false otherwise. The method first puts all pending changes in the service queue (sendChanges()) and then returns the result.
Returns:
boolean true if changing calls (insert, update, delete, Action) are pending or not commited, or false otherwise

getMessages

public IMessageList getMessages()
Deprecated. use
getAndClearSystemMessages()
instead

Returns the system messages held by the frontend message handler. These are the messages, that don't relate to a specific aspect row. Messages, which relate to Aspects or AspectRows can be get with IAspect.getMessages(). Message lists must be cleared explicitly.


getAndClearSystemMessages

public IMessageList getAndClearSystemMessages()
Returns the list with all system messages held by the frontend message handler and removes them at the same time. System messages are messages, that don't relate to a specific aspect row. Messages, which relate to Aspects or AspectRows can be get with IAspect.getMessages().
Returns:
IMessageList the list with all system messages held by the frontend message handler

getAllMessages

public IMessageList getAllMessages()
Returns a list of all messages currently held by the frontend message handler. Message lists must be cleared explicitly.


cleanup

public void cleanup()
Performs a rollback on the current backend transaction. A new transaction is started implicitly. the local Lock cache is reset

save

public boolean save()
Performs a commit on the current backend transaction. A new transaction is started implicitly. the local Lock cache is not reset, but this can be done explicitly with method
resetLockCache()
Returns:
boolean true, if the save operation succeeded, false if it was rejected,

check

public boolean check()
Checks if the current backend transaction is in a state, where it can be committed using the save() method without error. The check is performed in the backend.
Returns:
true if the check operation succeeded, false if it was rejected.
See Also:
save()

resetLockCache

public void resetLockCache()
resets the local Lock cache.


setDebug

public void setDebug(boolean enabled,
                     java.lang.String serviceModuleName,
                     java.lang.String guiHost)
Enables or disables backend debugging.

Debug all or a specific service module.

The GUI for debugging can run on another host than the default computer. The default computer is the one where SAPJCO is running if SAPJCO is using.

Parameters:
enabled - if set to true, the debugging is switched on, otherwise debugging is switched off.
serviceModuleName - name of the service module to be debugged or NULL for all service modules.
guiHost - the host name of the computer where the GUI should run or NULL for the default computer.

initLocalLogging

public void initLocalLogging()
Init local Logging in the GCP.

The method inits the SAP logging, if the GCP is used standalone, means GCP is not used from Web Dynpro or some other Software.

closeConnection

public void closeConnection()
Closes the connection to the backend server.

Caution: after connection is closed, each method call on ServiceFacade or GCP objects created from this ServiceFacade could lead to Exceptions, when backend connection is needed explicitly or implicitly!

After this call is executed, you should end the application or work with another ServiceFacade.

Cool documentation

Copyright © 2002 SAP AG. Automatically generated Thu Mar 3 2005, 21:55