Search in sources :

Example 31 with NotNull

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;
}
Also used : Project(com.intellij.openapi.project.Project) ArrayList(java.util.ArrayList) Artifact(com.intellij.packaging.artifacts.Artifact) NotNull(com.microsoft.azuretools.azurecommons.helpers.NotNull)

Example 32 with NotNull

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);
}
Also used : AzureManager(com.microsoft.azuretools.sdkmanage.AzureManager) NotNull(com.microsoft.azuretools.azurecommons.helpers.NotNull)

Aggregations

NotNull (com.microsoft.azuretools.azurecommons.helpers.NotNull)32 AzureCmdException (com.microsoft.azuretools.azurecommons.helpers.AzureCmdException)20 CloudQueue (com.microsoft.azure.storage.queue.CloudQueue)4 CloudQueueClient (com.microsoft.azure.storage.queue.CloudQueueClient)4 HttpsURLConnection (javax.net.ssl.HttpsURLConnection)4 Project (com.intellij.openapi.project.Project)3 Artifact (com.intellij.packaging.artifacts.Artifact)2 CloudQueueMessage (com.microsoft.azure.storage.queue.CloudQueueMessage)2 ContentType (com.microsoft.tooling.msservices.helpers.azure.rest.RestServiceManager.ContentType)2 HttpsURLConnectionProvider (com.microsoft.tooling.msservices.helpers.azure.rest.RestServiceManager.HttpsURLConnectionProvider)2 BlobDirectory (com.microsoft.tooling.msservices.model.storage.BlobDirectory)2 BlobFile (com.microsoft.tooling.msservices.model.storage.BlobFile)2 QueueMessage (com.microsoft.tooling.msservices.model.storage.QueueMessage)2 TableEntity (com.microsoft.tooling.msservices.model.storage.TableEntity)2 Property (com.microsoft.tooling.msservices.model.storage.TableEntity.Property)2 FileType (com.intellij.openapi.fileTypes.FileType)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 LightVirtualFile (com.intellij.testFramework.LightVirtualFile)1 Nullable (com.microsoft.azuretools.azurecommons.helpers.Nullable)1 AzureManager (com.microsoft.azuretools.sdkmanage.AzureManager)1