Interface UserServiceDeclaration<S extends EntitySelection,U extends ActivationContext<S>>
-
- Type Parameters:
S- the nature of the service, namely the type of the selection on which the service worksU- the activation context corresponding to the nature of the service
- All Known Subinterfaces:
UserServiceDeclaration.OnAssociation,UserServiceDeclaration.OnAssociationRecord,UserServiceDeclaration.OnDataset,UserServiceDeclaration.OnDataspace,UserServiceDeclaration.OnHierarchy,UserServiceDeclaration.OnHierarchyNode,UserServiceDeclaration.OnRecord,UserServiceDeclaration.OnTableView
public interface UserServiceDeclaration<S extends EntitySelection,U extends ActivationContext<S>>This interface allows to declare a user service. It must not be implemented directly; instead, one of the nested sub-interfaces must be implemented according to the nature of the user service to declare.A user service can be registered and declared either in the context of a data model or in the context of a module.
- Since:
- 5.8.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceUserServiceDeclaration.OnAssociationDeclares a user service that works at an association element level.static interfaceUserServiceDeclaration.OnAssociationRecordDeclares a user service that works on a single associated record.static interfaceUserServiceDeclaration.OnDatasetDeclares a user service that works at the global dataset level.static interfaceUserServiceDeclaration.OnDataspaceDeclares a user service that works at the global dataspace level.static interfaceUserServiceDeclaration.OnHierarchyDeclares a user service that works at the hierarchy level.static interfaceUserServiceDeclaration.OnHierarchyNodeDeclares a user service that works on a single hierarchy node.static interfaceUserServiceDeclaration.OnRecordDeclares a user service that works on a single record.static interfaceUserServiceDeclaration.OnTableViewDeclares a user service that works at the table level, tabular view level and/or record selection level.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default UserService<S>createUserService()Creates a new user service implementation.voiddeclareWebComponent(WebComponentDeclarationContext aContext)Defines the web component properties of the user service, in particular its input and output parameters, and whether it can be available as a perspective action and/or workflow user task.voiddefineActivation(U aContext)Defines the activation scope and rules of the service, namely where and when it is available and can be executed.voiddefineProperties(UserServicePropertiesDefinitionContext aContext)Defines the properties of the user service, in particular its label and description.ServiceKeygetServiceKey()Returns the identifier of the user service.
-
-
-
Method Detail
-
getServiceKey
ServiceKey getServiceKey()
Returns the identifier of the user service.The returned
ServiceKeymust conform to the current declaration context; for example, if the service is being declared in the context of a module its key must contain the current module name.This method is invoked only once, when the user service is registered.
It is generally recommended to define a public Java constant holding the service key.
-
createUserService
default UserService<S> createUserService()
Creates a new user service implementation. It is strongly unadvised to return a user service with no parameter.This method is invoked every time the declared user service must be launched, once all activation controls have been performed.
-
defineActivation
void defineActivation(U aContext)
Defines the activation scope and rules of the service, namely where and when it is available and can be executed.This method is invoked only once, when the user service is registered.
-
defineProperties
void defineProperties(UserServicePropertiesDefinitionContext aContext)
Defines the properties of the user service, in particular its label and description.This method is invoked only once, when the user service is registered.
-
declareWebComponent
void declareWebComponent(WebComponentDeclarationContext aContext)
Defines the web component properties of the user service, in particular its input and output parameters, and whether it can be available as a perspective action and/or workflow user task.This method is invoked only once, when the user service is registered.
-
-