| Constructor and Description |
|---|
ConnectorService() |
| Modifier and Type | Method and Description |
|---|---|
Connector |
createConnector(String name,
String assemblyInstructions,
String description,
String type,
GenericArtifact dataSheet,
List<ConnectorManufacturer> manufacturers,
String linkToDatasheet,
String userId)
Creates connector.
|
boolean |
deleteConnector(Connector connector,
String userId)
Marks the connector as inactive in the database.
|
void |
detachConnector(Connector connector)
Detaches a single connector from entity manager
|
Connector |
getConnector(String name)
Returns a Connector with the specified name.
|
List<Connector> |
getConnectors() |
List<Connector> |
getFilteredConnectors(Collection<ConnectorColumn> fields,
String regExp)
Returns all connectors for which at least one of the specified fields matches the given regular expression.
|
List<Connector> |
getFilteredConnectors(String customQuery,
Query query)
Return a list of filtered connectors.
|
boolean |
updateConnector(Connector connector,
Connector oldConnector,
String userId)
Updates the attributes on the given connector.
|
public List<Connector> getFilteredConnectors(String customQuery, Query query)
customQuery - custom query for filtering connectorsquery - query to updatepublic List<Connector> getFilteredConnectors(Collection<ConnectorColumn> fields, String regExp)
fields - the list of string fields to checkregExp - regular expression containing only literals, wildcard (*) and single character (?)public Connector getConnector(String name)
name - name of the connectorpublic Connector createConnector(String name, String assemblyInstructions, String description, String type, GenericArtifact dataSheet, List<ConnectorManufacturer> manufacturers, String linkToDatasheet, String userId)
name - the name of the connectorassemblyInstructions - assembly instructions for the connectordescription - description belonging to the connectortype - the type of the connectordataSheet - datasheet artifactmanufacturers - the manufacturers of this connectorlinkToDatasheet - link to datasheet for the connectoruserId - username of user creating the connector, for history recordpublic boolean updateConnector(Connector connector, Connector oldConnector, String userId)
connector - the connector with modified attributes to save to the databaseoldConnector - the connector before modificationuserId - username of user updating the connector, for history recordpublic boolean deleteConnector(Connector connector, String userId)
connector - the connector to deleteuserId - username of user deleting the connector, for history recordpublic void detachConnector(Connector connector)
connector - the Connector to detachCopyright © 2025 European Spallation Source. All rights reserved.