Skip to content

Commit

Permalink
Remove generic parameter from WebAppBase
Browse files Browse the repository at this point in the history
  • Loading branch information
jianghaolu committed Dec 10, 2016
1 parent 0c1d777 commit 4e7f802
Show file tree
Hide file tree
Showing 18 changed files with 61 additions and 31 deletions.
10 changes: 10 additions & 0 deletions azure-mgmt-appservice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@
<configuration>
<source>1.7</source>
<target>1.7</target>
<annotationProcessors>
<annotationProcessor>
com.microsoft.azure.management.apigeneration.LangDefinitionProcessor</annotationProcessor>
</annotationProcessors>
<debug>true</debug>
<optimize>true</optimize>
<compilerArguments>
<AaddGeneratedAnnotation>true</AaddGeneratedAnnotation>
<Adebug>true</Adebug>
</compilerArguments>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ interface WithDomainVerificationFromWebApp extends WithDomainVerification {
* @param webApp the web app bound to the hostname
* @return the next stage of the app service certificate definition
*/
WithKeyVault withWebAppVerification(WebAppBase<?> webApp);
WithKeyVault withWebAppVerification(WebAppBase webApp);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import com.microsoft.azure.management.apigeneration.Fluent;
import com.microsoft.azure.management.resources.fluentcore.arm.models.IndependentChildResource;
import com.microsoft.azure.management.resources.fluentcore.model.Refreshable;
import com.microsoft.azure.management.resources.fluentcore.model.Updatable;

/**
Expand All @@ -16,7 +17,8 @@
@Fluent
public interface DeploymentSlot extends
IndependentChildResource,
WebAppBase<DeploymentSlot>,
WebAppBase,
Refreshable<DeploymentSlot>,
Updatable<DeploymentSlot.Update> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

package com.microsoft.azure.management.appservice;

import com.microsoft.azure.management.apigeneration.Fluent;
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingById;
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByName;
import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating;
Expand All @@ -16,6 +17,7 @@
/**
* Entry point for storage accounts management API.
*/
@Fluent
public interface DeploymentSlots extends
SupportsCreating<DeploymentSlot.DefinitionStages.Blank>,
SupportsListing<DeploymentSlot>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
public interface HostNameBinding
extends
Wrapper<HostNameBindingInner>,
ExternalChildResource<HostNameBinding, WebAppBase<?>>, Resource {
ExternalChildResource<HostNameBinding, WebAppBase>, Resource {
/**
* @return the hostname to bind to
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@Fluent
public interface HostNameSslBinding extends
Wrapper<HostNameSslState>,
ChildResource<WebAppBase<?>> {
ChildResource<WebAppBase> {
/**
* @return the SSL type
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/

package com.microsoft.azure.management.appservice;

/**
* The type of a repository.
*/
public enum RepositoryType {
/** Git repository. */
GIT,
/** Mercurial repository. */
MERCURIAL
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@

import com.microsoft.azure.management.apigeneration.Fluent;
import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource;
import com.microsoft.azure.management.resources.fluentcore.model.Refreshable;
import com.microsoft.azure.management.resources.fluentcore.model.Updatable;

/**
* An immutable client-side representation of an Azure Web App.
*/
@Fluent
public interface WebApp extends
WebAppBase<WebApp>,
WebAppBase,
Refreshable<WebApp>,
Updatable<WebApp.Update> {
/**
* @return the entry point to deployment slot management API under the web app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@

/**
* An immutable client-side representation of an Azure Web App or deployment slot.
* @param <T> the fluent interface of the web app or deployment slot
*/
@Fluent
public interface WebAppBase<T extends WebAppBase<T>> extends
public interface WebAppBase extends
HasName,
Refreshable<T>,
GroupableResource,
Wrapper<SiteInner> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@Fluent
public interface WebAppSourceControl extends
Wrapper<SiteSourceControlInner>,
ChildResource<WebAppBase<?>> {
ChildResource<WebAppBase> {
/**
* @return the repository or source control url
*/
Expand Down Expand Up @@ -300,13 +300,4 @@ interface GitHubWithAttach<ParentT> extends
}
}

/**
* The type of a repository.
*/
enum RepositoryType {
/** Git repository. */
GIT,
/** Mercurial repository. */
MERCURIAL
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class AppServiceCertificateOrderImpl

final AppServiceCertificateOrdersInner client;

private WebAppBase<?> domainVerifyWebApp;
private WebAppBase domainVerifyWebApp;
private AppServiceDomain domainVerifyDomain;
private Observable<Vault> bindingVault;

Expand Down Expand Up @@ -266,7 +266,7 @@ public AppServiceCertificateOrderImpl withDomainVerification(AppServiceDomain do
}

@Override
public AppServiceCertificateOrderImpl withWebAppVerification(WebAppBase<?> webApp) {
public AppServiceCertificateOrderImpl withWebAppVerification(WebAppBase webApp) {
this.domainVerifyWebApp = webApp;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package com.microsoft.azure.management.appservice.implementation;

import com.microsoft.azure.PagedList;
import com.microsoft.azure.management.apigeneration.LangDefinition;
import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.IndependentChildResourcesImpl;
import com.microsoft.azure.management.resources.fluentcore.utils.PagedListConverter;
import com.microsoft.azure.management.appservice.DeploymentSlot;
Expand All @@ -19,6 +20,7 @@
/**
* The implementation for {@link DeploymentSlots}.
*/
@LangDefinition
class DeploymentSlotsImpl
extends IndependentChildResourcesImpl<
DeploymentSlot,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*/
@LangDefinition
class HostNameBindingImpl<
FluentT extends WebAppBase<FluentT>,
FluentT extends WebAppBase,
FluentImplT extends WebAppBaseImpl<FluentT, FluentImplT>>
extends
IndexableWrapperImpl<HostNameBindingInner>
Expand Down Expand Up @@ -236,7 +236,7 @@ public String name() {
}

@Override
public WebAppBase<FluentT> parent() {
public WebAppBase parent() {
return parent;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
*/
@LangDefinition
class HostNameSslBindingImpl<
FluentT extends WebAppBase<FluentT>,
FluentT extends WebAppBase,
FluentImplT extends WebAppBaseImpl<FluentT, FluentImplT>>
extends IndexableWrapperImpl<HostNameSslState>
implements
Expand Down Expand Up @@ -146,7 +146,7 @@ public void call(AppServiceCertificate appServiceCertificate) {
}

@Override
public WebAppBase<FluentT> parent() {
public WebAppBase parent() {
return parent;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@
*/
@LangDefinition
abstract class WebAppBaseImpl<
FluentT extends WebAppBase<FluentT>,
FluentT extends WebAppBase,
FluentImplT extends WebAppBaseImpl<FluentT, FluentImplT>>
extends GroupableResourceImpl<
FluentT,
SiteInner,
FluentImplT,
AppServiceManager>
implements
WebAppBase<FluentT>,
WebAppBase,
WebAppBase.Definition<FluentT>,
WebAppBase.Update<FluentT>,
WebAppBase.UpdateStages.WithWebContainer<FluentT> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package com.microsoft.azure.management.appservice.implementation;

import com.microsoft.azure.management.apigeneration.LangDefinition;
import com.microsoft.azure.management.appservice.RepositoryType;
import com.microsoft.azure.management.resources.fluentcore.model.implementation.IndexableWrapperImpl;
import com.microsoft.azure.management.resources.fluentcore.utils.Utils;
import com.microsoft.azure.management.appservice.WebAppBase;
Expand All @@ -19,7 +20,7 @@
*/
@LangDefinition
class WebAppSourceControlImpl<
FluentT extends WebAppBase<FluentT>,
FluentT extends WebAppBase,
FluentImplT extends WebAppBaseImpl<FluentT, FluentImplT>>
extends IndexableWrapperImpl<SiteSourceControlInner>
implements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ public static void print(AppServicePlan resource) {
* Print a web app.
* @param resource a web app
*/
public static void print(WebAppBase<?> resource) {
public static void print(WebAppBase resource) {
StringBuilder builder = new StringBuilder().append("Web app: ").append(resource.id())
.append("Name: ").append(resource.name())
.append("\n\tState: ").append(resource.state())
Expand Down
9 changes: 7 additions & 2 deletions translation.properties
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,16 @@ class-com.microsoft.azure.management.resources.implementation.TenantIdDescriptio
class-com.microsoft.azure.management.resources.implementation.LocationInner=Microsoft.Azure.Management.ResourceManager.Models.Location
package-com.microsoft.azure.management.graphrbac.implementation=Microsoft.Azure.Management.Graph.RBAC.Models
package-com.microsoft.azure.management.graphrbac=Microsoft.Azure.Management.Graph.RBAC.Models
package-com.microsoft.azure.management.keyvault.implementation=Microsoft.Azure.Management.KeyVault.Models
package-com.microsoft.azure.management.keyvault=Microsoft.Azure.Management.KeyVault.Models
package-com.microsoft.azure.management.keyvault=Microsoft.Azure.Management.KeyVault.Fluent.Models
package-com.microsoft.azure.management.keyvault.implementation=Microsoft.Azure.Management.KeyVault.Fluent.Models
package-com.microsoft.azure.management.keyvault.implementationClient=Microsoft.Azure.Management.KeyVault.Fluent
package-com.microsoft.azure.management.keyvault.implementationOperations=Microsoft.Azure.Management.KeyVault.Fluent
class-com.microsoft.azure.management.keyvault.IVault=Microsoft.Azure.Management.KeyVault.Fluent.IVault
class-com.microsoft.azure.management.resources.fluentcore.utils.ResourceNamer=Microsoft.Azure.Management.Resource.Fluent.ResourceNamer
class-com.microsoft.azure.management.compute.VirtualMachineScaleSetSkuTypes=Microsoft.Azure.Management.Compute.Fluent.VirtualMachineScaleSetSkuTypes
class-com.microsoft.azure.management.cdn.EndpointResourceState=string
package-com.microsoft.azure.management.appservice.implementation=Microsoft.Azure.Management.AppService.Fluent.Models
package-com.microsoft.azure.management.appservice=Microsoft.Azure.Management.AppService.Fluent.Models
env-com.microsoft.azure.management.apigeneration.model.ISourceGenerator.ProcessOnlyChanges=true
env-com.microsoft.azure.management.apigeneration.model.ISourceGenerator.DiffType=Internal
env-com.microsoft.azure.management.apigeneration.csharp.impl.CSharpInternalSourceDiff.sourceDirPath=
Expand Down

0 comments on commit 4e7f802

Please sign in to comment.