Search in sources :

Example 1 with DatabaseServer

use of org.platformlayer.ops.databases.DatabaseServer in project platformlayer by platformlayer.

the class DatabaseController method buildLinkTargetConfiguration.

@Override
public Map<String, String> buildLinkTargetConfiguration(LinkConsumer consumer) throws OpsException {
    ItemBase serverItem = platformLayer.getItem(model.server);
    DatabaseServer databaseServer = providers.toInterface(serverItem, DatabaseServer.class);
    InetAddressChooser inetAddressChooser = consumer.getInetAddressChooser();
    return databaseServer.buildTargetConfiguration(model.username, model.password, model.databaseName, inetAddressChooser);
}
Also used : ItemBase(org.platformlayer.core.model.ItemBase) InetAddressChooser(org.platformlayer.InetAddressChooser) DatabaseServer(org.platformlayer.ops.databases.DatabaseServer)

Example 2 with DatabaseServer

use of org.platformlayer.ops.databases.DatabaseServer in project platformlayer by platformlayer.

the class GerritTemplate method getJdbcUrl.

protected String getJdbcUrl() throws OpsException {
    PlatformLayerKey serverKey = getDatabase().server;
    ItemBase serverItem = (ItemBase) platformLayer.getItem(serverKey);
    DatabaseServer server = databases.toDatabase(serverItem);
    String jdbc = server.getJdbcUrl(getDatabaseName(), InetAddressChooser.preferIpv6());
    return jdbc;
}
Also used : ItemBase(org.platformlayer.core.model.ItemBase) PlatformLayerKey(org.platformlayer.core.model.PlatformLayerKey) DatabaseServer(org.platformlayer.ops.databases.DatabaseServer)

Example 3 with DatabaseServer

use of org.platformlayer.ops.databases.DatabaseServer in project platformlayer by platformlayer.

the class PlatformLayerDatabaseController method buildLinkTargetConfiguration.

@Override
public Map<String, String> buildLinkTargetConfiguration(LinkConsumer consumer) throws OpsException {
    ItemBase serverItem = platformLayer.getItem(model.server);
    DatabaseServer databaseServer = providers.toInterface(serverItem, DatabaseServer.class);
    InetAddressChooser inetAddressChooser = consumer.getInetAddressChooser();
    return databaseServer.buildTargetConfiguration(model.username, model.password, model.databaseName, inetAddressChooser);
}
Also used : ItemBase(org.platformlayer.core.model.ItemBase) InetAddressChooser(org.platformlayer.InetAddressChooser) DatabaseServer(org.platformlayer.ops.databases.DatabaseServer)

Example 4 with DatabaseServer

use of org.platformlayer.ops.databases.DatabaseServer in project platformlayer by platformlayer.

the class GerritDatabaseTemplate method getAuthJdbcUrl.

protected String getAuthJdbcUrl() throws OpsException {
    PlatformLayerKey serverKey = getModel().server;
    ItemBase serverItem = (ItemBase) platformLayer.getItem(serverKey);
    DatabaseServer server = databases.toDatabase(serverItem);
    String jdbc = server.getJdbcUrl(getDatabaseName(), InetAddressChooser.preferIpv6());
    return jdbc;
}
Also used : ItemBase(org.platformlayer.core.model.ItemBase) PlatformLayerKey(org.platformlayer.core.model.PlatformLayerKey) DatabaseServer(org.platformlayer.ops.databases.DatabaseServer)

Example 5 with DatabaseServer

use of org.platformlayer.ops.databases.DatabaseServer in project platformlayer by platformlayer.

the class PlatformLayerAuthDatabaseController method buildLinkTargetConfiguration.

@Override
public Map<String, String> buildLinkTargetConfiguration(LinkConsumer consumer) throws OpsException {
    ItemBase serverItem = platformLayer.getItem(model.server);
    DatabaseServer databaseServer = providers.toInterface(serverItem, DatabaseServer.class);
    InetAddressChooser inetAddressChooser = consumer.getInetAddressChooser();
    return databaseServer.buildTargetConfiguration(model.username, model.password, model.databaseName, inetAddressChooser);
}
Also used : ItemBase(org.platformlayer.core.model.ItemBase) InetAddressChooser(org.platformlayer.InetAddressChooser) DatabaseServer(org.platformlayer.ops.databases.DatabaseServer)

Aggregations

ItemBase (org.platformlayer.core.model.ItemBase)6 DatabaseServer (org.platformlayer.ops.databases.DatabaseServer)6 InetAddressChooser (org.platformlayer.InetAddressChooser)3 PlatformLayerKey (org.platformlayer.core.model.PlatformLayerKey)2 BindingScope (org.platformlayer.ops.BindingScope)1 OpsContext (org.platformlayer.ops.OpsContext)1 DatabaseTarget (org.platformlayer.ops.databases.DatabaseTarget)1