public class ServiceTemplates extends java.lang.Object implements ServiceTemplatesTypes
ANY_DIRECTION, PROVIDER, SERVICE_CONSISTENT, SERVICE_NOT_SAME_TYPE, SERVICE_UNCONSISTENT, SERVICE_UNDEFINED, SUBSCRIBER
Constructor and Description |
---|
ServiceTemplates(Module module,
java.net.URL servicesURL,
java.net.URL typesURL)
Constructor.
|
ServiceTemplates(Module module,
java.net.URL servicesURL,
java.net.URL typesURL,
boolean isSilent)
Constructor.
|
ServiceTemplates(Module module,
java.net.URL applicationURL,
java.net.URL servicesURL,
java.net.URL typesURL)
Constructor.
|
ServiceTemplates(Module module,
java.net.URL applicationURL,
java.net.URL servicesURL,
java.net.URL typesURL,
boolean isSilent)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
short |
checkService(ServiceDefinition serviceDef)
Check the compatibility of a service with the stored definition.
|
short |
checkService(ServiceInstance<?,?> service)
Check the compatibility of a service with the stored definition.
|
short |
checkService(ServiceInstance<?,?> service,
boolean isStrict)
Check the compatibility of a service with the stored definition.
|
short |
checkService(ServiceInstance<?,?> service,
short direction)
Check the compatibility of a service with the stored definition.
|
short |
checkService(ServiceInstance<?,?> service,
short direction,
boolean isStrict)
Check the compatibility of a service with the stored definition.
|
java.util.Map<NamespaceKey,InterfaceDefinition> |
getProviderInterfaces()
Return the map of the module declared provider interfaces.
|
java.util.Map<NamespaceKey,ServiceDefinition> |
getServices()
Return the map of declared services.
|
java.util.Map<NamespaceKey,InterfaceDefinition> |
getSubscriberInterfaces()
Return the map of the module declared subscriber interfaces.
|
boolean |
hasDeclaredInterfaces()
Return true if the templates has a definition for provider and subscriber interfaces.
|
boolean |
isSilent()
Return true if the errors should not be redirected.
|
boolean |
isStrictValidation()
Return true if it is allowed to have provided datas in the template which are not found in the definition.
|
void |
logMessages(boolean logMessages)
Set if checking messages are to be logged.
|
void |
setSilent(boolean isSilent)
Set if the errors should not be redirected.
|
void |
setStrictValidation(boolean isStrict)
Set the validation type.
|
public ServiceTemplates(Module module, java.net.URL servicesURL, java.net.URL typesURL)
module
- the moduleservicesURL
- the reference services URLtypesURL
- the reference types URLpublic ServiceTemplates(Module module, java.net.URL applicationURL, java.net.URL servicesURL, java.net.URL typesURL)
module
- the moduleapplicationURL
- the application URLservicesURL
- the services URLtypesURL
- the types URLpublic ServiceTemplates(Module module, java.net.URL servicesURL, java.net.URL typesURL, boolean isSilent)
module
- the moduleservicesURL
- the services URLtypesURL
- the types URLisSilent
- true if the errors should not be redirectedpublic ServiceTemplates(Module module, java.net.URL applicationURL, java.net.URL servicesURL, java.net.URL typesURL, boolean isSilent)
module
- the moduleapplicationURL
- the application URLservicesURL
- the services URLtypesURL
- the types URLisSilent
- true if the errors should not be redirectedpublic void setSilent(boolean isSilent)
isSilent
- true if the errors should not be redirectedpublic boolean isSilent()
public void setStrictValidation(boolean isStrict)
isStrict
- true if it is allowed to have provided datas in the template which are not found in the definitionpublic boolean isStrictValidation()
public void logMessages(boolean logMessages)
logMessages
- true if checking messages are to be loggedpublic java.util.Map<NamespaceKey,ServiceDefinition> getServices()
public boolean hasDeclaredInterfaces()
public java.util.Map<NamespaceKey,InterfaceDefinition> getProviderInterfaces()
public java.util.Map<NamespaceKey,InterfaceDefinition> getSubscriberInterfaces()
public short checkService(ServiceDefinition serviceDef)
ServiceTemplatesTypes.SERVICE_CONSISTENT
: the service exist in the stored definition and has the same definition (datas and their types)ServiceTemplatesTypes.SERVICE_UNDEFINED
: the service does not exist in the stored definitionServiceTemplatesTypes.SERVICE_UNCONSISTENT
: the service exist in the stored definition but has not the same definition (datas and their types)serviceDef
- the Service Definitionpublic short checkService(ServiceInstance<?,?> service, boolean isStrict)
ServiceTemplatesTypes.SERVICE_CONSISTENT
: the service exist in the stored definition and has the same definition (datas and their types)ServiceTemplatesTypes.SERVICE_UNDEFINED
: the service does not exist in the stored definitionServiceTemplatesTypes.SERVICE_UNCONSISTENT
: the service exist in the stored definition but has not the same definition (datas and their types)service
- the serviceisStrict
- true if it is allowed to have provided datas in the template which are not found in the definitionpublic short checkService(ServiceInstance<?,?> service, short direction, boolean isStrict)
ServiceTemplatesTypes.SERVICE_CONSISTENT
: the service exist in the stored definition and has the same definition (datas and their types)ServiceTemplatesTypes.SERVICE_UNDEFINED
: the service does not exist in the stored definitionServiceTemplatesTypes.SERVICE_UNCONSISTENT
: the service exist in the stored definition but has not the same definition (datas and their types)service
- the servicedirection
- the service directionisStrict
- true if it is allowed to have provided datas in the template which are not found in the definitionpublic short checkService(ServiceInstance<?,?> service, short direction)
ServiceTemplatesTypes.SERVICE_CONSISTENT
: the service exist in the stored definition and has the same definition (datas and their types)ServiceTemplatesTypes.SERVICE_UNDEFINED
: the service does not exist in the stored definitionServiceTemplatesTypes.SERVICE_UNCONSISTENT
: the service exist in the stored definition but has not the same definition (datas and their types)service
- the servicedirection
- the service directionpublic short checkService(ServiceInstance<?,?> service)
ServiceTemplatesTypes.SERVICE_CONSISTENT
: the service exist in the stored definition and has the same definition (datas and their types)ServiceTemplatesTypes.SERVICE_UNDEFINED
: the service does not exist in the stored definitionServiceTemplatesTypes.SERVICE_UNCONSISTENT
: the service exist in the stored definition but has not the same definition (datas and their types)service
- the serviceCopyright ©2017-2023 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence