use of com.microsoft.azuretools.azurecommons.helpers.NotNull in project azure-tools-for-java by Microsoft.
the class IDEHelperImpl method getArtifacts.
@NotNull
@Override
public List<ArtifactDescriptor> getArtifacts(@NotNull ProjectDescriptor projectDescriptor) throws AzureCmdException {
Project project = findOpenProject(projectDescriptor);
List<ArtifactDescriptor> artifactDescriptors = new ArrayList<ArtifactDescriptor>();
for (Artifact artifact : ArtifactUtil.getArtifactWithOutputPaths(project)) {
artifactDescriptors.add(new ArtifactDescriptor(artifact.getName(), artifact.getArtifactType().getId()));
}
return artifactDescriptors;
}
use of com.microsoft.azuretools.azurecommons.helpers.NotNull in project azure-tools-for-java by Microsoft.
the class ClusterOperationImpl method requestWithToken.
@NotNull
public <T> T requestWithToken(@NotNull String tenantId, @NotNull final RequestCallback<T> requestCallback) throws Throwable {
AzureManager azureManager = AuthMethodManager.getInstance().getAzureManager();
// not signed in
if (azureManager == null) {
return null;
}
String accessToken = azureManager.getAccessToken(tenantId);
return requestCallback.execute(accessToken);
}
Aggregations