Search in sources :

Example 6 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