com.ibm.ecm.extension
Class PluginService
- java.lang.Object
- com.ibm.ecm.extension.PluginService
- public abstract class PluginService
- extends java.lang.Object
Services are invoked from the JavaScript functions that are defined for the plug-in by using the
ecm.model.Request.invokePluginService
function.
Constructor Summary
Constructor and Description |
---|
PluginService()
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
execute(PluginServiceCallbacks callbacks,javax.servlet.http.HttpServletRequest request,javax.servlet.http.HttpServletResponse response)
Performs the action of this service.
|
|
getId()
Returns the unique identifier for this service.
|
|
getOverriddenService()
Deprecated. This method is not used. To override a service, use a request filter, returning the alternate JSON response.
|
|
isSecureService(javax.servlet.http.HttpServletRequest request)
Check if secure service is enabled.
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail
PluginService
- public PluginService()
Method Detail
getId
- public abstract java.lang.String getId( )
Returns:
A
String
that is used to identify the service. getOverriddenService
- public java.lang.String getOverriddenService( )
Deprecated. This method is not used. To override a service, use a request filter, returning the alternate JSON response.
Returns the name of the IBM Content Navigator service that this service overrides. If this service does not
override an IBM Content Navigator service, this method returns
null
.
execute
- public abstract void execute(PluginServiceCallbacks callbacks,
- javax.servlet.http.HttpServletRequest request,
- javax.servlet.http.HttpServletResponse response)
- throws java.lang.Exception
Performs the action of this service.
Parameters:
callbacks
- An instance of the PluginServiceCallbacks
class that contains several functions that can
be used by the service. These functions provide access to the plug-in configuration and content server
APIs. request
- The HttpServletRequest
object that provides the request. The service can access the
invocation parameters from the request. response
- The HttpServletResponse
object that is generated by the service. The service can get the
output stream and write the response. The response must be in JSON format. Throws:
java.lang.Exception
- For exceptions that occur when the service is running. If the logging level is high enough to log
errors, information about the exception is logged by IBM Content Navigator. isSecureService
- public boolean isSecureService( javax.servlet.http.HttpServletRequest request)
Check if secure service is enabled. Implemented plug-in services can override this setting.
Returns:
true if enabled, otherwise, false
Important: This identifier is used in URLs so it must contain only alphanumeric characters.