@StableMinor(version="12.5", sinceVersion="4.0") public class DouiService extends GenericService implements IDouiService, IHyperLinkResolver
serviceConfig
Constructor and Description |
---|
DouiService() |
Modifier and Type | Method and Description |
---|---|
void |
addDefaultDouiDefinitionValues(SessionConfig sessionConfig,
ServiceConfig serviceConfig,
Node douiDefinitionNode,
ITransaction transaction) |
void |
autoAddDependencies(SessionConfig sessionConfig,
ServiceInstanceConfig config,
ITransaction transaction)
Adds service specific dependencies.
|
Element |
getDefaultServiceInstanceMenu(ServiceInstanceConfig serviceInstance)
Returns the default service instance menu definition to use for a service instance.
|
protected String |
getResourceClassName() |
boolean |
hasHtmlField(ITransaction transaction)
Indicates if this service has an html field.
|
void |
instanceAdded(SessionConfig sessionConfig,
ServiceInstanceConfig config,
ITransaction transaction)
Called by the service container to indicate that a service instance has
been added.
|
void |
instanceDeleted(SessionConfig sessionConfig,
ServiceInstanceConfig config,
ITransaction transaction)
Called by the service container to indicate that a service instance is
about to be deleted.
|
void |
instanceDeserialized(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext)
Called after an service instance is deserialized.
|
void |
postRegister(SessionConfig sessionConfig,
ServiceConfig serviceConfig,
ITransaction transaction)
Called by the service manager after a service definition is registered.
|
void |
preUnregister(SessionConfig sessionConfig,
ITransaction transaction)
Called by the service manager when a service is about to be unregistered.
|
IServiceInterfaceUrl |
resolveHyperLink(SessionConfig sessionConfig,
HyperLinkConfig hyperLinkConfig,
ITransaction transaction)
Resolves an hyperlink to the corresponding URL.
|
protected Response |
restCallProcessAction(String interfaceSimpleId,
String restShortName,
String lumActionId,
UriInfo uriInfo)
Process action call API.
This method is intended to be used typically, but not limited to, from the browser, for those who want to execute a given process action. Before call this API, user must already have performed any required authentication. The default implementation will return: 307 redirect to the URL that will perform the process action. Bad request (400) if there's something wrong with the request. Forbidden (403) if user has no permission to perform the given request. Internal server error (500) if something went wrong during the processing. In the default implementation, this method is called by both restDoProcessAction(String, String, String, UriInfo, HttpServletRequest) and
restDoProcessActionWithActionId(String, String, String, UriInfo, HttpServletRequest) . |
Response |
restDoProcessAction(String interfaceSimpleId,
String restShortName,
String lumActionId,
UriInfo uriInfo,
HttpServletRequest request)
Process action call API.
This method is intended to be used typically, but not limited to, from the browser, for those who want to execute a given process action. Before call this API, user must already have performed any required authentication. The default implementation will return: 307 redirect to the URL that will perform the process action. Bad request (400) if there's something wrong with the request. Forbidden (403) if user has no permission to perform the given request. Internal server error (500) if something went wrong during the processing. To override the default behavior, override the method restCallProcessAction(String, String, String, UriInfo) . |
Response |
restDoProcessActionWithActionId(String interfaceSimpleId,
String restShortName,
String lumActionId,
UriInfo uriInfo,
HttpServletRequest request)
Process action call API.
This method is intended to be used typically, but not limited to, from the browser, for those who want to execute a given process action. Before call this API, user must already have performed any required authentication. The default implementation will return: 307 redirect to the URL that will perform the process action. Bad request (400) if there's something wrong with the request. Forbidden (403) if user has no permission to perform the given request. Internal server error (500) if something went wrong during the processing. To override the default behavior, override the method restCallProcessAction(String, String, String, UriInfo) . |
Response |
restGetProcessActionRestHelp(String interfaceSimpleId,
String restShortName,
HttpServletRequest req,
HttpServletResponse resp)
Returns the help for the process action call of the given service interface in the given service instance (given in form of rest short name).
In the default implementation, this method will find all data controls of the requested interface and will write as an HTML response
the parameters described by IDataControl.getRequestHelpDefinition() . |
Response |
restLumGetDataGet(String restShortName,
String restInterfaceName,
HttpServletRequest servletRequest)
Sub-resource to treats request on GET HTTP method.
|
Response |
restLumGetDataPost(String restShortName,
String restInterfaceName,
HttpServletRequest servletRequest)
Sub-resource to treats request on POST HTTP method.
|
protected void |
setDataTypeAttributes(Node douiDefinitionNode,
ITransaction transaction)
Replace number data type for integer data type, for backward compatibility.
|
protected void |
setDisplayAttributes(Node douiDefinitionNode,
ITransaction transaction) |
protected void |
setIncludeAlwaysAttributes(Node douiDefinitionNode,
ITransaction transaction) |
protected void |
setLookupAttributes(Node douiDefinitionNode,
ITransaction transaction) |
protected void |
setPositionAttributes(Node douiDefinitionNode,
ITransaction transaction)
Sets default attribute values for position field.
|
protected void |
setPriorityOptions(Node douiDefinitionNode,
ITransaction transaction) |
protected void |
setSourceFieldAttributes(SessionConfig sessionConfig,
ServiceConfig serviceConfig,
Node douiDefinitionNode,
ITransaction transaction) |
protected void |
setValidationAttributes(Node douiDefinitionNode,
ITransaction transaction) |
boolean |
usesDocumentService(ITransaction transaction)
Indicates if this service uses a document service (as repository, for example).
|
boolean |
usesFileManager(ITransaction transaction)
Indicates if this service uses the
FileManager file storage API. |
boolean |
usesImageService(ITransaction transaction)
Deprecated.
|
boolean |
usesMediaRepository(ITransaction transaction)
Indicates if this service may use a media repository.
|
boolean |
usesWidgetRepository(ITransaction transaction)
Indicates if this service uses a widget repository.
|
deserializeContent, instanceDeserialized, instanceLoaded, instanceMoved, instanceMoved, instanceSerialized, instanceSerialized, instanceUnloaded, load, postUnregister, preRegister, unload
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkFileAccess, deserializeContent, instanceDeserialized, instanceLoaded, instanceMoved, instanceMoved, instanceMoved, instanceSerialized, instanceSerialized, instanceUnloaded, load, postUnregister, preRegister, unload
@Path(value="/lumgetdata/{restInterfaceName}") @POST @Produces(value={"application/json","application/xml"}) public final Response restLumGetDataPost(@PathParam(value="restShortName") String restShortName, @PathParam(value="restInterfaceName") String restInterfaceName, @Context HttpServletRequest servletRequest)
restShortName
- instance of service target that the information will be
loaded.restInterfaceName
- name of the rest interface that will be loaded,
optionally including an extension (.json or .xml) used to choose the response format.servletRequest
- request object that contains all information that was sent by user.@Path(value="/lumgetdata/{restInterfaceName}") @GET @Produces(value={"application/json","application/xml"}) public final Response restLumGetDataGet(@PathParam(value="restShortName") String restShortName, @PathParam(value="restInterfaceName") String restInterfaceName, @Context HttpServletRequest servletRequest)
restShortName
- instance of service target that the information will be
loaded.restInterfaceName
- name of the rest interface that will be loaded,
optionally including an extension (.json or .xml) used to choose the response format.servletRequest
- request object that contains all information that was sent by user.@Path(value="/lumPA/{interfaceSimpleId: [a-zA-Z][\\w]*}.json") @POST public final Response restDoProcessAction(@PathParam(value="interfaceSimpleId") String interfaceSimpleId, @PathParam(value="restShortName") String restShortName, @QueryParam(value="lumActionId") String lumActionId, @Context UriInfo uriInfo, @Context HttpServletRequest request)
restCallProcessAction(String, String, String, UriInfo)
.interfaceSimpleId
- The target interface simple identifier. It is the part after the last '.' character of
interface identifier.restShortName
- The target service instance's rest short name.lumActionId
- the target process action identifier.uriInfo
- the URI information about the request.request
- the request.Response
to be sent to the client.@Path(value="/lumPA/{interfaceSimpleId: [a-zA-Z][\\w]*}/{lumActionId: [a-zA-Z][\\w]*}.json") @POST public final Response restDoProcessActionWithActionId(@PathParam(value="interfaceSimpleId") String interfaceSimpleId, @PathParam(value="restShortName") String restShortName, @PathParam(value="lumActionId") String lumActionId, @Context UriInfo uriInfo, @Context HttpServletRequest request)
restCallProcessAction(String, String, String, UriInfo)
.interfaceSimpleId
- The target interface simple identifier. It is the part after the last '.' character of
interface identifier.restShortName
- The target service instance's rest short name.lumActionId
- the target process action identifier.uriInfo
- the URI information about the request.request
- the request.Response
to be sent to the client.protected Response restCallProcessAction(String interfaceSimpleId, String restShortName, String lumActionId, UriInfo uriInfo)
restDoProcessAction(String, String, String, UriInfo, HttpServletRequest)
and
restDoProcessActionWithActionId(String, String, String, UriInfo, HttpServletRequest)
.interfaceSimpleId
- The target interface simple identifier. It is the part after the last '.' character of
interface identifier.restShortName
- The target service instance's rest short name.lumActionId
- the target process action identifier.uriInfo
- the URI information about the request.Response
to be sent to the client.@Path(value="/lumPA/{interfaceSimpleId: [a-zA-Z][\\w]*}/help") @GET public Response restGetProcessActionRestHelp(@PathParam(value="interfaceSimpleId") String interfaceSimpleId, @PathParam(value="restShortName") String restShortName, @Context HttpServletRequest req, @Context HttpServletResponse resp) throws Exception
data controls
of the requested interface and will write as an HTML response
the parameters described by IDataControl.getRequestHelpDefinition()
.
The default implementation will return:interfaceSimpleId
- The target interface simple identifier. It is the part after the last '.' character of interface identifier.restShortName
- The target service instance's rest short name.req
- The Servlet request.resp
- The Servlet response.Exception
public void preUnregister(SessionConfig sessionConfig, ITransaction transaction) throws PortalException
IService
preUnregister
in interface IService
preUnregister
in class GenericService
sessionConfig
- the user session information.transaction
- transaction for persistence access.PortalException
public void postRegister(SessionConfig sessionConfig, ServiceConfig serviceConfig, ITransaction transaction) throws PortalException
IService
postRegister
in interface IService
postRegister
in class GenericService
PortalException
protected String getResourceClassName()
getResourceClassName
in class GenericService
public boolean usesFileManager(ITransaction transaction) throws PortalException
IDouiService
FileManager
file storage API.usesFileManager
in interface IDouiService
transaction
- the transaction for persistence access.PortalException
@Deprecated public boolean usesImageService(ITransaction transaction) throws PortalException
IDouiService
usesImageService
in interface IDouiService
transaction
- the transaction for persistence access.PortalException
public boolean usesMediaRepository(ITransaction transaction) throws PortalException
IDouiService
usesMediaRepository
in interface IDouiService
transaction
- the transaction for persistence access.true
if this service may use a media service, false
otherwise.PortalException
public boolean usesDocumentService(ITransaction transaction) throws PortalException
IDouiService
usesDocumentService
in interface IDouiService
transaction
- the transaction for persistence access.PortalException
public boolean usesWidgetRepository(ITransaction transaction) throws PortalException
IDouiService
usesWidgetRepository
in interface IDouiService
transaction
- the transaction for persistence access.PortalException
public boolean hasHtmlField(ITransaction transaction) throws PortalException
IDouiService
hasHtmlField
in interface IDouiService
transaction
- the transaction for persistence access.PortalException
public Element getDefaultServiceInstanceMenu(ServiceInstanceConfig serviceInstance) throws PortalException
IService
This default is used if this service does not have a explicit menu definition in its
servicedefinition.xml
.
getDefaultServiceInstanceMenu
in interface IService
getDefaultServiceInstanceMenu
in class GenericService
serviceInstance
- the service instance.PortalException
- if the menu could not be generated.public void instanceAdded(SessionConfig sessionConfig, ServiceInstanceConfig config, ITransaction transaction) throws ServiceException, PortalException
IService
IService.autoAddDependencies(lumis.portal.authentication.SessionConfig, lumis.portal.serviceinstance.ServiceInstanceConfig, lumis.util.ITransaction)
method.instanceAdded
in interface IService
instanceAdded
in class GenericService
config
- a ServiceInstanceConfig
object containing the
service's configurationServiceException
PortalException
public void instanceDeserialized(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext) throws PortalException
IService
instanceDeserialized
in interface IService
instanceDeserialized
in class GenericService
PortalException
public void instanceDeleted(SessionConfig sessionConfig, ServiceInstanceConfig config, ITransaction transaction) throws PortalException
IService
instanceDeleted
in interface IService
instanceDeleted
in class GenericService
config
- a ServiceInstanceConfig
object containing the
service's configurationServiceException
PortalException
public void addDefaultDouiDefinitionValues(SessionConfig sessionConfig, ServiceConfig serviceConfig, Node douiDefinitionNode, ITransaction transaction) throws PortalException
addDefaultDouiDefinitionValues
in interface IDouiService
PortalException
protected void setSourceFieldAttributes(SessionConfig sessionConfig, ServiceConfig serviceConfig, Node douiDefinitionNode, ITransaction transaction) throws PortalException
PortalException
protected void setDataTypeAttributes(Node douiDefinitionNode, ITransaction transaction) throws PortalException
douiDefinitionNode
- the doui definition to adjust.transaction
- the transaction for persistence access.PortalException
protected void setPositionAttributes(Node douiDefinitionNode, ITransaction transaction) throws PortalException
douiDefinitionNode
- the douidefinition xml node.transaction
- the transaction for persistence access.PortalException
protected void setPriorityOptions(Node douiDefinitionNode, ITransaction transaction) throws PortalException
PortalException
protected void setIncludeAlwaysAttributes(Node douiDefinitionNode, ITransaction transaction) throws PortalException
PortalException
protected void setDisplayAttributes(Node douiDefinitionNode, ITransaction transaction) throws PortalException
PortalException
protected void setLookupAttributes(Node douiDefinitionNode, ITransaction transaction) throws PortalException
PortalException
protected void setValidationAttributes(Node douiDefinitionNode, ITransaction transaction) throws PortalException
PortalException
public void autoAddDependencies(SessionConfig sessionConfig, ServiceInstanceConfig config, ITransaction transaction) throws ServiceException, PortalException
IService
autoAddDependencies
in interface IService
autoAddDependencies
in class GenericService
ServiceException
PortalException
public IServiceInterfaceUrl resolveHyperLink(SessionConfig sessionConfig, HyperLinkConfig hyperLinkConfig, ITransaction transaction) throws PortalException
DouiService delegates this resolution to a DouiHyperLinkResolver
.
resolveHyperLink
in interface IHyperLinkResolver
sessionConfig
- the user session information.hyperLinkConfig
- hyperlink informationtransaction
- the transaction for persistence access.PortalException
LumisXP 12.5.0.200928 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.