-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from andrerod/multimodule_3
Splitting out media module
- Loading branch information
Showing
1,019 changed files
with
100,985 additions
and
2,078 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
...core/src/main/java/com/microsoft/windowsazure/management/CertificateCloudCredentials.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/** | ||
* Copyright Microsoft Corporation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.microsoft.windowsazure.management; | ||
|
||
import java.io.IOException; | ||
import java.security.GeneralSecurityException; | ||
import javax.net.ssl.SSLContext; | ||
import org.apache.http.conn.ssl.SSLConnectionSocketFactory; | ||
import org.apache.http.impl.client.CloseableHttpClient; | ||
import org.apache.http.impl.client.HttpClients; | ||
|
||
public class CertificateCloudCredentials extends SubscriptionCloudCredentials { | ||
private String _subscriptionId; | ||
private KeyStoreCredential _keyStoreCredential; | ||
|
||
public CertificateCloudCredentials(String subscriptionId) | ||
{ | ||
this._subscriptionId = subscriptionId; | ||
} | ||
|
||
public CertificateCloudCredentials(String subscriptionId, KeyStoreCredential keyStoreCredential) | ||
{ | ||
this._subscriptionId = subscriptionId; | ||
this._keyStoreCredential = keyStoreCredential; | ||
} | ||
|
||
@Override | ||
public String getSubscriptionId() | ||
{ | ||
return _subscriptionId; | ||
} | ||
|
||
public void setSubscriptionId(String subscriptionId) | ||
{ | ||
_subscriptionId = subscriptionId; | ||
} | ||
|
||
public KeyStoreCredential getKeyStoreCredential() | ||
{ | ||
return _keyStoreCredential; | ||
} | ||
|
||
public void setKeyStoreCredential(KeyStoreCredential keyStoreCredential) | ||
{ | ||
_keyStoreCredential = keyStoreCredential; | ||
} | ||
|
||
@Override | ||
public CloseableHttpClient initializeClient() | ||
{ | ||
try { | ||
SSLContext sslcontext = SSLContextFactory.create(this.getKeyStoreCredential()); | ||
|
||
return HttpClients.custom() | ||
.setSSLSocketFactory(new SSLConnectionSocketFactory(sslcontext)) | ||
.build(); | ||
} | ||
catch (IOException e) | ||
{ | ||
return null; | ||
} | ||
catch (GeneralSecurityException e) | ||
{ | ||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...azure-api-core/src/main/java/com/microsoft/windowsazure/management/OperationResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* Copyright Microsoft Corporation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.microsoft.windowsazure.management; | ||
|
||
public class OperationResponse { | ||
private int _httpStatusCode; | ||
|
||
/** | ||
* Gets the HTTP status code for the request. | ||
*/ | ||
public int getStatusCode() { return this._httpStatusCode; } | ||
|
||
/** | ||
* Sets the HTTP status code for the request. | ||
*/ | ||
public void setStatusCode(int httpStatusCode) { this._httpStatusCode = httpStatusCode; } | ||
|
||
private String _requestId; | ||
|
||
/** | ||
* Gets the request identifier. | ||
*/ | ||
public String getRequestId() { return this._requestId; } | ||
|
||
/** | ||
* Sets the request identifier. | ||
*/ | ||
public void setRequestId(String requestId) { this._requestId = requestId; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...ore/src/main/java/com/microsoft/windowsazure/management/SubscriptionCloudCredentials.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Copyright Microsoft Corporation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.microsoft.windowsazure.management; | ||
|
||
import com.microsoft.windowsazure.CloudCredentials; | ||
|
||
public abstract class SubscriptionCloudCredentials extends CloudCredentials { | ||
/* | ||
* When you create a Windows Azure subscription, it is uniquely | ||
* identified by a subscription ID. The subscription ID forms part of | ||
* the URI for every call that you make to the Service Management API. | ||
*/ | ||
public abstract String getSubscriptionId(); | ||
} |
Oops, something went wrong.