public class ContentFactory extends Object
Modifier and Type | Field and Description |
---|---|
static Level |
DEFAULT_LOG_LEVEL
Default log level for request loggers.
|
Constructor and Description |
---|
ContentFactory() |
Modifier and Type | Method and Description |
---|---|
static OutputContentHelper |
getOutputContentHelper(long requestId)
Gets the helper for creating output content for requests with Standard or Extended request mode.
|
static OutputContentHelper |
getOutputContentHelper(long requestId, RuntimeServiceHandle rsh)
Gets the helper for creating output content for requests with Standard or Extended request mode.
|
static RequestLogger |
getRequestLogger(long requestId)
Gets the request logger for the specified request, which logs to the ESS content store.
|
static RequestOutput |
getRequestOutput(RuntimeServiceHandle rsh, long requestId, ContentType contentType, String contentName)
Retrieves the request output and creates the output content in the ESS content store for the request.
|
public static final Level DEFAULT_LOG_LEVEL
public static RequestLogger getRequestLogger(long requestId) throws RequestNotFoundException, RuntimeServiceException
SystemProperty.REQUEST_LOG_LEVEL
if defined, or else the default level of "INFO".
The name of the content in the ESS content store is requestId.log
.
requestId
- request id to use.RequestNotFoundException
- if the request does not exist.RuntimeServiceException
- in case of any error creating or accessing the log content.public static RequestOutput getRequestOutput(RuntimeServiceHandle rsh, long requestId, ContentType contentType, String contentName) throws RequestNotFoundException, RuntimeServiceException, ValidationException
rsh
- runtime service handle for creating output content.requestId
- request id to use.contentType
- type of output content to create.contentName
- name of the output contentRequestNotFoundException
- if the request does not exist.RuntimeServiceException
- in case of any error creating or accessing the output content.ValidationException
- if the output content already exists and its content type does not match the given content type.public static OutputContentHelper getOutputContentHelper(long requestId) throws RequestNotFoundException, RuntimeServiceException, ValidationException
requestId
- id of the request.RequestNotFoundException
- if the request does not exist.RuntimeServiceException
- if error accessing the runtime store.ValidationException
- if the request mode is neither Standard nor Extended.public static OutputContentHelper getOutputContentHelper(long requestId, RuntimeServiceHandle rsh) throws RequestNotFoundException, RuntimeServiceException, ValidationException
requestId
- id of the request.rsh
- runtime service handle.RequestNotFoundException
- if the request does not exist.RuntimeServiceException
- if error accessing the runtime store.ValidationException
- if the request mode is neither Standard nor Extended.