Interface CoreFactory
create methods on the target interfaces.
The implementation of the factory is loaded via ExtendedServiceLoader and is therefore
pluggable.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CoreFactoryThe instance loaded viaExtendedServiceLoader. -
Method Summary
Modifier and TypeMethodDescriptioncreateCdsRuntimeConfigurer(PropertiesProvider propertiesProvider) The factory method to create a newCdsRuntimeConfigurerwith the given properties.The factory method to create a newChangeSetContextAccessor.The factory method to create a newChangeSetContextSPI.createEventContext(String event, String entityName) The factory method to create a newEventContext.createFeatureTogglesInfo(List<FeatureToggle> featureToggles) Creates aFeatureTogglesInfoobject.createFeatureTogglesInfo(Map<String, Boolean> featureToggles) Creates aFeatureTogglesInfoobject.createMessage(Message.Severity severity, String text) Creates aMessageobject.createMessage(Message.Severity severity, String text, Message message) Creates aMessageobject.createMessage(String text, ServiceException exception) Creates aMessageobject.createMessageLookup(String messageOrKey, Object[] args) Application code should useMessageLookup.create(String, Object[])instead.createMessageTarget(com.sap.cds.ql.cqn.Path path, com.sap.cds.reflect.CdsElement element) Application code should useMessageTarget.create(Path, CdsElement)instead.createMessageTarget(String target) Application code should useMessageTarget.create(String)instead.createMessageTarget(String parameter, com.sap.cds.ql.cqn.CqnReference ref) Application code should useMessageTarget.create(String, CqnReference)instead.<E extends com.sap.cds.ql.StructuredType<E>>
MessageTargetcreateMessageTarget(String parameter, Class<E> type, Function<E, Object> path) Application code should useMessageTarget.create(Class, Function)orMessageTarget.create(String, Class, Function)instead.createMessageTarget(String parameter, Function<com.sap.cds.ql.StructuredType<?>, Object> path) Application code should useMessageTarget.create(Function)orMessageTarget.create(String, Function)instead.createParameterInfo(ParameterInfo parameterInfo) Creates aModifiableParameterInfobased on the passedParameterInfo.The factory method to create a newRequestContextAccessor.createService(String name) The factory method to create a newService.createService(String name, Service delegator) The factory method to create a newServiceExceptionUtils.createUserInfo(UserInfo userInfo) Creates aModifiableUserInfobased on the passedUserInfo.<S extends Service>
Sunboxed(S service) Removes an outbox wrapper from the given service.
-
Field Details
-
INSTANCE
The instance loaded viaExtendedServiceLoader.
-
-
Method Details
-
createEventContext
The factory method to create a newEventContext.Application code should use
EventContext.create(String, String)instead.- Parameters:
event- the name of the evententityName- the name of the entity- Returns:
- the
EventContext
-
createService
The factory method to create a newService.Application code should use
EventContext.create(String, String)instead.- Parameters:
name- the name of the service- Returns:
- the
Service
-
createService
The factory method to create a newServicewith a given delegatorService.This method is intended to be used only by
ServiceDelegator. -
createCdsRuntimeConfigurer
The factory method to create a newCdsRuntimeConfigurerwith the given properties.Application code should use
CdsRuntimeConfigurer.create()orCdsRuntimeConfigurer.create(PropertiesProvider)instead.- Parameters:
propertiesProvider- thePropertiesProvider, may benull, which means a simplePropertiesProviderproviding defaultCdsPropertiesis used- Returns:
- the
CdsRuntimeConfigurer
-
createRequestContextAccessor
RequestContextAccessor createRequestContextAccessor()The factory method to create a newRequestContextAccessor.This method is intended to be used only by
RequestContext.- Returns:
- the
RequestContextAccessor
-
createChangeSetContextAccessor
ChangeSetContextAccessor createChangeSetContextAccessor()The factory method to create a newChangeSetContextAccessor.This method is intended to be used only by
ChangeSetContext.- Returns:
- the
ChangeSetContextAccessor
-
createChangeSetContextSPI
ChangeSetContextSPI createChangeSetContextSPI()The factory method to create a newChangeSetContextSPI.Application code should use
ChangeSetContextSPI.open()instead.- Returns:
- the
ChangeSetContextSPI
-
createParameterInfo
Creates aModifiableParameterInfobased on the passedParameterInfo. IfparameterInfoisnull, aModifiableParameterInfobased on default values of a clearParameterInfois returned.Application code should use
ParameterInfo.create()orParameterInfo.copy()instead.- Parameters:
parameterInfo- TheParameterInfoas basis.- Returns:
- The created
ModifiableParameterInfoinstance.
-
createUserInfo
Creates aModifiableUserInfobased on the passedUserInfo. IfuserInfoisnull, aModifiableUserInfobased on default values of a clearUserInfois returned.Application code should use
UserInfo.create()orUserInfo.copy()instead.- Parameters:
userInfo- TheUserInfoas basis.- Returns:
- The created
ModifiableUserInfoinstance.
-
createFeatureTogglesInfo
Creates aFeatureTogglesInfoobject.Application code should use
FeatureTogglesInfo.create(List)instead.- Parameters:
featureToggles- AListof feature toggles- Returns:
- A
FeatureTogglesInfoobject containing all provided feature toggles in the stream
-
createFeatureTogglesInfo
Creates aFeatureTogglesInfoobject.Application code should use
FeatureTogglesInfo.create(Map)instead.- Parameters:
featureToggles- AMapwhere the key is the feature name and the value indicates if the feature is enable or not- Returns:
- A
FeatureTogglesInfoobject containing the feature toggles created from the map entries
-
createServiceExceptionUtils
ServiceExceptionUtils createServiceExceptionUtils()The factory method to create a newServiceExceptionUtils.This method is intended to be used only by
ServiceException.- Returns:
- the
ServiceExceptionUtils
-
createMessage
Creates aMessageobject.Application code should use
Message.create(Severity, String)instead.- Parameters:
severity- theMessage.Severityof theMessagetext- the final text of the message- Returns:
- the
Message
-
createMessage
Creates aMessageobject.Application code should use
Message.create(String, ServiceException)instead.- Parameters:
text- the final text of the messageexception- theServiceExceptionto copy optional arguments from- Returns:
- the
Message
-
createMessage
Creates aMessageobject.Application code should use
Message.create(Severity, String, Message)instead.- Parameters:
severity- theMessage.Severityof theMessagetext- the final text of the messagemessage- theMessage- Returns:
- the
Message
-
createMessageTarget
Application code should useMessageTarget.create(String)instead.- Parameters:
target-- Returns:
-
createMessageTarget
MessageTarget createMessageTarget(String parameter, Function<com.sap.cds.ql.StructuredType<?>, Object> path) Application code should useMessageTarget.create(Function)orMessageTarget.create(String, Function)instead.- Parameters:
parameter-path-- Returns:
-
createMessageTarget
<E extends com.sap.cds.ql.StructuredType<E>> MessageTarget createMessageTarget(String parameter, Class<E> type, Function<E, Object> path) Application code should useMessageTarget.create(Class, Function)orMessageTarget.create(String, Class, Function)instead.- Type Parameters:
E-- Parameters:
parameter-type-path-- Returns:
-
createMessageTarget
MessageTarget createMessageTarget(com.sap.cds.ql.cqn.Path path, com.sap.cds.reflect.CdsElement element) Application code should useMessageTarget.create(Path, CdsElement)instead.- Parameters:
path-element-- Returns:
-
createMessageTarget
Application code should useMessageTarget.create(String, CqnReference)instead.- Parameters:
parameter-ref-- Returns:
-
createMessageLookup
Application code should useMessageLookup.create(String, Object[])instead.- Parameters:
messageOrKey-args-- Returns:
-
unboxed
Removes an outbox wrapper from the given service.Application code should use
OutboxService.unboxed(Service)instead.- Type Parameters:
S- the type of service- Parameters:
service- the service to unwrap from outbox wrapping- Returns:
- the underlying service of the outbox wrapped service.
-