use of com.microsoft.azure.toolkit.lib.sqlserver.SqlServer in project azure-tools-for-java by Microsoft.
the class SqlServerPropertyView method refreshProperty.
private void refreshProperty(String sid, String resourceGroup, String name) {
// find server
try {
SqlServer server = Azure.az(AzureSqlServer.class).sqlServer(sid, resourceGroup, name);
this.property.setServer(server);
} catch (Exception ex) {
String error = "find Azure Database for MySQL server information";
String action = "confirm your network is available and your server actually exists.";
throw new AzureToolkitRuntimeException(error, action);
}
SqlServerEntity entity = property.getServer().entity();
if ("Ready".equals(entity.getState())) {
// find firewalls
List<FirewallRuleEntity> firewallRules = Azure.az(AzureSqlServer.class).sqlServer(entity.getId()).firewallRules();
this.property.setFirewallRules(firewallRules);
}
}
use of com.microsoft.azure.toolkit.lib.sqlserver.SqlServer in project azure-tools-for-java by Microsoft.
the class ConnectToSQLAction method actionPerformed.
@Override
public void actionPerformed(NodeActionEvent e) {
final ConnectorDialog dialog = new ConnectorDialog(project);
final SqlServer server = this.node.getServer();
final Database database = new Database(server.id(), null);
final DatabaseResource resource = new DatabaseResource(database, DatabaseResource.Definition.SQL_SERVER);
dialog.setResource(resource);
dialog.show();
}
Aggregations