Class AASServerComponent
java.lang.Object
de.iip_ecosphere.platform.support.aas.basyx1_5.basyx.AASServerComponent
- All Implemented Interfaces:
org.eclipse.basyx.components.IComponent
Component providing an empty AAS server that is able to receive AAS/SMs from
remote. It uses the Aggregator API, i.e. AAS should be pushed to
${URL}/shells
Taken over from BaSyx for customization.
- Author:
- schnicke, espen, fried, fischer, danish, wege
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<Collection<org.eclipse.basyx.aas.bundle.AASBundle>> private org.eclipse.basyx.components.aas.configuration.BaSyxAASServerConfigurationprivate List<org.eclipse.basyx.components.aas.aascomponent.IAASServerFeature> private static final Stringprivate static final Stringprivate static final Stringprivate org.eclipse.basyx.aas.aggregator.api.IAASAggregatorprivate de.iip_ecosphere.platform.support.aas.SetupSpec.AasComponentprivate org.eclipse.basyx.components.configuration.BaSyxContextConfigurationprivate booleanprivate static de.iip_ecosphere.platform.support.logging.Loggerprivate org.eclipse.basyx.components.configuration.BaSyxMongoDBConfigurationprivate static final Stringprivate org.eclipse.basyx.aas.registration.api.IAASRegistryprivate org.eclipse.basyx.components.configuration.BaSyxSecurityConfigurationprivate BaSyxHTTPServerprivate de.iip_ecosphere.platform.support.aas.SetupSpec -
Constructor Summary
ConstructorsConstructorDescriptionAASServerComponent(org.eclipse.basyx.components.configuration.BaSyxContextConfiguration contextConfig, de.iip_ecosphere.platform.support.aas.SetupSpec spec, de.iip_ecosphere.platform.support.aas.SetupSpec.AasComponent component) Constructs an empty AAS server using the passed context.AASServerComponent(org.eclipse.basyx.components.configuration.BaSyxContextConfiguration contextConfig, de.iip_ecosphere.platform.support.aas.SetupSpec spec, de.iip_ecosphere.platform.support.aas.SetupSpec.AasComponent component, org.eclipse.basyx.components.aas.configuration.BaSyxAASServerConfiguration aasConfig) Constructs an empty AAS server using the passed configuration.AASServerComponent(org.eclipse.basyx.components.configuration.BaSyxContextConfiguration contextConfig, de.iip_ecosphere.platform.support.aas.SetupSpec spec, de.iip_ecosphere.platform.support.aas.SetupSpec.AasComponent component, org.eclipse.basyx.components.aas.configuration.BaSyxAASServerConfiguration aasConfig, org.eclipse.basyx.components.configuration.BaSyxMongoDBConfiguration mongoDBConfig) Constructs an empty AAS server using the passed configuration. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAASServerFeature(org.eclipse.basyx.components.aas.aascomponent.IAASServerFeature aasServerFeature) Adds an AAS server feature.private voidaddAASServerFeaturesToContext(org.eclipse.basyx.vab.protocol.http.server.BaSyxContext context) Adds AAS server features tocontext.private voidaddAasxFilesResourceServlet(org.eclipse.basyx.vab.protocol.http.server.BaSyxContext context) Adds an AASX files resource servlet.private voidCleans up AAS server features.private voidConfigures the MQTT feature.private voidConfigures security.private org.eclipse.basyx.aas.aggregator.api.IAASAggregatorCreates the AAS aggregator.private List<org.eclipse.basyx.components.aas.aascomponent.IAASServerDecorator> Creates an AAS server decorator list.private org.eclipse.basyx.vab.protocol.http.server.VABHTTPInterface<?> Creates the aggregator servlet.private voidCreates a resource directory if it does not exist.private org.apache.catalina.ContextcreateChildContextForAasxResourceFiles(String childContextPath, String childDocbasePath) Creates a child context for AASX resource files.private org.apache.catalina.servlets.DefaultServletCreates the default servlet.private org.eclipse.basyx.components.configuration.BaSyxMongoDBConfigurationCreates a mongo DB configuration.private org.eclipse.basyx.aas.registration.api.IAASRegistrycreateRegistryFromConfig(org.eclipse.basyx.components.aas.configuration.BaSyxAASServerConfiguration aasConfig) Only creates the registry, if it hasn't been set explicitly before.private voidderegisterAAS(org.eclipse.basyx.submodel.metamodel.api.identifier.IIdentifier aasIdentifier) Deregisters an AAS.private voidderegisterAASAndAccompanyingSM(org.eclipse.basyx.aas.metamodel.api.IAssetAdministrationShell aas) Deregisters AAS and SM.private voidDeregisters AAS and SSM during runtime.private voidderegisterSubmodel(org.eclipse.basyx.submodel.metamodel.api.identifier.IIdentifier aasIdentifier, org.eclipse.basyx.aas.metamodel.map.descriptor.SubmodelDescriptor submodelDescriptor) Deregisters a submodel.voidDeprecated.remove MQTT from the feature list instead.voidEnables AASX upload functionality.voidenableMQTT(org.eclipse.basyx.components.configuration.BaSyxMqttConfiguration configuration) Deprecated.Add MQTT viaMqttAASServerFeatureinstead.private org.eclipse.basyx.aas.metamodel.map.descriptor.SubmodelDescriptorfindSMDescriptor(String smId, Collection<org.eclipse.basyx.aas.metamodel.map.descriptor.SubmodelDescriptor> smDescriptors) Finds a SM descriptor.private StringgetAASAccessPath(org.eclipse.basyx.aas.metamodel.api.IAssetAdministrationShell aas) Returns the AAS access path.private StringgetAASIdFromSMId(org.eclipse.basyx.submodel.metamodel.api.identifier.IIdentifier smId) Returns the AAS id from a submodel.private StringgetAASXFileSubPath(int aasxIndex) Returns the AASX file sub path.private org.eclipse.basyx.components.aas.authorization.internal.AuthorizedDefaultServletParams<?> Gets authorized servlet params.private StringReturns the external URL.private Collection<org.eclipse.basyx.aas.bundle.AASBundle> Returns the flat AAS bundles.private StringReturns the internal URL.private StringReturns the MQTT AAS client id.private StringReturns the MQTT submodel client id.private StringgetRootFilePathWithContext(String contextPath) Returns the root file path with context.private StringgetSMEndpoint(org.eclipse.basyx.submodel.metamodel.api.identifier.IIdentifier smId) Returns the SM endpoint for the given SM id.private StringgetSMIdShortFromSMId(org.eclipse.basyx.submodel.metamodel.api.identifier.IIdentifier smId) Returns an SM idShort from an sm identifier.private org.eclipse.basyx.submodel.metamodel.api.ISubmodelgetSubmodel(Object submodelObject) Casts the submodel insubmodelObject.private List<org.eclipse.basyx.aas.metamodel.map.descriptor.SubmodelDescriptor> getSubmodelDescriptors(org.eclipse.basyx.submodel.metamodel.api.identifier.IIdentifier aasIdentifier) Returns the submodel descriptors for the given AAS.private List<org.eclipse.basyx.submodel.metamodel.api.ISubmodel> getSubmodelFromAggregator(org.eclipse.basyx.aas.aggregator.api.IAASAggregator aggregator, org.eclipse.basyx.submodel.metamodel.api.identifier.IIdentifier iIdentifier) Gets submodels from aggregator.getURL()Retrieves the URL on which the component is providing its HTTP server.private voidinitializeAasBundles(org.eclipse.basyx.vab.protocol.http.server.BaSyxContext context) Initializes the AAS bundles.private voidInitializes up AAS server features.private booleanReturns whether auto register is enabled.private booleanReturns whether AAS eventing is enabled.private booleanReturns whether external path is configured.private booleanAre we running a mongo DB backend?private booleanReturns whether the registry is configured.private booleanReturns whether the registration white list is configured.private voidLoads the AAS bundles.private List<Collection<org.eclipse.basyx.aas.bundle.AASBundle>> loadAASFromSource(List<String> aasSources) Loads AAS from source.private voidLoads AAS server features from config.private static Set<org.eclipse.basyx.aas.bundle.AASBundle> loadBundleFromAASX(String aasxPath, String childFilePath) Loads a bundle from AASX.private Set<org.eclipse.basyx.aas.bundle.AASBundle> loadBundleFromFile(String aasSource, String childFilePath) Loads an AAS source as bundle from a file.private Set<org.eclipse.basyx.aas.bundle.AASBundle> loadBundleFromJSON(String jsonPath) Loads a bundle from JSON.private Set<org.eclipse.basyx.aas.bundle.AASBundle> loadBundleFromXML(String xmlPath) Loads a bundle from XML.private StringloadBundleString(String filePath) Loads a bundle as string.private voidmodifyFilePaths(String hostName, int port, String rootPath) Fixes the File submodel element value paths according to the given endpoint configuration.private voidmodifyFilePathsInBundleSet(Collection<org.eclipse.basyx.aas.bundle.AASBundle> bundleSet, String hostName, int port, String bundleFileRootPath) Modifies the file paths in bundle set.private voidregisterAAS(org.eclipse.basyx.aas.metamodel.api.IAssetAdministrationShell aas) Registers AAS.private voidregisterAASAndSubmodels(org.eclipse.basyx.aas.metamodel.api.IAssetAdministrationShell aas) Registers AAS and submodels.private voidRegisters pre-existing AAS and SM if possible.private voidregisterSubmodel(org.eclipse.basyx.aas.metamodel.api.IAssetAdministrationShell aas, org.eclipse.basyx.submodel.metamodel.api.ISubmodel submodel) Registers the given submodel.private voidregisterSubmodels(org.eclipse.basyx.aas.metamodel.api.IAssetAdministrationShell aas) Registers the submodels ofaas.private voidRegisters submodels from a whitelist.private voidRegisters whitelisted submodels.voidsetAASBundle(org.eclipse.basyx.aas.bundle.AASBundle aasBundle) Explicitly sets an AAS bundle that should be loaded during startup.voidsetAASBundles(Collection<org.eclipse.basyx.aas.bundle.AASBundle> aasBundles) Explicitly sets AAS bundles that should be loaded during startup.voidsetRegistry(org.eclipse.basyx.aas.registration.api.IAASRegistry registry) Sets a registry service for registering AAS that are created during startup.voidsetSecurityConfiguration(org.eclipse.basyx.components.configuration.BaSyxSecurityConfiguration configuration) Sets the security configuration for this component.private booleanReturns whether it should register pre-existing AAS and SM if possible.private booleanshouldUseSecuredRegistryConnection(org.eclipse.basyx.components.aas.configuration.BaSyxAASServerConfiguration aasConfig) Returns whether we should use a secured registry connection.voidStarts the AASX component at http://${hostName}:${port}/${path}.voidprivate voidupdateSMEndpoint(String smId, List<org.eclipse.basyx.aas.metamodel.map.descriptor.AASDescriptor> descriptors) Updates a SM endpoint.private voidupdateSMEndpoint(org.eclipse.basyx.aas.metamodel.map.descriptor.SubmodelDescriptor smDescriptor) Updates a SM endpoint.
-
Field Details
-
PREFIX_SUBMODEL_PATH
- See Also:
-
AASX_RES_FILE_CONTEXT_PATH
- See Also:
-
AASX_RES_FILE_DOCBASE_PATH
-
AASX_RES_FILE_SERVLET_MAPPING_PATTERN
- See Also:
-
logger
private static de.iip_ecosphere.platform.support.logging.Logger logger -
aasBundles
-
server
-
registry
private org.eclipse.basyx.aas.registration.api.IAASRegistry registry -
contextConfig
private org.eclipse.basyx.components.configuration.BaSyxContextConfiguration contextConfig -
aasConfig
private org.eclipse.basyx.components.aas.configuration.BaSyxAASServerConfiguration aasConfig -
mongoDBConfig
private org.eclipse.basyx.components.configuration.BaSyxMongoDBConfiguration mongoDBConfig -
securityConfig
private org.eclipse.basyx.components.configuration.BaSyxSecurityConfiguration securityConfig -
aasServerFeatureList
-
aggregator
private org.eclipse.basyx.aas.aggregator.api.IAASAggregator aggregator -
isAASXUploadEnabled
private boolean isAASXUploadEnabled -
spec
private de.iip_ecosphere.platform.support.aas.SetupSpec spec -
component
private de.iip_ecosphere.platform.support.aas.SetupSpec.AasComponent component
-
-
Constructor Details
-
AASServerComponent
public AASServerComponent(org.eclipse.basyx.components.configuration.BaSyxContextConfiguration contextConfig, de.iip_ecosphere.platform.support.aas.SetupSpec spec, de.iip_ecosphere.platform.support.aas.SetupSpec.AasComponent component) Constructs an empty AAS server using the passed context.- Parameters:
contextConfig- the AAS context configurationspec- the setup specificationcomponent- the component being configured
-
AASServerComponent
public AASServerComponent(org.eclipse.basyx.components.configuration.BaSyxContextConfiguration contextConfig, de.iip_ecosphere.platform.support.aas.SetupSpec spec, de.iip_ecosphere.platform.support.aas.SetupSpec.AasComponent component, org.eclipse.basyx.components.aas.configuration.BaSyxAASServerConfiguration aasConfig) Constructs an empty AAS server using the passed configuration.- Parameters:
contextConfig- the AAS context configurationspec- the setup specificationcomponent- the component being configuredaasConfig- the aAS server configuration
-
AASServerComponent
public AASServerComponent(org.eclipse.basyx.components.configuration.BaSyxContextConfiguration contextConfig, de.iip_ecosphere.platform.support.aas.SetupSpec spec, de.iip_ecosphere.platform.support.aas.SetupSpec.AasComponent component, org.eclipse.basyx.components.aas.configuration.BaSyxAASServerConfiguration aasConfig, org.eclipse.basyx.components.configuration.BaSyxMongoDBConfiguration mongoDBConfig) Constructs an empty AAS server using the passed configuration.- Parameters:
contextConfig- the AAS context configurationspec- the setup specificationcomponent- the component being configuredaasConfig- the aAS server configurationmongoDBConfig- the mongo DB configuration
-
-
Method Details
-
enableMQTT
@Deprecated public void enableMQTT(org.eclipse.basyx.components.configuration.BaSyxMqttConfiguration configuration) Deprecated.Add MQTT viaMqttAASServerFeatureinstead.Sets and enables mqtt connection configuration for this component. Has to be called before the component is started. Currently only works for InMemory backend.- Parameters:
configuration-
-
disableMQTT
Deprecated.remove MQTT from the feature list instead.Disables mqtt configuration. Has to be called before the component is started. -
enableAASXUpload
public void enableAASXUpload()Enables AASX upload functionality. -
setRegistry
public void setRegistry(org.eclipse.basyx.aas.registration.api.IAASRegistry registry) Sets a registry service for registering AAS that are created during startup.- Parameters:
registry- the registry
-
setAASBundles
Explicitly sets AAS bundles that should be loaded during startup.- Parameters:
aasBundles- The bundles that will be loaded during startup
-
setAASBundle
public void setAASBundle(org.eclipse.basyx.aas.bundle.AASBundle aasBundle) Explicitly sets an AAS bundle that should be loaded during startup.- Parameters:
aasBundle- The bundle that will be loaded during startup
-
setSecurityConfiguration
public void setSecurityConfiguration(org.eclipse.basyx.components.configuration.BaSyxSecurityConfiguration configuration) Sets the security configuration for this component. Has to be called before the component is started.- Parameters:
configuration- the configuration to be set
-
startComponent
public void startComponent()Starts the AASX component at http://${hostName}:${port}/${path}.- Specified by:
startComponentin interfaceorg.eclipse.basyx.components.IComponent
-
getRootFilePathWithContext
Returns the root file path with context.- Parameters:
contextPath- the context path- Returns:
- the composed path
-
createDefaultServlet
private org.apache.catalina.servlets.DefaultServlet createDefaultServlet()Creates the default servlet.- Returns:
- the default servlet
-
getAuthorizedDefaultServletParams
private org.eclipse.basyx.components.aas.authorization.internal.AuthorizedDefaultServletParams<?> getAuthorizedDefaultServletParams()Gets authorized servlet params.- Returns:
- the params
-
registerPreexistingAASAndSMIfPossible
private void registerPreexistingAASAndSMIfPossible()Registers pre-existing AAS and SM if possible. -
shouldRegisterPreexistingAASAndSM
private boolean shouldRegisterPreexistingAASAndSM()Returns whether it should register pre-existing AAS and SM if possible. -
registerAASAndSubmodels
private void registerAASAndSubmodels(org.eclipse.basyx.aas.metamodel.api.IAssetAdministrationShell aas) Registers AAS and submodels.- Parameters:
aas- the AAS to register
-
registerAAS
private void registerAAS(org.eclipse.basyx.aas.metamodel.api.IAssetAdministrationShell aas) Registers AAS.- Parameters:
aas- the AAS to register
-
getAASAccessPath
Returns the AAS access path.- Parameters:
aas- the AAS- Returns:
- the access path
-
registerSubmodels
private void registerSubmodels(org.eclipse.basyx.aas.metamodel.api.IAssetAdministrationShell aas) Registers the submodels ofaas.- Parameters:
aas- the AAS
-
registerSubmodel
private void registerSubmodel(org.eclipse.basyx.aas.metamodel.api.IAssetAdministrationShell aas, org.eclipse.basyx.submodel.metamodel.api.ISubmodel submodel) Registers the given submodel.- Parameters:
aas- the AASsubmodel- the submodel
-
getSubmodelFromAggregator
private List<org.eclipse.basyx.submodel.metamodel.api.ISubmodel> getSubmodelFromAggregator(org.eclipse.basyx.aas.aggregator.api.IAASAggregator aggregator, org.eclipse.basyx.submodel.metamodel.api.identifier.IIdentifier iIdentifier) Gets submodels from aggregator.- Parameters:
aggregator- the aggregatoriIdentifier- the AAS identifier- Returns:
- the submodels
-
getSubmodel
Casts the submodel insubmodelObject.- Parameters:
submodelObject- the submodel object- Returns:
- the submodel
-
loadAASServerFeaturesFromConfig
private void loadAASServerFeaturesFromConfig()Loads AAS server features from config. -
isAutoRegisterEnabled
private boolean isAutoRegisterEnabled()Returns whether auto register is enabled.- Returns:
- whether auto register is enabled
-
isSubmodelRegistrationWhiteListConfigured
private boolean isSubmodelRegistrationWhiteListConfigured()Returns whether the registration white list is configured.- Returns:
- whether the registration white list is configured
-
configureSecurity
private void configureSecurity()Configures security. -
isRegistryConfigured
private boolean isRegistryConfigured()Returns whether the registry is configured.- Returns:
- whether the registry is configured
-
isEventingEnabled
private boolean isEventingEnabled()Returns whether AAS eventing is enabled.- Returns:
truefor eventing,falseelse
-
configureMqttFeature
private void configureMqttFeature()Configures the MQTT feature. -
getURL
Retrieves the URL on which the component is providing its HTTP server.- Returns:
-
isExternalPathConfigured
private boolean isExternalPathConfigured()Returns whether external path is configured.- Returns:
- whether external path is configured
-
getExternalURL
Returns the external URL.- Returns:
- the external URL
-
getInternalURL
Returns the internal URL.- Returns:
- the internal URL
-
stopComponent
public void stopComponent()- Specified by:
stopComponentin interfaceorg.eclipse.basyx.components.IComponent
-
deregisterAASAndSmAddedDuringRuntime
private void deregisterAASAndSmAddedDuringRuntime()Deregisters AAS and SSM during runtime. -
deregisterAASAndAccompanyingSM
private void deregisterAASAndAccompanyingSM(org.eclipse.basyx.aas.metamodel.api.IAssetAdministrationShell aas) Deregisters AAS and SM.- Parameters:
aas- the AAS
-
getSubmodelDescriptors
private List<org.eclipse.basyx.aas.metamodel.map.descriptor.SubmodelDescriptor> getSubmodelDescriptors(org.eclipse.basyx.submodel.metamodel.api.identifier.IIdentifier aasIdentifier) Returns the submodel descriptors for the given AAS.- Parameters:
aasIdentifier- the AAS identifier- Returns:
- the submodel descriptors
-
deregisterSubmodel
private void deregisterSubmodel(org.eclipse.basyx.submodel.metamodel.api.identifier.IIdentifier aasIdentifier, org.eclipse.basyx.aas.metamodel.map.descriptor.SubmodelDescriptor submodelDescriptor) Deregisters a submodel.- Parameters:
aasIdentifier- the identifier to deregistersubmodelDescriptor- the submodel to deregister
-
deregisterAAS
private void deregisterAAS(org.eclipse.basyx.submodel.metamodel.api.identifier.IIdentifier aasIdentifier) Deregisters an AAS.- Parameters:
aasIdentifier- the identifier to deregister
-
addAASServerFeature
public void addAASServerFeature(org.eclipse.basyx.components.aas.aascomponent.IAASServerFeature aasServerFeature) Adds an AAS server feature.- Parameters:
aasServerFeature- the feature
-
initializeAASServerFeatures
private void initializeAASServerFeatures()Initializes up AAS server features. -
initializeAasBundles
private void initializeAasBundles(org.eclipse.basyx.vab.protocol.http.server.BaSyxContext context) Initializes the AAS bundles.- Parameters:
context- the BaSyx context
-
cleanUpAASServerFeatures
private void cleanUpAASServerFeatures()Cleans up AAS server features. -
loadBundleString
Loads a bundle as string.- Parameters:
filePath- the file path- Returns:
- the bundle as string
- Throws:
IOException- if I/O fails
-
loadBundleFromXML
private Set<org.eclipse.basyx.aas.bundle.AASBundle> loadBundleFromXML(String xmlPath) throws IOException, ParserConfigurationException, SAXException Loads a bundle from XML.- Parameters:
xmlPath- the XML path- Returns:
- the bundle
- Throws:
IOException- if I/O failsParserConfigurationException- if parser is not configured correctySAXException- if XML reading fails
-
loadBundleFromJSON
private Set<org.eclipse.basyx.aas.bundle.AASBundle> loadBundleFromJSON(String jsonPath) throws IOException Loads a bundle from JSON.- Parameters:
jsonPath- the JSON path- Returns:
- the bundle
- Throws:
IOException- if I/O fails
-
loadBundleFromAASX
private static Set<org.eclipse.basyx.aas.bundle.AASBundle> loadBundleFromAASX(String aasxPath, String childFilePath) throws IOException, ParserConfigurationException, SAXException, org.apache.poi.openxml4j.exceptions.InvalidFormatException, URISyntaxException Loads a bundle from AASX.- Parameters:
aasxPath- the AASX path- Returns:
- the bundle
- Throws:
IOException- if I/O failsParserConfigurationException- if parser is not configured correctySAXException- if XML reading failsorg.apache.poi.openxml4j.exceptions.InvalidFormatException- if a format is invalidURISyntaxException- if a URI is invalid
-
addAASServerFeaturesToContext
private void addAASServerFeaturesToContext(org.eclipse.basyx.vab.protocol.http.server.BaSyxContext context) Adds AAS server features tocontext.- Parameters:
context- the context to modify
-
getFlatAASBundles
Returns the flat AAS bundles.- Returns:
- the bundles
-
createAggregatorServlet
private org.eclipse.basyx.vab.protocol.http.server.VABHTTPInterface<?> createAggregatorServlet()Creates the aggregator servlet.- Returns:
- the aggregator servlet
-
createAASAggregator
private org.eclipse.basyx.aas.aggregator.api.IAASAggregator createAASAggregator()Creates the AAS aggregator.- Returns:
- the aggregator instance
-
isMongoDBBackend
private boolean isMongoDBBackend()Are we running a mongo DB backend?- Returns:
truefor mongo,falseelse
-
createMongoDbConfiguration
private org.eclipse.basyx.components.configuration.BaSyxMongoDBConfiguration createMongoDbConfiguration()Creates a mongo DB configuration.- Returns:
- the configuration
-
createAASServerDecoratorList
private List<org.eclipse.basyx.components.aas.aascomponent.IAASServerDecorator> createAASServerDecoratorList()Creates an AAS server decorator list.- Returns:
- the decorator list
-
loadAASBundles
private void loadAASBundles()Loads the AAS bundles. -
loadAASFromSource
private List<Collection<org.eclipse.basyx.aas.bundle.AASBundle>> loadAASFromSource(List<String> aasSources) Loads AAS from source.- Parameters:
aasSources- the sources- Returns:
- the AAS bundle
-
getAASXFileSubPath
Returns the AASX file sub path.- Parameters:
aasxIndex- the AASX index- Returns:
- the sub path
-
loadBundleFromFile
private Set<org.eclipse.basyx.aas.bundle.AASBundle> loadBundleFromFile(String aasSource, String childFilePath) Loads an AAS source as bundle from a file.- Parameters:
aasSource- the AAS source- Returns:
- the bundle
-
createRegistryFromConfig
private org.eclipse.basyx.aas.registration.api.IAASRegistry createRegistryFromConfig(org.eclipse.basyx.components.aas.configuration.BaSyxAASServerConfiguration aasConfig) Only creates the registry, if it hasn't been set explicitly before.- Parameters:
aasConfig- the server configuration- Returns:
- the registry
-
shouldUseSecuredRegistryConnection
private boolean shouldUseSecuredRegistryConnection(org.eclipse.basyx.components.aas.configuration.BaSyxAASServerConfiguration aasConfig) Returns whether we should use a secured registry connection.- Parameters:
aasConfig- the AAS server configuration- Returns:
- whether we should use a secured registry connection
-
registerWhitelistedSubmodels
private void registerWhitelistedSubmodels()Registers whitelisted submodels. -
registerSubmodelsFromWhitelist
private void registerSubmodelsFromWhitelist()Registers submodels from a whitelist. -
updateSMEndpoint
private void updateSMEndpoint(String smId, List<org.eclipse.basyx.aas.metamodel.map.descriptor.AASDescriptor> descriptors) Updates a SM endpoint.- Parameters:
smId- the sm identifierdescriptors- the related AAS descriptors
-
updateSMEndpoint
private void updateSMEndpoint(org.eclipse.basyx.aas.metamodel.map.descriptor.SubmodelDescriptor smDescriptor) Updates a SM endpoint.- Parameters:
smDescriptor- the submodel descriptor
-
findSMDescriptor
private org.eclipse.basyx.aas.metamodel.map.descriptor.SubmodelDescriptor findSMDescriptor(String smId, Collection<org.eclipse.basyx.aas.metamodel.map.descriptor.SubmodelDescriptor> smDescriptors) Finds a SM descriptor.- Parameters:
smId- the SM idsmDescriptors- the SM descriptors to search- Returns:
- the descriptor or null
-
getSMEndpoint
Returns the SM endpoint for the given SM id.- Parameters:
smId- the submodel id- Returns:
- the endpoint
-
getSMIdShortFromSMId
private String getSMIdShortFromSMId(org.eclipse.basyx.submodel.metamodel.api.identifier.IIdentifier smId) Returns an SM idShort from an sm identifier.- Parameters:
smId- the submodel id- Returns:
- the idShort
- Throws:
org.eclipse.basyx.vab.exception.provider.ResourceNotFoundException- if the submodel cannot be found
-
getAASIdFromSMId
private String getAASIdFromSMId(org.eclipse.basyx.submodel.metamodel.api.identifier.IIdentifier smId) Returns the AAS id from a submodel.- Parameters:
smId- the submodel id- Returns:
- the AAS id
- Throws:
org.eclipse.basyx.vab.exception.provider.ResourceNotFoundException- if the submodel cannot be found
-
modifyFilePaths
Fixes the File submodel element value paths according to the given endpoint configuration.- Parameters:
hostName- the hostnameport- the portrootPath- the root path
-
modifyFilePathsInBundleSet
private void modifyFilePathsInBundleSet(Collection<org.eclipse.basyx.aas.bundle.AASBundle> bundleSet, String hostName, int port, String bundleFileRootPath) Modifies the file paths in bundle set.- Parameters:
bundleSet- the bundle sethostName- the hostnameport- the portbundleFileRootPath- the bundle root path
-
getMqttAASClientId
Returns the MQTT AAS client id.- Returns:
- the ID
-
getMqttSubmodelClientId
Returns the MQTT submodel client id.- Returns:
- the ID
-
addAasxFilesResourceServlet
private void addAasxFilesResourceServlet(org.eclipse.basyx.vab.protocol.http.server.BaSyxContext context) Adds an AASX files resource servlet.- Parameters:
context- the BaSyx context
-
createChildContextForAasxResourceFiles
private org.apache.catalina.Context createChildContextForAasxResourceFiles(String childContextPath, String childDocbasePath) Creates a child context for AASX resource files.- Parameters:
childContextPath- the child context pathchildDocbasePath- the child docbase- Returns:
- the child context
-
createBasyxResourceDirectoryIfNotExists
private void createBasyxResourceDirectoryIfNotExists()Creates a resource directory if it does not exist.
-