public abstract class AbstractRepositoryService extends Object implements IRepositoryService, IThreadSafe, IComponent, IConfigurable, IAutoStartable, IComponentInfo, ILifecycleInfo, IComponentListener, com.sap.netweaver.km.monitor.IMonitorInfoProvider
Copyright (c) SAP AG 2002
Modifier and Type | Class and Description |
---|---|
static interface |
AbstractRepositoryService.CONFIG_ATTRIBUTE_NAME
TBD: Description of the class.
|
Modifier and Type | Field and Description |
---|---|
protected IConfiguration |
config |
protected String |
description |
protected String |
id |
static String |
PARAMETER_ACTION |
static String |
PARAMETER_FALSE |
static String |
PARAMETER_IS_GLOBAL |
static String |
PARAMETER_LOCATION |
static String |
PARAMETER_POPUP |
static String |
PARAMETER_PREFIX |
static String |
PARAMETER_REPOSITORY |
static String |
PARAMETER_RESOURCE |
static String |
PARAMETER_SERVICE |
static String |
PARAMETER_TRUE |
protected Properties |
properties |
protected ComponentStateHandler |
stateHandler |
Constructor and Description |
---|
AbstractRepositoryService()
The default constructor.
|
AbstractRepositoryService(Properties properties)
Deprecated.
As of EP 5.0 SP5, replaced by the default (public, no
arguments) constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
acceptServletCall(Properties properties,
IResourceContext context)
This method is called by the
eServiceServlet to perform some
action. |
protected void |
addRepositoryAssignment(IRepositoryManager mgr)
Called by the framework if a new repository with services is added or the
service was added to the list of an existing repository.
|
void |
configure(IConfiguration config)
Passes the configuration data to the configurable.
|
static com.sap.netweaver.km.monitor.data.ConfigData |
convertConfigData(IConfiguration cfg)
Convert a CRT configuration data object to the monitor format.
|
static Properties |
convertConfigToProperties(IConfiguration config)
Helper method for conversion of configuration data into properties.
|
protected static Properties |
convertConfigToProperties(IConfiguration config,
String prefix)
Helper method for conversion of configuration data into properties.
|
static com.sap.netweaver.km.monitor.data.StatusInfo |
convertStatus(ComponentStateHandler sh)
Convert the CRT status information to the generic monitor status.
|
static com.sap.netweaver.km.monitor.data.StructuredData |
createPropertyList(ComponentStateHandler sh)
Create a list of properties for CRT lifecycle information.
|
Date |
getCreationDate()
Returns the date and time of the creation of the component instance.
|
String |
getDescription()
Returns a description for this service.
|
String |
getDescription(Locale locale)
Returns a description for this service.
|
String |
getID()
Returns a service identifier, unique for this instance.
|
static int |
getInstanceType()
Deprecated.
This method is not required
|
ConfigurationException |
getLastConfigurationException()
Returns the exception thrown in the last call to
IConfigurable.configure(IConfiguration) ,
or IReconfigurable.reconfigure(IConfiguration) . |
Date |
getLastReconfigurationDate()
Returns the date and time of the last reconfiguration of this component.
|
String |
getName()
Returns the component's human-readable name or
null . |
Date |
getNextAutoRestartDate()
Returns the date and time of the next automatic restart of the component.
|
Properties |
getProperties()
Returns some arbitrary properties with information about the component or
null . |
StartupException |
getStartupException()
Returns the exception thrown in the last call to
IStartable.start() ,
Can be null . |
ComponentState |
getState()
Returns the current life-cycle state of the component.
|
void |
notify(ComponentEvent event)
A component was added, reconfigured or will be removed.
|
protected void |
removeRepositoryAssignment(IRepositoryManager mgr)
Called by the framework if a repository is removed from the configuration
or the service is removed from the list.
|
com.sap.netweaver.km.monitor.data.MonitorData |
retrieveMonitorData()
Default implementation - should be overwritten by a service to manage the status during runtime.
|
protected void |
shutDown()
Deprecated.
As of EP 5.0 SP5, replaced by
startUpImpl(Collection) . |
protected void |
shutDownImpl()
The implementation must overwrite this method if it has to release
resources acquired during startup.
|
void |
start()
A component must implement this method if it has initial startup handling
to do before being accessible (acquire resources, open connections to
remote systems, etc).
|
protected void |
startUp(Collection repositoryManagers)
Deprecated.
As of EP 5.0 SP5, replaced by
shutDownImpl() . |
protected void |
startUpImpl(Collection repositoryManagers)
The implementation must overwrite this method if it has initial startup
handling to do (acquire resources, open connections to remote systems,
etc).
|
void |
stop()
This method is only called once during the life-time of a component.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getServiceType
public static final String PARAMETER_SERVICE
public static final String PARAMETER_ACTION
public static final String PARAMETER_RESOURCE
public static final String PARAMETER_REPOSITORY
public static final String PARAMETER_IS_GLOBAL
public static final String PARAMETER_LOCATION
public static final String PARAMETER_POPUP
public static final String PARAMETER_PREFIX
public static final String PARAMETER_TRUE
public static final String PARAMETER_FALSE
protected String id
protected String description
protected Properties properties
protected IConfiguration config
protected final ComponentStateHandler stateHandler
public AbstractRepositoryService()
public AbstractRepositoryService(Properties properties) throws ResourceException
ResourceException
public static int getInstanceType()
IWcmConst
public final String getID()
IRepositoryService
getID
in interface IRepositoryService
public String getDescription()
IRepositoryService
getDescription
in interface IRepositoryService
public String acceptServletCall(Properties properties, IResourceContext context) throws ResourceException
IRepositoryService
eServiceServlet
to perform some
action.acceptServletCall
in interface IRepositoryService
properties
- TBD: Description of the incoming method parametercontext
- TBD: Description of the incoming method parameterServiceCallException
- Exception raised in failure situationResourceException
- Exception raised in failure situationpublic final void configure(IConfiguration config) throws ConfigurationException
IConfigurable
configure
in interface IConfigurable
config
- the component's configuration data.ConfigurationException
- Exception raised in failure situationpublic final void start() throws StartupException
IStartable
AutoRestartException
was thrown.start
in interface IStartable
StartupException
- If the initialization failed because neccessary
resources could not be allocated.public final void stop()
IStartable
stop
in interface IStartable
public String getName()
IComponentInfo
null
.getName
in interface IComponentInfo
null
.public String getDescription(Locale locale)
IRepositoryService
getDescription
in interface IComponentInfo
getDescription
in interface IRepositoryService
locale
- TBD: Description of the incoming method parameterpublic Properties getProperties()
IComponentInfo
null
.getProperties
in interface IComponentInfo
null
.public final ComponentState getState()
ILifecycleInfo
null
.getState
in interface ILifecycleInfo
null
.public ConfigurationException getLastConfigurationException()
ILifecycleInfo
IConfigurable.configure(IConfiguration)
,
or IReconfigurable.reconfigure(IConfiguration)
. Can be
null
.getLastConfigurationException
in interface ILifecycleInfo
null
.public StartupException getStartupException()
ILifecycleInfo
IStartable.start()
,
Can be null
.getStartupException
in interface ILifecycleInfo
null
.public final Date getCreationDate()
ILifecycleInfo
null
. This property usually makes sense only for components
that implement the IThreadSafe interface.getCreationDate
in interface ILifecycleInfo
null
.public Date getLastReconfigurationDate()
ILifecycleInfo
null
.getLastReconfigurationDate
in interface ILifecycleInfo
null
.public Date getNextAutoRestartDate()
ILifecycleInfo
null
.getNextAutoRestartDate
in interface ILifecycleInfo
null
.AutoRestartException
public final void notify(ComponentEvent event)
IComponentListener
notify
in interface IComponentListener
event
- the component eventComponentEvent.Type
protected void startUpImpl(Collection repositoryManagers) throws ConfigurationException, StartupException, ServiceNotAvailableException
IStartable
interface of the CRT this
method will be called only once. It will be called on systen start up or
when a new instance of this component is added to the configuration.repositoryManagers
- A collection of repository manager instances that
this services is attached to via configuration. Usually a service
implementation will register for certain resource events at the
repository's event broker.ConfigurationException
- Exception raised in failure situationStartupException
- Exception raised in failure situationServiceNotAvailableException
- Exception raised in failure
situationprotected void startUp(Collection repositoryManagers) throws WcmException
shutDownImpl()
.repositoryManagers
- TBD: Description of the incoming method parameterWcmException
- Exception raised in failure situationprotected void shutDownImpl()
IStartable
interface of the CRT this
method will be called only once. It will be called when the component is
removed from the persistent configuration or when the system shuts down.protected void shutDown() throws WcmException
startUpImpl(Collection)
.WcmException
- Exception raised in failure situationprotected void addRepositoryAssignment(IRepositoryManager mgr) throws ServiceNotAvailableException
mgr
- The repository manager instance that this service was assigned
to in configuration.ServiceNotAvailableException
- If the service cannot be assigned
to the repository.protected void removeRepositoryAssignment(IRepositoryManager mgr) throws WcmException
mgr
- TBD: Description of the incoming method parameterWcmException
- Exception raised in failure situationpublic static final Properties convertConfigToProperties(IConfiguration config)
config
- to be converted to propertiesprotected static final Properties convertConfigToProperties(IConfiguration config, String prefix)
config
- to be converted to propertiespublic com.sap.netweaver.km.monitor.data.MonitorData retrieveMonitorData()
retrieveMonitorData
in interface com.sap.netweaver.km.monitor.IMonitorInfoProvider
public static com.sap.netweaver.km.monitor.data.ConfigData convertConfigData(IConfiguration cfg)
cfg
- public static com.sap.netweaver.km.monitor.data.StatusInfo convertStatus(ComponentStateHandler sh)
sh
- public static com.sap.netweaver.km.monitor.data.StructuredData createPropertyList(ComponentStateHandler sh)
sh
- Access Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2018 SAP AG Complete Copyright Notice