@Override public ConnectorManager createDefaultConnectorManager() { ConnectorManager connectorManager = new ConnectorManager(); connectorManager.setName(DEFAUT_NAME); try { URL defaultConnectorManagerURL = ConstellioSpringUtils.getDefaultConnectorManagerURL(); connectorManager.setUrl(defaultConnectorManagerURL.toString()); } catch (MalformedURLException e) { LOGGER.log(Level.WARNING, "Invalid URL for default ConnectorManager", e); } this.getEntityManager().persist(connectorManager); return connectorManager; }
@Override public String generateConnectorName( ConnectorManager connectorManager, String collectionName, String connectorType) { String normalizedCollectionName = AsciiUtils.convertNonAscii(collectionName); return (connectorManager.getName() + "_" + normalizedCollectionName + "_" + connectorType + "_" + System.currentTimeMillis()) .toLowerCase(); }