Skip to content

- updates master with latest java changes #293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Sep 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f320610
- adds missing fluent method for odata filter
baywet Sep 10, 2020
e47cc7c
Merge pull request #287 from microsoftgraph/feature/java-filter-fluent
baywet Sep 10, 2020
6e9b342
Nikithauc/typescript beta mainnamespace (#288)
nikithauc Sep 10, 2020
87d278c
- updates unit tests
baywet Sep 11, 2020
6a07d7c
- makes request interfaces inherit from IHttpRequest to avoid requiri…
baywet Sep 11, 2020
ae3d8b4
Typescripts namespace styling change (#289)
nikithauc Sep 11, 2020
2c04586
Merge pull request #290 from microsoftgraph/feature/java-request-inte…
baywet Sep 12, 2020
09e4ecc
- adds missing navigation properties on composable functions in java
baywet Sep 14, 2020
eae476f
- updates test files
baywet Sep 14, 2020
6ee78f9
- fixes whitespace insertion
baywet Sep 15, 2020
97d616a
- adds composable collection test items
baywet Sep 15, 2020
dce6d9d
- updates CHarp test files
baywet Sep 15, 2020
efdca45
- adds composable test function to non-namespace schema
baywet Sep 15, 2020
cbf28dc
- updates objc test files for composable function
baywet Sep 15, 2020
579dcb3
Merge pull request #291 from microsoftgraph/feature/composable-functi…
baywet Sep 15, 2020
ba08383
- adds a vararg support for build request in java templates
baywet Sep 16, 2020
35456e2
- updates test files
baywet Sep 16, 2020
c107eb7
- refactors vararg implementation to reduce the amount of generated code
baywet Sep 16, 2020
8b59be3
- updates test files
baywet Sep 16, 2020
2547b08
Merge pull request #292 from microsoftgraph/feature/varargs-options-java
baywet Sep 16, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@ import <#=mainNamespace#>.<#=c.GetPackagePrefix()#>.<#=c.TypeName()#>;
return (<#=c.TypeCollectionReferenceRequest()#>)this;
}

<# } #>
<# if (c.GetFeatures().CanFilter) { #>
/**
* Sets the filter clause for the request
*
* @param value the filter clause
* @return the updated request
*/
public <#=c.ITypeCollectionReferenceRequest()#> filter(final String value) {
addQueryOption(new com.microsoft.graph.options.QueryOption("$filter", value));
return (<#=c.TypeCollectionReferenceRequest()#>)this;
}

<# } #>
<# if (c.GetFeatures().CanSelect) { #>
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,22 @@ import <#=importNamespace#>.core.IBaseClient;
super(requestUrl, client, requestOptions);
}

public <#=c.ITypeCollectionReferenceRequest()#> buildRequest() {
return buildRequest(getOptions());
/**
* Creates the request
*
* @param requestOptions the options for this request
* @return the IUserRequest instance
*/
public <#=c.ITypeCollectionReferenceRequest()#> buildRequest(final com.microsoft.graph.options.Option... requestOptions) {
return buildRequest(getOptions(requestOptions));
}

/**
* Creates the request
*
* @param requestOptions the options for this request
* @return the IUserRequest instance
*/
public <#=c.ITypeCollectionReferenceRequest()#> buildRequest(final java.util.List<? extends <#=importNamespace#>.options.Option> requestOptions) {
return new <#=c.TypeCollectionReferenceRequest()#>(getRequestUrl(), getClient(), requestOptions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,19 @@ import <#=mainNamespace#>.<#=TypeHelperJava.GetPrefixForRequests()#>.<#=c.TypeCo
return (<#=c.TypeCollectionRequest()#>)this;
}

<# } #>
<# if (c.GetFeatures().CanFilter) { #>
/**
* Sets the filter clause for the request
*
* @param value the filter clause
* @return the updated request
*/
public <#=c.ITypeCollectionRequest()#> filter(final String value) {
addQueryOption(new com.microsoft.graph.options.QueryOption("$filter", value));
return (<#=c.TypeCollectionRequest()#>)this;
}

<# } #>
<# if (c.GetFeatures().CanSelect) { #>
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,22 @@ import <#=importNamespace#>.core.IBaseClient;
super(requestUrl, client, requestOptions);
}

public <#=c.ITypeCollectionRequest()#> buildRequest() {
return buildRequest(getOptions());
/**
* Creates the request
*
* @param requestOptions the options for this request
* @return the IUserRequest instance
*/
public <#=c.ITypeCollectionRequest()#> buildRequest(final com.microsoft.graph.options.Option... requestOptions) {
return buildRequest(getOptions(requestOptions));
}

/**
* Creates the request
*
* @param requestOptions the options for this request
* @return the IUserRequest instance
*/
public <#=c.ITypeCollectionRequest()#> buildRequest(final java.util.List<? extends <#=importNamespace#>.options.Option> requestOptions) {
return new <#=c.TypeCollectionRequest()#>(getRequestUrl(), getClient(), requestOptions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ import <#=importNamespace#>.concurrency.IExecutors;
return (<#=c.TypeCollectionRequest()#>)this;
}

<# } #>
<# if (c.GetFeatures().CanFilter) { #>
public <#=c.ITypeCollectionRequest()#> filter(final String value) {
addQueryOption(new com.microsoft.graph.options.QueryOption("$filter", value));
return (<#=c.TypeCollectionRequest()#>)this;
}

<# } #>
<# if (c.GetFeatures().CanSelect) { #>
public <#=c.ITypeCollectionRequest()#> select(final String value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,22 @@ import <#=importNamespace#>.core.IBaseClient;
super(requestUrl, client, requestOptions);
}

public <#=c.ITypeCollectionWithReferencesRequest()#> buildRequest() {
return buildRequest(getOptions());
/**
* Creates the request
*
* @param requestOptions the options for this request
* @return the IUserRequest instance
*/
public <#=c.ITypeCollectionWithReferencesRequest()#> buildRequest(final com.microsoft.graph.options.Option... requestOptions) {
return buildRequest(getOptions(requestOptions));
}

/**
* Creates the request
*
* @param requestOptions the options for this request
* @return the IUserRequest instance
*/
public <#=c.ITypeCollectionWithReferencesRequest()#> buildRequest(final java.util.List<? extends <#=importNamespace#>.options.Option> requestOptions) {
return new <#=c.TypeCollectionWithReferencesRequest()#>(getRequestUrl(), getClient(), requestOptions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,18 @@ import <#=importNamespace#>.core.IBaseClient;
return (<#=c.TypeReferenceRequest()#>)this;
}
<# } #>
<# if (c.GetFeatures().CanFilter) { #>
/**
* Sets the filter clause for the request
*
* @param value the filter clause
* @return the updated request
*/
public <#=c.ITypeReferenceRequest()#> filter(final String value) {
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$filter", value));
return (<#=c.TypeReferenceRequest()#>)this;
}
<# } #>
<# if (c.GetFeatures().CanUpdate) { #>
/**
* Puts the <#=c.TypeName()#>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ import <#=importNamespace#>.core.IBaseClient;
/**
* Creates the request
*
* @param requestOptions the options for this request
* @return The <#=c.ITypeReferenceRequest()#> instance
*/
public <#=c.ITypeReferenceRequest()#> buildRequest() {
return buildRequest(getOptions());
public <#=c.ITypeReferenceRequest()#> buildRequest(final com.microsoft.graph.options.Option... requestOptions) {
return buildRequest(getOptions(requestOptions));
}

/**
Expand Down
13 changes: 13 additions & 0 deletions Templates/Java/requests_extensions/BaseEntityRequest.java.tt
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,19 @@ import <#=importNamespace#>.http.HttpMethod;
return (<#=c.TypeRequest()#>)this;
}

<# } #>
<# if (c.GetFeatures().CanFilter) { #>
/**
* Sets the filter clause for the request
*
* @param value the filter clause
* @return the updated request
*/
public <#=c.ITypeRequest()#> filter(final String value) {
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$filter", value));
return (<#=c.TypeRequest()#>)this;
}

<# } #>
<# if (c.AsOdcmProperty() != null && c.AsOdcmProperty().IsCollection && c.GetFeatures().CanUseTop) { #>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ import <#=importNamespace#>.http.BaseRequestBuilder;
/**
* Creates the request
*
* @param requestOptions the options for this request
* @return the <#=c.ITypeRequest()#> instance
*/
public <#=c.ITypeRequest()#> buildRequest() {
return buildRequest(getOptions());
public <#=c.ITypeRequest()#> buildRequest(final com.microsoft.graph.options.Option... requestOptions) {
return buildRequest(getOptions(requestOptions));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ import <#=importNamespace#>.http.BaseRequestBuilder;
/**
* Creates the request
*
* @param requestOptions the options for this request
* @return the <#=c.ITypeStreamRequest()#> instance
*/
public <#=c.ITypeStreamRequest()#> buildRequest() {
return buildRequest(getOptions());
public <#=c.ITypeStreamRequest()#> buildRequest(final com.microsoft.graph.options.Option... requestOptions) {
return buildRequest(getOptions(requestOptions));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,16 @@ import <#=importNamespace#>.serializer.IJsonBackedObject;
return (<#=c.TypeWithReferencesRequest()#>)this;
}
<# } #>
<# if (c.GetFeatures().CanFilter) { #>
/**
* Sets the filter clause for the request
*
* @param value the filter clause
* @return the updated request
*/
public <#=c.ITypeWithReferencesRequest()#> filter(final String value) {
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$filter", value));
return (<#=c.TypeWithReferencesRequest()#>)this;
}
<# } #>
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ import <#=importNamespace#>.core.IBaseClient;
/**
* Creates the request
*
* @param requestOptions the options for this request
* @return the <#=c.ITypeWithReferencesRequest()#> instance
*/
public <#=c.ITypeWithReferencesRequest()#> buildRequest() {
return buildRequest(getOptions());
public <#=c.ITypeWithReferencesRequest()#> buildRequest(final com.microsoft.graph.options.Option... requestOptions) {
return buildRequest(getOptions(requestOptions));
}

/**
Expand Down
13 changes: 13 additions & 0 deletions Templates/Java/requests_extensions/BaseMethodBodyRequest.java.tt
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,18 @@ import <#=importNamespace#>.http.HttpMethod;
return (<#=typeRequest#>)this;
}

<# } #>
<# if (c.GetFeatures().CanFilter) { #>
/**
* Sets the filter clause for the request
*
* @param value the filter clause
* @return the updated request
*/
public <#=iTypeRequest#> filter(final String value) {
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$filter", value));
return (<#=typeRequest#>)this;
}

<# } #>
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,18 @@ import <#=importNamespace#>.concurrency.IExecutors;
return (<#=c.ITypeCollectionRequest()#>)this;
}

<# } #>
<# if (c.GetFeatures().CanFilter) { #>
/**
* Sets the filter clause for the request
*
* @param value the filter clause
* @return the updated request
*/
public <#=c.ITypeCollectionRequest()#> filter(final String value) {
addQueryOption(new com.microsoft.graph.options.QueryOption("$filter", value));
return (<#=c.ITypeCollectionRequest()#>)this;
}

<# } #>
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,23 @@ import <#=importNamespace#>.core.<#=c.GetMethodRequestBuilderSuperClass() #>;
<# } #>
}
<# } #>

public <#=c.ITypeCollectionRequest()#> buildRequest() {
return buildRequest(getOptions());

/**
* Creates the request
*
* @param requestOptions the options for this request
* @return the IUserRequest instance
*/
public <#=c.ITypeCollectionRequest()#> buildRequest(final com.microsoft.graph.options.Option... requestOptions) {
return buildRequest(getOptions(requestOptions));
}

/**
* Creates the request
*
* @param requestOptions the options for this request
* @return the IUserRequest instance
*/
public <#=c.ITypeCollectionRequest()#> buildRequest(final java.util.List<? extends <#=importNamespace#>.options.Option> requestOptions) {
<#= c.TypeCollectionRequest()#> request = new <#=c.TypeCollectionRequest()#>(
getRequestUrl(),
Expand Down
30 changes: 30 additions & 0 deletions Templates/Java/requests_extensions/BaseMethodRequest.java.tt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,22 @@ if (c.AsOdcmMethod().IsAction()) {
return (<#=c.TypeRequest()#>)this;
}

<#
}

if (c.GetFeatures().CanFilter) {
#>
/**
* Sets the filter clause for the request
*
* @param value the filter clause
* @return the updated request
*/
public <#=c.ITypeRequest()#> filter(final String value) {
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$filter", value));
return (<#=c.TypeRequest()#>)this;
}

<#
}

Expand Down Expand Up @@ -227,7 +243,21 @@ if (c.AsOdcmMethod().IsAction()) {

<#
}
if (c.GetFeatures().CanFilter) {
#>
/**
* Sets the filter clause for the request
*
* @param value the filter clause
* @return the updated request
*/
public <#=c.ITypeRequest()#> filter(final String value) {
getQueryOptions().add(new com.microsoft.graph.options.QueryOption("$filter", value));
return (<#=c.TypeRequest()#>)this;
}

<#
}
if (c.AsOdcmProperty() != null && c.AsOdcmProperty().IsCollection && c.GetFeatures().CanUseTop) {
#>

Expand Down
Loading