From b9bcc81388fbd2b55d288fbb1a53a7a7766dfe36 Mon Sep 17 00:00:00 2001 From: Gabriel Roldan Date: Tue, 16 Apr 2024 20:36:40 -0300 Subject: [PATCH] New API to delete all rules --- docs/api/index.html | 5488 +++++++++-------- .../adminrules/AdminRuleAdminService.java | 2 + .../adminrules/AdminRuleAdminServiceImpl.java | 5 + .../adminrules/AdminRuleRepository.java | 2 + .../adminrules/MemoryAdminRuleRepository.java | 7 + .../acl/domain/rules/RuleAdminService.java | 2 + .../domain/rules/RuleAdminServiceImpl.java | 5 + .../acl/domain/rules/RuleRepository.java | 2 + .../domain/rules/MemoryRuleRepository.java | 8 + .../acl/domain/rules/RuleAdminServiceIT.java | 20 + .../AdminRuleRepositoryClientAdaptor.java | 5 + .../RuleRepositoryClientAdaptor.java | 5 + .../api/server/rules/DataRulesApiImpl.java | 6 + .../rules/WorkspaceAdminRulesApiImpl.java | 6 + .../AdminRuleRepositoryJpaAdaptor.java | 8 + .../repository/RuleRepositoryJpaAdaptor.java | 8 + src/openapi/acl-api.yaml | 18 + 17 files changed, 3194 insertions(+), 2403 deletions(-) diff --git a/docs/api/index.html b/docs/api/index.html index 5543495..505fee8 100644 --- a/docs/api/index.html +++ b/docs/api/index.html @@ -1362,6 +1362,9 @@
  • createRule
  • +
  • + deleteAllRules +
  • deleteRuleById
  • @@ -1417,6 +1420,9 @@
  • deleteAdminRuleById
  • +
  • + deleteAllAdminRules +
  • findAdminRules
  • @@ -4013,46 +4019,47 @@


    -
    -
    +
    +
    -

    deleteRuleById

    +

    deleteAllRules

    -

    +

    Atomically deletes all data rules and return the number of rules removed


    -
    /rules/id/{id}
    +
    /rules

    Usage and SDK Samples

    -
    +
    curl -X DELETE \
      -H "Authorization: Basic [[basicHash]]" \
    - "/api/rules/id/{id}"
    + -H "Accept: application/json" \
    + "/api/rules"
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -4071,12 +4078,12 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataRulesApi apiInstance = new DataRulesApi(); - String id = id_example; // String | The rule identifier try { - apiInstance.deleteRuleById(id); + 'Integer' result = apiInstance.deleteAllRules(); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DataRulesApi#deleteRuleById"); + System.err.println("Exception when calling DataRulesApi#deleteAllRules"); e.printStackTrace(); } } @@ -4084,45 +4091,44 @@

    Usage and SDK Samples

    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
     
    -final String id = new String(); // String | The rule identifier
     
     try {
    -    final result = await api_instance.deleteRuleById(id);
    +    final result = await api_instance.deleteAllRules();
         print(result);
     } catch (e) {
    -    print('Exception when calling DefaultApi->deleteRuleById: $e\n');
    +    print('Exception when calling DefaultApi->deleteAllRules: $e\n');
     }
     
     
    -
    +
    import org.openapitools.client.api.DataRulesApi;
     
     public class DataRulesApiExample {
         public static void main(String[] args) {
             DataRulesApi apiInstance = new DataRulesApi();
    -        String id = id_example; // String | The rule identifier
     
             try {
    -            apiInstance.deleteRuleById(id);
    +            'Integer' result = apiInstance.deleteAllRules();
    +            System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling DataRulesApi#deleteRuleById");
    +            System.err.println("Exception when calling DataRulesApi#deleteAllRules");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     // Configure HTTP basic authorization (authentication scheme: basicAuth)
     [apiConfig setUsername:@"YOUR_USERNAME"];
    @@ -4130,10 +4136,12 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataRulesApi *apiInstance = [[DataRulesApi alloc] init]; -String *id = id_example; // The rule identifier (default to null) -[apiInstance deleteRuleByIdWith:id - completionHandler: ^(NSError* error) { +[apiInstance deleteAllRulesWithCompletionHandler: + ^('Integer' output, NSError* error) { + if (output) { + NSLog(@"%@", output); + } if (error) { NSLog(@"Error: %@", error); } @@ -4141,7 +4149,7 @@

    Usage and SDK Samples

    -
    +
    var GeoServerAcl = require('geo_server_acl');
     var defaultClient = GeoServerAcl.ApiClient.instance;
     
    @@ -4152,23 +4160,21 @@ 

    Usage and SDK Samples

    // Create an instance of the API class var api = new GeoServerAcl.DataRulesApi() -var id = id_example; // {String} The rule identifier - var callback = function(error, data, response) { if (error) { console.error(error); } else { - console.log('API called successfully.'); + console.log('API called successfully. Returned data: ' + data); } }; -api.deleteRuleById(id, callback); +api.deleteAllRules(callback);
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -4177,7 +4183,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class deleteRuleByIdExample + public class deleteAllRulesExample { public void main() { @@ -4187,12 +4193,12 @@

    Usage and SDK Samples

    // Create an instance of the API class var apiInstance = new DataRulesApi(); - var id = id_example; // String | The rule identifier (default to null) try { - apiInstance.deleteRuleById(id); + 'Integer' result = apiInstance.deleteAllRules(); + Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling DataRulesApi.deleteRuleById: " + e.Message ); + Debug.Print("Exception when calling DataRulesApi.deleteAllRules: " + e.Message ); } } } @@ -4200,7 +4206,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     // Configure HTTP basic authorization: basicAuth
    @@ -4209,17 +4215,17 @@ 

    Usage and SDK Samples

    // Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\DataRulesApi(); -$id = id_example; // String | The rule identifier try { - $api_instance->deleteRuleById($id); + $result = $api_instance->deleteAllRules(); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling DataRulesApi->deleteRuleById: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling DataRulesApi->deleteAllRules: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
     use WWW::OPenAPIClient::DataRulesApi;
    @@ -4229,17 +4235,17 @@ 

    Usage and SDK Samples

    # Create an instance of the API class my $api_instance = WWW::OPenAPIClient::DataRulesApi->new(); -my $id = id_example; # String | The rule identifier eval { - $api_instance->deleteRuleById(id => $id); + my $result = $api_instance->deleteAllRules(); + print Dumper($result); }; if ($@) { - warn "Exception when calling DataRulesApi->deleteRuleById: $@\n"; + warn "Exception when calling DataRulesApi->deleteAllRules: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -4251,22 +4257,21 @@ 

    Usage and SDK Samples

    # Create an instance of the API class api_instance = openapi_client.DataRulesApi() -id = id_example # String | The rule identifier (default to null) try: - api_instance.delete_rule_by_id(id) + api_response = api_instance.delete_all_rules() + pprint(api_response) except ApiException as e: - print("Exception when calling DataRulesApi->deleteRuleById: %s\n" % e)
    + print("Exception when calling DataRulesApi->deleteAllRules: %s\n" % e)
    -
    +
    extern crate DataRulesApi;
     
     pub fn main() {
    -    let id = id_example; // String
     
         let mut context = DataRulesApi::Context::default();
    -    let result = client.deleteRuleById(id, &context).wait();
    +    let result = client.deleteAllRules(&context).wait();
     
         println!("{:?}", result);
     }
    @@ -4281,130 +4286,117 @@ 

    Scopes

    Parameters

    -
    Path parameters
    - - - - - - - - - -
    NameDescription
    id* - - -
    -
    -
    - - String - - -
    -The rule identifier -
    -
    -
    - Required -
    -
    -
    -

    Responses

    -

    -

    +

    +

    - - - -
    -
    -

    -

    - +

    -
    -
    +
    +
    -

    findOneRuleByPriority

    +

    deleteRuleById

    -

    Finds the Rule with the given priority

    +


    -
    /rules/query/one/priority/{priority}
    +
    /rules/id/{id}

    Usage and SDK Samples

    -
    -
    curl -X GET \
    +                          
    +
    curl -X DELETE \
      -H "Authorization: Basic [[basicHash]]" \
    - -H "Accept: application/json,application/x-jackson-smile" \
    - "/api/rules/query/one/priority/{priority}"
    + "/api/rules/id/{id}"
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -4423,13 +4415,12 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataRulesApi apiInstance = new DataRulesApi(); - Long priority = 789; // Long | The rule priority to search for + String id = id_example; // String | The rule identifier try { - Rule result = apiInstance.findOneRuleByPriority(priority); - System.out.println(result); + apiInstance.deleteRuleById(id); } catch (ApiException e) { - System.err.println("Exception when calling DataRulesApi#findOneRuleByPriority"); + System.err.println("Exception when calling DataRulesApi#deleteRuleById"); e.printStackTrace(); } } @@ -4437,46 +4428,45 @@

    Usage and SDK Samples

    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
     
    -final Long priority = new Long(); // Long | The rule priority to search for
    +final String id = new String(); // String | The rule identifier
     
     try {
    -    final result = await api_instance.findOneRuleByPriority(priority);
    +    final result = await api_instance.deleteRuleById(id);
         print(result);
     } catch (e) {
    -    print('Exception when calling DefaultApi->findOneRuleByPriority: $e\n');
    +    print('Exception when calling DefaultApi->deleteRuleById: $e\n');
     }
     
     
    -
    +
    import org.openapitools.client.api.DataRulesApi;
     
     public class DataRulesApiExample {
         public static void main(String[] args) {
             DataRulesApi apiInstance = new DataRulesApi();
    -        Long priority = 789; // Long | The rule priority to search for
    +        String id = id_example; // String | The rule identifier
     
             try {
    -            Rule result = apiInstance.findOneRuleByPriority(priority);
    -            System.out.println(result);
    +            apiInstance.deleteRuleById(id);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling DataRulesApi#findOneRuleByPriority");
    +            System.err.println("Exception when calling DataRulesApi#deleteRuleById");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     // Configure HTTP basic authorization (authentication scheme: basicAuth)
     [apiConfig setUsername:@"YOUR_USERNAME"];
    @@ -4484,13 +4474,10 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataRulesApi *apiInstance = [[DataRulesApi alloc] init]; -Long *priority = 789; // The rule priority to search for (default to null) +String *id = id_example; // The rule identifier (default to null) -[apiInstance findOneRuleByPriorityWith:priority - completionHandler: ^(Rule output, NSError* error) { - if (output) { - NSLog(@"%@", output); - } +[apiInstance deleteRuleByIdWith:id + completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error: %@", error); } @@ -4498,7 +4485,7 @@

    Usage and SDK Samples

    -
    +
    var GeoServerAcl = require('geo_server_acl');
     var defaultClient = GeoServerAcl.ApiClient.instance;
     
    @@ -4509,23 +4496,23 @@ 

    Usage and SDK Samples

    // Create an instance of the API class var api = new GeoServerAcl.DataRulesApi() -var priority = 789; // {Long} The rule priority to search for +var id = id_example; // {String} The rule identifier var callback = function(error, data, response) { if (error) { console.error(error); } else { - console.log('API called successfully. Returned data: ' + data); + console.log('API called successfully.'); } }; -api.findOneRuleByPriority(priority, callback); +api.deleteRuleById(id, callback);
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -4534,7 +4521,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class findOneRuleByPriorityExample + public class deleteRuleByIdExample { public void main() { @@ -4544,13 +4531,12 @@

    Usage and SDK Samples

    // Create an instance of the API class var apiInstance = new DataRulesApi(); - var priority = 789; // Long | The rule priority to search for (default to null) + var id = id_example; // String | The rule identifier (default to null) try { - Rule result = apiInstance.findOneRuleByPriority(priority); - Debug.WriteLine(result); + apiInstance.deleteRuleById(id); } catch (Exception e) { - Debug.Print("Exception when calling DataRulesApi.findOneRuleByPriority: " + e.Message ); + Debug.Print("Exception when calling DataRulesApi.deleteRuleById: " + e.Message ); } } } @@ -4558,7 +4544,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     // Configure HTTP basic authorization: basicAuth
    @@ -4567,18 +4553,17 @@ 

    Usage and SDK Samples

    // Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\DataRulesApi(); -$priority = 789; // Long | The rule priority to search for +$id = id_example; // String | The rule identifier try { - $result = $api_instance->findOneRuleByPriority($priority); - print_r($result); + $api_instance->deleteRuleById($id); } catch (Exception $e) { - echo 'Exception when calling DataRulesApi->findOneRuleByPriority: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling DataRulesApi->deleteRuleById: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
     use WWW::OPenAPIClient::DataRulesApi;
    @@ -4588,18 +4573,17 @@ 

    Usage and SDK Samples

    # Create an instance of the API class my $api_instance = WWW::OPenAPIClient::DataRulesApi->new(); -my $priority = 789; # Long | The rule priority to search for +my $id = id_example; # String | The rule identifier eval { - my $result = $api_instance->findOneRuleByPriority(priority => $priority); - print Dumper($result); + $api_instance->deleteRuleById(id => $id); }; if ($@) { - warn "Exception when calling DataRulesApi->findOneRuleByPriority: $@\n"; + warn "Exception when calling DataRulesApi->deleteRuleById: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -4611,23 +4595,22 @@ 

    Usage and SDK Samples

    # Create an instance of the API class api_instance = openapi_client.DataRulesApi() -priority = 789 # Long | The rule priority to search for (default to null) +id = id_example # String | The rule identifier (default to null) try: - api_response = api_instance.find_one_rule_by_priority(priority) - pprint(api_response) + api_instance.delete_rule_by_id(id) except ApiException as e: - print("Exception when calling DataRulesApi->findOneRuleByPriority: %s\n" % e)
    + print("Exception when calling DataRulesApi->deleteRuleById: %s\n" % e)
    -
    +
    extern crate DataRulesApi;
     
     pub fn main() {
    -    let priority = 789; // Long
    +    let id = id_example; // String
     
         let mut context = DataRulesApi::Context::default();
    -    let result = client.findOneRuleByPriority(priority, &context).wait();
    +    let result = client.deleteRuleById(id, &context).wait();
     
         println!("{:?}", result);
     }
    @@ -4648,22 +4631,19 @@ 

    Parameters

    Name Description - priority* + id* -
    +
    - Long + String - - (int64) -
    -The rule priority to search for +The rule identifier
    @@ -4681,156 +4661,94 @@

    Parameters

    Responses

    -

    -

    +

    +

    -

    -
    -
    +
    +
    -

    getLayerDetailsByRuleId

    +

    findOneRuleByPriority

    -

    Returns the LayerDetails for the Rule with the given identifier

    +

    Finds the Rule with the given priority


    -
    /rules/id/{id}/layer-details
    +
    /rules/query/one/priority/{priority}

    Usage and SDK Samples

    -
    +
    curl -X GET \
      -H "Authorization: Basic [[basicHash]]" \
      -H "Accept: application/json,application/x-jackson-smile" \
    - "/api/rules/id/{id}/layer-details"
    + "/api/rules/query/one/priority/{priority}"
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -4849,13 +4767,13 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataRulesApi apiInstance = new DataRulesApi(); - String id = id_example; // String | The rule identifier + Long priority = 789; // Long | The rule priority to search for try { - LayerDetails result = apiInstance.getLayerDetailsByRuleId(id); + Rule result = apiInstance.findOneRuleByPriority(priority); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DataRulesApi#getLayerDetailsByRuleId"); + System.err.println("Exception when calling DataRulesApi#findOneRuleByPriority"); e.printStackTrace(); } } @@ -4863,46 +4781,46 @@

    Usage and SDK Samples

    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
     
    -final String id = new String(); // String | The rule identifier
    +final Long priority = new Long(); // Long | The rule priority to search for
     
     try {
    -    final result = await api_instance.getLayerDetailsByRuleId(id);
    +    final result = await api_instance.findOneRuleByPriority(priority);
         print(result);
     } catch (e) {
    -    print('Exception when calling DefaultApi->getLayerDetailsByRuleId: $e\n');
    +    print('Exception when calling DefaultApi->findOneRuleByPriority: $e\n');
     }
     
     
    -
    +
    import org.openapitools.client.api.DataRulesApi;
     
     public class DataRulesApiExample {
         public static void main(String[] args) {
             DataRulesApi apiInstance = new DataRulesApi();
    -        String id = id_example; // String | The rule identifier
    +        Long priority = 789; // Long | The rule priority to search for
     
             try {
    -            LayerDetails result = apiInstance.getLayerDetailsByRuleId(id);
    +            Rule result = apiInstance.findOneRuleByPriority(priority);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling DataRulesApi#getLayerDetailsByRuleId");
    +            System.err.println("Exception when calling DataRulesApi#findOneRuleByPriority");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     // Configure HTTP basic authorization (authentication scheme: basicAuth)
     [apiConfig setUsername:@"YOUR_USERNAME"];
    @@ -4910,10 +4828,10 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataRulesApi *apiInstance = [[DataRulesApi alloc] init]; -String *id = id_example; // The rule identifier (default to null) +Long *priority = 789; // The rule priority to search for (default to null) -[apiInstance getLayerDetailsByRuleIdWith:id - completionHandler: ^(LayerDetails output, NSError* error) { +[apiInstance findOneRuleByPriorityWith:priority + completionHandler: ^(Rule output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -4924,7 +4842,7 @@

    Usage and SDK Samples

    -
    +
    var GeoServerAcl = require('geo_server_acl');
     var defaultClient = GeoServerAcl.ApiClient.instance;
     
    @@ -4935,7 +4853,7 @@ 

    Usage and SDK Samples

    // Create an instance of the API class var api = new GeoServerAcl.DataRulesApi() -var id = id_example; // {String} The rule identifier +var priority = 789; // {Long} The rule priority to search for var callback = function(error, data, response) { if (error) { @@ -4944,14 +4862,14 @@

    Usage and SDK Samples

    console.log('API called successfully. Returned data: ' + data); } }; -api.getLayerDetailsByRuleId(id, callback); +api.findOneRuleByPriority(priority, callback);
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -4960,7 +4878,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getLayerDetailsByRuleIdExample + public class findOneRuleByPriorityExample { public void main() { @@ -4970,13 +4888,13 @@

    Usage and SDK Samples

    // Create an instance of the API class var apiInstance = new DataRulesApi(); - var id = id_example; // String | The rule identifier (default to null) + var priority = 789; // Long | The rule priority to search for (default to null) try { - LayerDetails result = apiInstance.getLayerDetailsByRuleId(id); + Rule result = apiInstance.findOneRuleByPriority(priority); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling DataRulesApi.getLayerDetailsByRuleId: " + e.Message ); + Debug.Print("Exception when calling DataRulesApi.findOneRuleByPriority: " + e.Message ); } } } @@ -4984,7 +4902,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     // Configure HTTP basic authorization: basicAuth
    @@ -4993,18 +4911,18 @@ 

    Usage and SDK Samples

    // Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\DataRulesApi(); -$id = id_example; // String | The rule identifier +$priority = 789; // Long | The rule priority to search for try { - $result = $api_instance->getLayerDetailsByRuleId($id); + $result = $api_instance->findOneRuleByPriority($priority); print_r($result); } catch (Exception $e) { - echo 'Exception when calling DataRulesApi->getLayerDetailsByRuleId: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling DataRulesApi->findOneRuleByPriority: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
     use WWW::OPenAPIClient::DataRulesApi;
    @@ -5014,18 +4932,18 @@ 

    Usage and SDK Samples

    # Create an instance of the API class my $api_instance = WWW::OPenAPIClient::DataRulesApi->new(); -my $id = id_example; # String | The rule identifier +my $priority = 789; # Long | The rule priority to search for eval { - my $result = $api_instance->getLayerDetailsByRuleId(id => $id); + my $result = $api_instance->findOneRuleByPriority(priority => $priority); print Dumper($result); }; if ($@) { - warn "Exception when calling DataRulesApi->getLayerDetailsByRuleId: $@\n"; + warn "Exception when calling DataRulesApi->findOneRuleByPriority: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -5037,23 +4955,23 @@ 

    Usage and SDK Samples

    # Create an instance of the API class api_instance = openapi_client.DataRulesApi() -id = id_example # String | The rule identifier (default to null) +priority = 789 # Long | The rule priority to search for (default to null) try: - api_response = api_instance.get_layer_details_by_rule_id(id) + api_response = api_instance.find_one_rule_by_priority(priority) pprint(api_response) except ApiException as e: - print("Exception when calling DataRulesApi->getLayerDetailsByRuleId: %s\n" % e)
    + print("Exception when calling DataRulesApi->findOneRuleByPriority: %s\n" % e)
    -
    +
    extern crate DataRulesApi;
     
     pub fn main() {
    -    let id = id_example; // String
    +    let priority = 789; // Long
     
         let mut context = DataRulesApi::Context::default();
    -    let result = client.getLayerDetailsByRuleId(id, &context).wait();
    +    let result = client.findOneRuleByPriority(priority, &context).wait();
     
         println!("{:?}", result);
     }
    @@ -5074,19 +4992,22 @@ 

    Parameters

    Name Description - id* + priority* -
    +
    - String + Long + + (int64) +
    -The rule identifier +The rule priority to search for
    @@ -5104,23 +5025,23 @@

    Parameters

    Responses

    -

    -

    +

    +

    -

    -
    -
    +
    +
    -

    getRuleById

    +

    getLayerDetailsByRuleId

    -

    Returns the Rule with the given identifier

    +

    Returns the LayerDetails for the Rule with the given identifier


    -
    /rules/id/{id}
    +
    /rules/id/{id}/layer-details

    Usage and SDK Samples

    -
    +
    curl -X GET \
      -H "Authorization: Basic [[basicHash]]" \
      -H "Accept: application/json,application/x-jackson-smile" \
    - "/api/rules/id/{id}"
    + "/api/rules/id/{id}/layer-details"
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -5297,10 +5196,10 @@ 

    Usage and SDK Samples

    String id = id_example; // String | The rule identifier try { - Rule result = apiInstance.getRuleById(id); + LayerDetails result = apiInstance.getLayerDetailsByRuleId(id); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DataRulesApi#getRuleById"); + System.err.println("Exception when calling DataRulesApi#getLayerDetailsByRuleId"); e.printStackTrace(); } } @@ -5308,7 +5207,7 @@

    Usage and SDK Samples

    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
    @@ -5316,16 +5215,16 @@ 

    Usage and SDK Samples

    final String id = new String(); // String | The rule identifier try { - final result = await api_instance.getRuleById(id); + final result = await api_instance.getLayerDetailsByRuleId(id); print(result); } catch (e) { - print('Exception when calling DefaultApi->getRuleById: $e\n'); + print('Exception when calling DefaultApi->getLayerDetailsByRuleId: $e\n'); }
    -
    +
    import org.openapitools.client.api.DataRulesApi;
     
     public class DataRulesApiExample {
    @@ -5334,20 +5233,20 @@ 

    Usage and SDK Samples

    String id = id_example; // String | The rule identifier try { - Rule result = apiInstance.getRuleById(id); + LayerDetails result = apiInstance.getLayerDetailsByRuleId(id); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DataRulesApi#getRuleById"); + System.err.println("Exception when calling DataRulesApi#getLayerDetailsByRuleId"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     // Configure HTTP basic authorization (authentication scheme: basicAuth)
     [apiConfig setUsername:@"YOUR_USERNAME"];
    @@ -5357,8 +5256,8 @@ 

    Usage and SDK Samples

    DataRulesApi *apiInstance = [[DataRulesApi alloc] init]; String *id = id_example; // The rule identifier (default to null) -[apiInstance getRuleByIdWith:id - completionHandler: ^(Rule output, NSError* error) { +[apiInstance getLayerDetailsByRuleIdWith:id + completionHandler: ^(LayerDetails output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -5369,7 +5268,7 @@

    Usage and SDK Samples

    -
    +
    var GeoServerAcl = require('geo_server_acl');
     var defaultClient = GeoServerAcl.ApiClient.instance;
     
    @@ -5389,14 +5288,14 @@ 

    Usage and SDK Samples

    console.log('API called successfully. Returned data: ' + data); } }; -api.getRuleById(id, callback); +api.getLayerDetailsByRuleId(id, callback);
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -5405,7 +5304,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getRuleByIdExample + public class getLayerDetailsByRuleIdExample { public void main() { @@ -5418,10 +5317,10 @@

    Usage and SDK Samples

    var id = id_example; // String | The rule identifier (default to null) try { - Rule result = apiInstance.getRuleById(id); + LayerDetails result = apiInstance.getLayerDetailsByRuleId(id); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling DataRulesApi.getRuleById: " + e.Message ); + Debug.Print("Exception when calling DataRulesApi.getLayerDetailsByRuleId: " + e.Message ); } } } @@ -5429,7 +5328,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     // Configure HTTP basic authorization: basicAuth
    @@ -5441,15 +5340,15 @@ 

    Usage and SDK Samples

    $id = id_example; // String | The rule identifier try { - $result = $api_instance->getRuleById($id); + $result = $api_instance->getLayerDetailsByRuleId($id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling DataRulesApi->getRuleById: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling DataRulesApi->getLayerDetailsByRuleId: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
     use WWW::OPenAPIClient::DataRulesApi;
    @@ -5462,15 +5361,15 @@ 

    Usage and SDK Samples

    my $id = id_example; # String | The rule identifier eval { - my $result = $api_instance->getRuleById(id => $id); + my $result = $api_instance->getLayerDetailsByRuleId(id => $id); print Dumper($result); }; if ($@) { - warn "Exception when calling DataRulesApi->getRuleById: $@\n"; + warn "Exception when calling DataRulesApi->getLayerDetailsByRuleId: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -5485,20 +5384,20 @@ 

    Usage and SDK Samples

    id = id_example # String | The rule identifier (default to null) try: - api_response = api_instance.get_rule_by_id(id) + api_response = api_instance.get_layer_details_by_rule_id(id) pprint(api_response) except ApiException as e: - print("Exception when calling DataRulesApi->getRuleById: %s\n" % e)
    + print("Exception when calling DataRulesApi->getLayerDetailsByRuleId: %s\n" % e)
    -
    +
    extern crate DataRulesApi;
     
     pub fn main() {
         let id = id_example; // String
     
         let mut context = DataRulesApi::Context::default();
    -    let result = client.getRuleById(id, &context).wait();
    +    let result = client.getLayerDetailsByRuleId(id, &context).wait();
     
         println!("{:?}", result);
     }
    @@ -5523,7 +5422,7 @@ 

    Parameters

    -
    +
    @@ -5549,23 +5448,23 @@

    Parameters

    Responses

    -

    -

    +

    +

    -

    -
    -
    +
    +
    -

    getRules

    +

    getRuleById

    -

    Returns an (optionally) paginated list of rules. See also the count operation.

    +

    Returns the Rule with the given identifier


    -
    /rules
    +
    /rules/id/{id}

    Usage and SDK Samples

    -
    +
    curl -X GET \
      -H "Authorization: Basic [[basicHash]]" \
      -H "Accept: application/json,application/x-jackson-smile" \
    - "/api/rules?limit=56&nextCursor=nextCursor_example"
    + "/api/rules/id/{id}"
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -5695,14 +5638,13 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataRulesApi apiInstance = new DataRulesApi(); - Integer limit = 56; // Integer | Maximum number of rules to return from the query. If there are more rules, the response will return an X-ACL-NEXTCURSOR header with a value that can be used for the nextCursor parameter on a subsequent request, until X-ACL-NEXTCURSOR is null - String nextCursor = nextCursor_example; // String | The next cursor identifier when doing cursor paging, as returned by the X-ACL-NEXTCURSOR response header + String id = id_example; // String | The rule identifier try { - array[Rule] result = apiInstance.getRules(limit, nextCursor); + Rule result = apiInstance.getRuleById(id); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DataRulesApi#getRules"); + System.err.println("Exception when calling DataRulesApi#getRuleById"); e.printStackTrace(); } } @@ -5710,48 +5652,46 @@

    Usage and SDK Samples

    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
     
    -final Integer limit = new Integer(); // Integer | Maximum number of rules to return from the query. If there are more rules, the response will return an X-ACL-NEXTCURSOR header with a value that can be used for the nextCursor parameter on a subsequent request, until X-ACL-NEXTCURSOR is null
    -final String nextCursor = new String(); // String | The next cursor identifier when doing cursor paging, as returned by the X-ACL-NEXTCURSOR response header
    +final String id = new String(); // String | The rule identifier
     
     try {
    -    final result = await api_instance.getRules(limit, nextCursor);
    +    final result = await api_instance.getRuleById(id);
         print(result);
     } catch (e) {
    -    print('Exception when calling DefaultApi->getRules: $e\n');
    +    print('Exception when calling DefaultApi->getRuleById: $e\n');
     }
     
     
    -
    +
    import org.openapitools.client.api.DataRulesApi;
     
     public class DataRulesApiExample {
         public static void main(String[] args) {
             DataRulesApi apiInstance = new DataRulesApi();
    -        Integer limit = 56; // Integer | Maximum number of rules to return from the query. If there are more rules, the response will return an X-ACL-NEXTCURSOR header with a value that can be used for the nextCursor parameter on a subsequent request, until X-ACL-NEXTCURSOR is null
    -        String nextCursor = nextCursor_example; // String | The next cursor identifier when doing cursor paging, as returned by the X-ACL-NEXTCURSOR response header
    +        String id = id_example; // String | The rule identifier
     
             try {
    -            array[Rule] result = apiInstance.getRules(limit, nextCursor);
    +            Rule result = apiInstance.getRuleById(id);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling DataRulesApi#getRules");
    +            System.err.println("Exception when calling DataRulesApi#getRuleById");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     // Configure HTTP basic authorization (authentication scheme: basicAuth)
     [apiConfig setUsername:@"YOUR_USERNAME"];
    @@ -5759,12 +5699,10 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataRulesApi *apiInstance = [[DataRulesApi alloc] init]; -Integer *limit = 56; // Maximum number of rules to return from the query. If there are more rules, the response will return an X-ACL-NEXTCURSOR header with a value that can be used for the nextCursor parameter on a subsequent request, until X-ACL-NEXTCURSOR is null (optional) (default to null) -String *nextCursor = nextCursor_example; // The next cursor identifier when doing cursor paging, as returned by the X-ACL-NEXTCURSOR response header (optional) (default to null) +String *id = id_example; // The rule identifier (default to null) -[apiInstance getRulesWith:limit - nextCursor:nextCursor - completionHandler: ^(array[Rule] output, NSError* error) { +[apiInstance getRuleByIdWith:id + completionHandler: ^(Rule output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -5775,7 +5713,7 @@

    Usage and SDK Samples

    -
    +
    var GeoServerAcl = require('geo_server_acl');
     var defaultClient = GeoServerAcl.ApiClient.instance;
     
    @@ -5786,10 +5724,7 @@ 

    Usage and SDK Samples

    // Create an instance of the API class var api = new GeoServerAcl.DataRulesApi() -var opts = { - 'limit': 56, // {Integer} Maximum number of rules to return from the query. If there are more rules, the response will return an X-ACL-NEXTCURSOR header with a value that can be used for the nextCursor parameter on a subsequent request, until X-ACL-NEXTCURSOR is null - 'nextCursor': nextCursor_example // {String} The next cursor identifier when doing cursor paging, as returned by the X-ACL-NEXTCURSOR response header -}; +var id = id_example; // {String} The rule identifier var callback = function(error, data, response) { if (error) { @@ -5798,14 +5733,14 @@

    Usage and SDK Samples

    console.log('API called successfully. Returned data: ' + data); } }; -api.getRules(opts, callback); +api.getRuleById(id, callback);
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -5814,7 +5749,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getRulesExample + public class getRuleByIdExample { public void main() { @@ -5824,14 +5759,13 @@

    Usage and SDK Samples

    // Create an instance of the API class var apiInstance = new DataRulesApi(); - var limit = 56; // Integer | Maximum number of rules to return from the query. If there are more rules, the response will return an X-ACL-NEXTCURSOR header with a value that can be used for the nextCursor parameter on a subsequent request, until X-ACL-NEXTCURSOR is null (optional) (default to null) - var nextCursor = nextCursor_example; // String | The next cursor identifier when doing cursor paging, as returned by the X-ACL-NEXTCURSOR response header (optional) (default to null) + var id = id_example; // String | The rule identifier (default to null) try { - array[Rule] result = apiInstance.getRules(limit, nextCursor); + Rule result = apiInstance.getRuleById(id); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling DataRulesApi.getRules: " + e.Message ); + Debug.Print("Exception when calling DataRulesApi.getRuleById: " + e.Message ); } } } @@ -5839,7 +5773,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     // Configure HTTP basic authorization: basicAuth
    @@ -5848,19 +5782,18 @@ 

    Usage and SDK Samples

    // Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\DataRulesApi(); -$limit = 56; // Integer | Maximum number of rules to return from the query. If there are more rules, the response will return an X-ACL-NEXTCURSOR header with a value that can be used for the nextCursor parameter on a subsequent request, until X-ACL-NEXTCURSOR is null -$nextCursor = nextCursor_example; // String | The next cursor identifier when doing cursor paging, as returned by the X-ACL-NEXTCURSOR response header +$id = id_example; // String | The rule identifier try { - $result = $api_instance->getRules($limit, $nextCursor); + $result = $api_instance->getRuleById($id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling DataRulesApi->getRules: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling DataRulesApi->getRuleById: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
     use WWW::OPenAPIClient::DataRulesApi;
    @@ -5870,19 +5803,18 @@ 

    Usage and SDK Samples

    # Create an instance of the API class my $api_instance = WWW::OPenAPIClient::DataRulesApi->new(); -my $limit = 56; # Integer | Maximum number of rules to return from the query. If there are more rules, the response will return an X-ACL-NEXTCURSOR header with a value that can be used for the nextCursor parameter on a subsequent request, until X-ACL-NEXTCURSOR is null -my $nextCursor = nextCursor_example; # String | The next cursor identifier when doing cursor paging, as returned by the X-ACL-NEXTCURSOR response header +my $id = id_example; # String | The rule identifier eval { - my $result = $api_instance->getRules(limit => $limit, nextCursor => $nextCursor); + my $result = $api_instance->getRuleById(id => $id); print Dumper($result); }; if ($@) { - warn "Exception when calling DataRulesApi->getRules: $@\n"; + warn "Exception when calling DataRulesApi->getRuleById: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -5894,25 +5826,23 @@ 

    Usage and SDK Samples

    # Create an instance of the API class api_instance = openapi_client.DataRulesApi() -limit = 56 # Integer | Maximum number of rules to return from the query. If there are more rules, the response will return an X-ACL-NEXTCURSOR header with a value that can be used for the nextCursor parameter on a subsequent request, until X-ACL-NEXTCURSOR is null (optional) (default to null) -nextCursor = nextCursor_example # String | The next cursor identifier when doing cursor paging, as returned by the X-ACL-NEXTCURSOR response header (optional) (default to null) +id = id_example # String | The rule identifier (default to null) try: - api_response = api_instance.get_rules(limit=limit, nextCursor=nextCursor) + api_response = api_instance.get_rule_by_id(id) pprint(api_response) except ApiException as e: - print("Exception when calling DataRulesApi->getRules: %s\n" % e)
    + print("Exception when calling DataRulesApi->getRuleById: %s\n" % e)
    -
    +
    extern crate DataRulesApi;
     
     pub fn main() {
    -    let limit = 56; // Integer
    -    let nextCursor = nextCursor_example; // String
    +    let id = id_example; // String
     
         let mut context = DataRulesApi::Context::default();
    -    let result = client.getRules(limit, nextCursor, &context).wait();
    +    let result = client.getRuleById(id, &context).wait();
     
         println!("{:?}", result);
     }
    @@ -5927,90 +5857,70 @@ 

    Scopes

    Parameters

    - - - - -
    Query parameters
    +
    Path parameters
    - - - - - + + + + + - -
    NameDescription
    limit
    NameDescription
    id* -
    +
    - Integer + String
    -Maximum number of rules to return from the query. If there are more rules, the response will return an X-ACL-NEXTCURSOR header with a value that can be used for the nextCursor parameter on a subsequent request, until X-ACL-NEXTCURSOR is null +The rule identifier
    +
    + Required +
    nextCursor +
    -
    -
    -
    - - String - -
    -The next cursor identifier when doing cursor paging, as returned by the X-ACL-NEXTCURSOR response header -
    -
    -
    -
    - - -

    Responses

    -

    -

    +

    +

    -

    -
    -
    +
    +
    -

    queryRules

    +

    getRules

    -

    +

    Returns an (optionally) paginated list of rules. See also the count operation.


    -
    /rules/query
    +
    /rules

    Usage and SDK Samples

    -
    -
    curl -X POST \
    +                          
    +
    curl -X GET \
      -H "Authorization: Basic [[basicHash]]" \
      -H "Accept: application/json,application/x-jackson-smile" \
    - -H "Content-Type: application/json,application/x-jackson-smile" \
    - "/api/rules/query?limit=56&nextCursor=nextCursor_example" \
    - -d '{
    -  "request" : {
    -    "includeDefault" : true,
    -    "value" : "value"
    -  },
    -  "workspace" : {
    -    "includeDefault" : true,
    -    "value" : "value"
    -  },
    -  "subfield" : {
    -    "includeDefault" : true,
    -    "value" : "value"
    -  },
    -  "sourceAddress" : {
    -    "includeDefault" : true,
    -    "value" : "value"
    -  },
    -  "service" : {
    -    "includeDefault" : true,
    -    "value" : "value"
    -  },
    -  "roles" : {
    -    "values" : [ "values", "values" ],
    -    "includeDefault" : true
    -  },
    -  "user" : {
    -    "includeDefault" : true,
    -    "value" : "value"
    -  },
    -  "layer" : {
    -    "includeDefault" : true,
    -    "value" : "value"
    -  }
    -}' \
    - -d 'Custom MIME type example not yet supported: application/x-jackson-smile'
    + "/api/rules?limit=56&nextCursor=nextCursor_example"
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -6161,13 +6041,12 @@ 

    Usage and SDK Samples

    DataRulesApi apiInstance = new DataRulesApi(); Integer limit = 56; // Integer | Maximum number of rules to return from the query. If there are more rules, the response will return an X-ACL-NEXTCURSOR header with a value that can be used for the nextCursor parameter on a subsequent request, until X-ACL-NEXTCURSOR is null String nextCursor = nextCursor_example; // String | The next cursor identifier when doing cursor paging, as returned by the X-ACL-NEXTCURSOR response header - RuleFilter ruleFilter = ; // RuleFilter | try { - array[Rule] result = apiInstance.queryRules(limit, nextCursor, ruleFilter); + array[Rule] result = apiInstance.getRules(limit, nextCursor); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DataRulesApi#queryRules"); + System.err.println("Exception when calling DataRulesApi#getRules"); e.printStackTrace(); } } @@ -6175,26 +6054,25 @@

    Usage and SDK Samples

    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
     
     final Integer limit = new Integer(); // Integer | Maximum number of rules to return from the query. If there are more rules, the response will return an X-ACL-NEXTCURSOR header with a value that can be used for the nextCursor parameter on a subsequent request, until X-ACL-NEXTCURSOR is null
     final String nextCursor = new String(); // String | The next cursor identifier when doing cursor paging, as returned by the X-ACL-NEXTCURSOR response header
    -final RuleFilter ruleFilter = new RuleFilter(); // RuleFilter | 
     
     try {
    -    final result = await api_instance.queryRules(limit, nextCursor, ruleFilter);
    +    final result = await api_instance.getRules(limit, nextCursor);
         print(result);
     } catch (e) {
    -    print('Exception when calling DefaultApi->queryRules: $e\n');
    +    print('Exception when calling DefaultApi->getRules: $e\n');
     }
     
     
    -
    +
    import org.openapitools.client.api.DataRulesApi;
     
     public class DataRulesApiExample {
    @@ -6202,23 +6080,22 @@ 

    Usage and SDK Samples

    DataRulesApi apiInstance = new DataRulesApi(); Integer limit = 56; // Integer | Maximum number of rules to return from the query. If there are more rules, the response will return an X-ACL-NEXTCURSOR header with a value that can be used for the nextCursor parameter on a subsequent request, until X-ACL-NEXTCURSOR is null String nextCursor = nextCursor_example; // String | The next cursor identifier when doing cursor paging, as returned by the X-ACL-NEXTCURSOR response header - RuleFilter ruleFilter = ; // RuleFilter | try { - array[Rule] result = apiInstance.queryRules(limit, nextCursor, ruleFilter); + array[Rule] result = apiInstance.getRules(limit, nextCursor); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DataRulesApi#queryRules"); + System.err.println("Exception when calling DataRulesApi#getRules"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     // Configure HTTP basic authorization (authentication scheme: basicAuth)
     [apiConfig setUsername:@"YOUR_USERNAME"];
    @@ -6228,11 +6105,9 @@ 

    Usage and SDK Samples

    DataRulesApi *apiInstance = [[DataRulesApi alloc] init]; Integer *limit = 56; // Maximum number of rules to return from the query. If there are more rules, the response will return an X-ACL-NEXTCURSOR header with a value that can be used for the nextCursor parameter on a subsequent request, until X-ACL-NEXTCURSOR is null (optional) (default to null) String *nextCursor = nextCursor_example; // The next cursor identifier when doing cursor paging, as returned by the X-ACL-NEXTCURSOR response header (optional) (default to null) -RuleFilter *ruleFilter = ; // (optional) -[apiInstance queryRulesWith:limit +[apiInstance getRulesWith:limit nextCursor:nextCursor - ruleFilter:ruleFilter completionHandler: ^(array[Rule] output, NSError* error) { if (output) { NSLog(@"%@", output); @@ -6244,7 +6119,7 @@

    Usage and SDK Samples

    -
    +
    var GeoServerAcl = require('geo_server_acl');
     var defaultClient = GeoServerAcl.ApiClient.instance;
     
    @@ -6257,8 +6132,7 @@ 

    Usage and SDK Samples

    var api = new GeoServerAcl.DataRulesApi() var opts = { 'limit': 56, // {Integer} Maximum number of rules to return from the query. If there are more rules, the response will return an X-ACL-NEXTCURSOR header with a value that can be used for the nextCursor parameter on a subsequent request, until X-ACL-NEXTCURSOR is null - 'nextCursor': nextCursor_example, // {String} The next cursor identifier when doing cursor paging, as returned by the X-ACL-NEXTCURSOR response header - 'ruleFilter': // {RuleFilter} + 'nextCursor': nextCursor_example // {String} The next cursor identifier when doing cursor paging, as returned by the X-ACL-NEXTCURSOR response header }; var callback = function(error, data, response) { @@ -6268,14 +6142,14 @@

    Usage and SDK Samples

    console.log('API called successfully. Returned data: ' + data); } }; -api.queryRules(opts, callback); +api.getRules(opts, callback);
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -6284,7 +6158,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class queryRulesExample + public class getRulesExample { public void main() { @@ -6296,13 +6170,12 @@

    Usage and SDK Samples

    var apiInstance = new DataRulesApi(); var limit = 56; // Integer | Maximum number of rules to return from the query. If there are more rules, the response will return an X-ACL-NEXTCURSOR header with a value that can be used for the nextCursor parameter on a subsequent request, until X-ACL-NEXTCURSOR is null (optional) (default to null) var nextCursor = nextCursor_example; // String | The next cursor identifier when doing cursor paging, as returned by the X-ACL-NEXTCURSOR response header (optional) (default to null) - var ruleFilter = new RuleFilter(); // RuleFilter | (optional) try { - array[Rule] result = apiInstance.queryRules(limit, nextCursor, ruleFilter); + array[Rule] result = apiInstance.getRules(limit, nextCursor); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling DataRulesApi.queryRules: " + e.Message ); + Debug.Print("Exception when calling DataRulesApi.getRules: " + e.Message ); } } } @@ -6310,7 +6183,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     // Configure HTTP basic authorization: basicAuth
    @@ -6321,18 +6194,17 @@ 

    Usage and SDK Samples

    $api_instance = new OpenAPITools\Client\Api\DataRulesApi(); $limit = 56; // Integer | Maximum number of rules to return from the query. If there are more rules, the response will return an X-ACL-NEXTCURSOR header with a value that can be used for the nextCursor parameter on a subsequent request, until X-ACL-NEXTCURSOR is null $nextCursor = nextCursor_example; // String | The next cursor identifier when doing cursor paging, as returned by the X-ACL-NEXTCURSOR response header -$ruleFilter = ; // RuleFilter | try { - $result = $api_instance->queryRules($limit, $nextCursor, $ruleFilter); + $result = $api_instance->getRules($limit, $nextCursor); print_r($result); } catch (Exception $e) { - echo 'Exception when calling DataRulesApi->queryRules: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling DataRulesApi->getRules: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
     use WWW::OPenAPIClient::DataRulesApi;
    @@ -6344,18 +6216,17 @@ 

    Usage and SDK Samples

    my $api_instance = WWW::OPenAPIClient::DataRulesApi->new(); my $limit = 56; # Integer | Maximum number of rules to return from the query. If there are more rules, the response will return an X-ACL-NEXTCURSOR header with a value that can be used for the nextCursor parameter on a subsequent request, until X-ACL-NEXTCURSOR is null my $nextCursor = nextCursor_example; # String | The next cursor identifier when doing cursor paging, as returned by the X-ACL-NEXTCURSOR response header -my $ruleFilter = WWW::OPenAPIClient::Object::RuleFilter->new(); # RuleFilter | eval { - my $result = $api_instance->queryRules(limit => $limit, nextCursor => $nextCursor, ruleFilter => $ruleFilter); + my $result = $api_instance->getRules(limit => $limit, nextCursor => $nextCursor); print Dumper($result); }; if ($@) { - warn "Exception when calling DataRulesApi->queryRules: $@\n"; + warn "Exception when calling DataRulesApi->getRules: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -6369,25 +6240,23 @@ 

    Usage and SDK Samples

    api_instance = openapi_client.DataRulesApi() limit = 56 # Integer | Maximum number of rules to return from the query. If there are more rules, the response will return an X-ACL-NEXTCURSOR header with a value that can be used for the nextCursor parameter on a subsequent request, until X-ACL-NEXTCURSOR is null (optional) (default to null) nextCursor = nextCursor_example # String | The next cursor identifier when doing cursor paging, as returned by the X-ACL-NEXTCURSOR response header (optional) (default to null) -ruleFilter = # RuleFilter | (optional) try: - api_response = api_instance.query_rules(limit=limit, nextCursor=nextCursor, ruleFilter=ruleFilter) + api_response = api_instance.get_rules(limit=limit, nextCursor=nextCursor) pprint(api_response) except ApiException as e: - print("Exception when calling DataRulesApi->queryRules: %s\n" % e)
    + print("Exception when calling DataRulesApi->getRules: %s\n" % e)
    -
    +
    extern crate DataRulesApi;
     
     pub fn main() {
         let limit = 56; // Integer
         let nextCursor = nextCursor_example; // String
    -    let ruleFilter = ; // RuleFilter
     
         let mut context = DataRulesApi::Context::default();
    -    let result = client.queryRules(limit, nextCursor, ruleFilter, &context).wait();
    +    let result = client.getRules(limit, nextCursor, &context).wait();
     
         println!("{:?}", result);
     }
    @@ -6404,57 +6273,6 @@ 

    Parameters

    -
    Body parameters
    - - - - - - - - - -
    NameDescription
    ruleFilter -

    - -
    -
    Query parameters
    @@ -6467,7 +6285,7 @@

    Parameters

    -
    +
    @@ -6487,7 +6305,7 @@

    Parameters

    -
    +
    @@ -6506,37 +6324,37 @@

    Parameters

    Responses

    -

    -

    - -

    -
    -
    +
    +
    -

    setRuleAllowedStyles

    +

    ruleExistsById

    -

    +

    Returns the Rule with the given identifier


    -
    /rules/id/{id}/styles
    +
    /rules/id/{id}/exists

    Usage and SDK Samples

    -
    -
    curl -X PUT \
    +                          
    +
    curl -X GET \
      -H "Authorization: Basic [[basicHash]]" \
    - -H "Content-Type: application/json,application/x-jackson-smile" \
    - "/api/rules/id/{id}/styles" \
    - -d 'Custom MIME type example not yet supported: application/x-jackson-smile'
    + -H "Accept: application/json,application/x-jackson-smile" \
    + "/api/rules/id/{id}/exists"
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -7030,12 +6994,12 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataRulesApi apiInstance = new DataRulesApi(); String id = id_example; // String | The rule identifier - set[String] string = ; // set[String] | try { - apiInstance.setRuleAllowedStyles(id, string); + 'Boolean' result = apiInstance.ruleExistsById(id); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DataRulesApi#setRuleAllowedStyles"); + System.err.println("Exception when calling DataRulesApi#ruleExistsById"); e.printStackTrace(); } } @@ -7043,47 +7007,46 @@

    Usage and SDK Samples

    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
     
     final String id = new String(); // String | The rule identifier
    -final set[String] string = new set[String](); // set[String] | 
     
     try {
    -    final result = await api_instance.setRuleAllowedStyles(id, string);
    +    final result = await api_instance.ruleExistsById(id);
         print(result);
     } catch (e) {
    -    print('Exception when calling DefaultApi->setRuleAllowedStyles: $e\n');
    +    print('Exception when calling DefaultApi->ruleExistsById: $e\n');
     }
     
     
    -
    +
    import org.openapitools.client.api.DataRulesApi;
     
     public class DataRulesApiExample {
         public static void main(String[] args) {
             DataRulesApi apiInstance = new DataRulesApi();
             String id = id_example; // String | The rule identifier
    -        set[String] string = ; // set[String] | 
     
             try {
    -            apiInstance.setRuleAllowedStyles(id, string);
    +            'Boolean' result = apiInstance.ruleExistsById(id);
    +            System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling DataRulesApi#setRuleAllowedStyles");
    +            System.err.println("Exception when calling DataRulesApi#ruleExistsById");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     // Configure HTTP basic authorization (authentication scheme: basicAuth)
     [apiConfig setUsername:@"YOUR_USERNAME"];
    @@ -7092,11 +7055,12 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataRulesApi *apiInstance = [[DataRulesApi alloc] init]; String *id = id_example; // The rule identifier (default to null) -set[String] *string = ; // (optional) -[apiInstance setRuleAllowedStylesWith:id - string:string - completionHandler: ^(NSError* error) { +[apiInstance ruleExistsByIdWith:id + completionHandler: ^('Boolean' output, NSError* error) { + if (output) { + NSLog(@"%@", output); + } if (error) { NSLog(@"Error: %@", error); } @@ -7104,7 +7068,7 @@

    Usage and SDK Samples

    -
    +
    var GeoServerAcl = require('geo_server_acl');
     var defaultClient = GeoServerAcl.ApiClient.instance;
     
    @@ -7116,25 +7080,22 @@ 

    Usage and SDK Samples

    // Create an instance of the API class var api = new GeoServerAcl.DataRulesApi() var id = id_example; // {String} The rule identifier -var opts = { - 'string': // {set[String]} -}; var callback = function(error, data, response) { if (error) { console.error(error); } else { - console.log('API called successfully.'); + console.log('API called successfully. Returned data: ' + data); } }; -api.setRuleAllowedStyles(id, opts, callback); +api.ruleExistsById(id, callback);
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -7143,7 +7104,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class setRuleAllowedStylesExample + public class ruleExistsByIdExample { public void main() { @@ -7154,12 +7115,12 @@

    Usage and SDK Samples

    // Create an instance of the API class var apiInstance = new DataRulesApi(); var id = id_example; // String | The rule identifier (default to null) - var string = new set[String](); // set[String] | (optional) try { - apiInstance.setRuleAllowedStyles(id, string); + 'Boolean' result = apiInstance.ruleExistsById(id); + Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling DataRulesApi.setRuleAllowedStyles: " + e.Message ); + Debug.Print("Exception when calling DataRulesApi.ruleExistsById: " + e.Message ); } } } @@ -7167,7 +7128,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     // Configure HTTP basic authorization: basicAuth
    @@ -7177,17 +7138,17 @@ 

    Usage and SDK Samples

    // Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\DataRulesApi(); $id = id_example; // String | The rule identifier -$string = ; // set[String] | try { - $api_instance->setRuleAllowedStyles($id, $string); + $result = $api_instance->ruleExistsById($id); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling DataRulesApi->setRuleAllowedStyles: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling DataRulesApi->ruleExistsById: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
     use WWW::OPenAPIClient::DataRulesApi;
    @@ -7198,17 +7159,17 @@ 

    Usage and SDK Samples

    # Create an instance of the API class my $api_instance = WWW::OPenAPIClient::DataRulesApi->new(); my $id = id_example; # String | The rule identifier -my $string = [WWW::OPenAPIClient::Object::set[String]->new()]; # set[String] | eval { - $api_instance->setRuleAllowedStyles(id => $id, string => $string); + my $result = $api_instance->ruleExistsById(id => $id); + print Dumper($result); }; if ($@) { - warn "Exception when calling DataRulesApi->setRuleAllowedStyles: $@\n"; + warn "Exception when calling DataRulesApi->ruleExistsById: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -7221,23 +7182,22 @@ 

    Usage and SDK Samples

    # Create an instance of the API class api_instance = openapi_client.DataRulesApi() id = id_example # String | The rule identifier (default to null) -string = # set[String] | (optional) try: - api_instance.set_rule_allowed_styles(id, string=string) + api_response = api_instance.rule_exists_by_id(id) + pprint(api_response) except ApiException as e: - print("Exception when calling DataRulesApi->setRuleAllowedStyles: %s\n" % e)
    + print("Exception when calling DataRulesApi->ruleExistsById: %s\n" % e)
    -
    +
    extern crate DataRulesApi;
     
     pub fn main() {
         let id = id_example; // String
    -    let string = ; // set[String]
     
         let mut context = DataRulesApi::Context::default();
    -    let result = client.setRuleAllowedStyles(id, string, &context).wait();
    +    let result = client.ruleExistsById(id, &context).wait();
     
         println!("{:?}", result);
     }
    @@ -7262,7 +7222,7 @@ 

    Parameters

    -
    +
    @@ -7284,122 +7244,79 @@

    Parameters

    -
    Body parameters
    - - - - - - - - - -
    NameDescription
    string -

    - -
    -

    Responses

    -

    -

    +

    +

    - - - -
    -
    -

    -

    - +

    -
    -
    +
    +
    -

    setRuleLayerDetails

    +

    setRuleAllowedStyles

    @@ -7408,52 +7325,36 @@

    setRuleLayerDetails


    -
    /rules/id/{id}/layer-details
    +
    /rules/id/{id}/styles

    Usage and SDK Samples

    -
    +
    curl -X PUT \
      -H "Authorization: Basic [[basicHash]]" \
      -H "Content-Type: application/json,application/x-jackson-smile" \
    - "/api/rules/id/{id}/layer-details" \
    - -d '{
    -  "cqlFilterWrite" : "cqlFilterWrite",
    -  "cqlFilterRead" : "cqlFilterRead",
    -  "defaultStyle" : "defaultStyle",
    -  "allowedStyles" : [ "allowedStyles", "allowedStyles" ],
    -  "type" : "VECTOR",
    -  "layerAttributes" : [ {
    -    "access" : "NONE",
    -    "dataType" : "dataType",
    -    "name" : "name"
    -  }, {
    -    "access" : "NONE",
    -    "dataType" : "dataType",
    -    "name" : "name"
    -  } ]
    -}' \
    + "/api/rules/id/{id}/styles" \
      -d 'Custom MIME type example not yet supported: application/x-jackson-smile'
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -7473,12 +7374,12 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataRulesApi apiInstance = new DataRulesApi(); String id = id_example; // String | The rule identifier - LayerDetails layerDetails = ; // LayerDetails | + set[String] string = ; // set[String] | try { - apiInstance.setRuleLayerDetails(id, layerDetails); + apiInstance.setRuleAllowedStyles(id, string); } catch (ApiException e) { - System.err.println("Exception when calling DataRulesApi#setRuleLayerDetails"); + System.err.println("Exception when calling DataRulesApi#setRuleAllowedStyles"); e.printStackTrace(); } } @@ -7486,47 +7387,47 @@

    Usage and SDK Samples

    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
     
     final String id = new String(); // String | The rule identifier
    -final LayerDetails layerDetails = new LayerDetails(); // LayerDetails | 
    +final set[String] string = new set[String](); // set[String] | 
     
     try {
    -    final result = await api_instance.setRuleLayerDetails(id, layerDetails);
    +    final result = await api_instance.setRuleAllowedStyles(id, string);
         print(result);
     } catch (e) {
    -    print('Exception when calling DefaultApi->setRuleLayerDetails: $e\n');
    +    print('Exception when calling DefaultApi->setRuleAllowedStyles: $e\n');
     }
     
     
    -
    +
    import org.openapitools.client.api.DataRulesApi;
     
     public class DataRulesApiExample {
         public static void main(String[] args) {
             DataRulesApi apiInstance = new DataRulesApi();
             String id = id_example; // String | The rule identifier
    -        LayerDetails layerDetails = ; // LayerDetails | 
    +        set[String] string = ; // set[String] | 
     
             try {
    -            apiInstance.setRuleLayerDetails(id, layerDetails);
    +            apiInstance.setRuleAllowedStyles(id, string);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling DataRulesApi#setRuleLayerDetails");
    +            System.err.println("Exception when calling DataRulesApi#setRuleAllowedStyles");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     // Configure HTTP basic authorization (authentication scheme: basicAuth)
     [apiConfig setUsername:@"YOUR_USERNAME"];
    @@ -7535,10 +7436,10 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataRulesApi *apiInstance = [[DataRulesApi alloc] init]; String *id = id_example; // The rule identifier (default to null) -LayerDetails *layerDetails = ; // (optional) +set[String] *string = ; // (optional) -[apiInstance setRuleLayerDetailsWith:id - layerDetails:layerDetails +[apiInstance setRuleAllowedStylesWith:id + string:string completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error: %@", error); @@ -7547,7 +7448,7 @@

    Usage and SDK Samples

    -
    +
    var GeoServerAcl = require('geo_server_acl');
     var defaultClient = GeoServerAcl.ApiClient.instance;
     
    @@ -7560,7 +7461,7 @@ 

    Usage and SDK Samples

    var api = new GeoServerAcl.DataRulesApi() var id = id_example; // {String} The rule identifier var opts = { - 'layerDetails': // {LayerDetails} + 'string': // {set[String]} }; var callback = function(error, data, response) { @@ -7570,14 +7471,14 @@

    Usage and SDK Samples

    console.log('API called successfully.'); } }; -api.setRuleLayerDetails(id, opts, callback); +api.setRuleAllowedStyles(id, opts, callback);
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -7586,7 +7487,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class setRuleLayerDetailsExample + public class setRuleAllowedStylesExample { public void main() { @@ -7597,12 +7498,12 @@

    Usage and SDK Samples

    // Create an instance of the API class var apiInstance = new DataRulesApi(); var id = id_example; // String | The rule identifier (default to null) - var layerDetails = new LayerDetails(); // LayerDetails | (optional) + var string = new set[String](); // set[String] | (optional) try { - apiInstance.setRuleLayerDetails(id, layerDetails); + apiInstance.setRuleAllowedStyles(id, string); } catch (Exception e) { - Debug.Print("Exception when calling DataRulesApi.setRuleLayerDetails: " + e.Message ); + Debug.Print("Exception when calling DataRulesApi.setRuleAllowedStyles: " + e.Message ); } } } @@ -7610,7 +7511,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     // Configure HTTP basic authorization: basicAuth
    @@ -7620,17 +7521,17 @@ 

    Usage and SDK Samples

    // Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\DataRulesApi(); $id = id_example; // String | The rule identifier -$layerDetails = ; // LayerDetails | +$string = ; // set[String] | try { - $api_instance->setRuleLayerDetails($id, $layerDetails); + $api_instance->setRuleAllowedStyles($id, $string); } catch (Exception $e) { - echo 'Exception when calling DataRulesApi->setRuleLayerDetails: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling DataRulesApi->setRuleAllowedStyles: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
     use WWW::OPenAPIClient::DataRulesApi;
    @@ -7641,17 +7542,17 @@ 

    Usage and SDK Samples

    # Create an instance of the API class my $api_instance = WWW::OPenAPIClient::DataRulesApi->new(); my $id = id_example; # String | The rule identifier -my $layerDetails = WWW::OPenAPIClient::Object::LayerDetails->new(); # LayerDetails | +my $string = [WWW::OPenAPIClient::Object::set[String]->new()]; # set[String] | eval { - $api_instance->setRuleLayerDetails(id => $id, layerDetails => $layerDetails); + $api_instance->setRuleAllowedStyles(id => $id, string => $string); }; if ($@) { - warn "Exception when calling DataRulesApi->setRuleLayerDetails: $@\n"; + warn "Exception when calling DataRulesApi->setRuleAllowedStyles: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -7664,23 +7565,23 @@ 

    Usage and SDK Samples

    # Create an instance of the API class api_instance = openapi_client.DataRulesApi() id = id_example # String | The rule identifier (default to null) -layerDetails = # LayerDetails | (optional) +string = # set[String] | (optional) try: - api_instance.set_rule_layer_details(id, layerDetails=layerDetails) + api_instance.set_rule_allowed_styles(id, string=string) except ApiException as e: - print("Exception when calling DataRulesApi->setRuleLayerDetails: %s\n" % e)
    + print("Exception when calling DataRulesApi->setRuleAllowedStyles: %s\n" % e)
    -
    +
    extern crate DataRulesApi;
     
     pub fn main() {
         let id = id_example; // String
    -    let layerDetails = ; // LayerDetails
    +    let string = ; // set[String]
     
         let mut context = DataRulesApi::Context::default();
    -    let result = client.setRuleLayerDetails(id, layerDetails, &context).wait();
    +    let result = client.setRuleAllowedStyles(id, string, &context).wait();
     
         println!("{:?}", result);
     }
    @@ -7705,7 +7606,7 @@ 

    Parameters

    -
    +
    @@ -7733,7 +7634,7 @@

    Parameters

    Name Description - layerDetails + string

    -
    +
    @@ -7782,57 +7693,57 @@

    Parameters

    Responses

    -

    -

    +

    +

    -

    -
    -
    +
    +
    -

    setRuleLimits

    +

    setRuleLayerDetails

    @@ -7841,37 +7752,52 @@

    setRuleLimits


    -
    /rules/id/{id}/limits
    +
    /rules/id/{id}/layer-details

    Usage and SDK Samples

    -
    +
    curl -X PUT \
      -H "Authorization: Basic [[basicHash]]" \
      -H "Content-Type: application/json,application/x-jackson-smile" \
    - "/api/rules/id/{id}/limits" \
    - -d '{ }' \
    + "/api/rules/id/{id}/layer-details" \
    + -d '{
    +  "cqlFilterWrite" : "cqlFilterWrite",
    +  "cqlFilterRead" : "cqlFilterRead",
    +  "defaultStyle" : "defaultStyle",
    +  "allowedStyles" : [ "allowedStyles", "allowedStyles" ],
    +  "type" : "VECTOR",
    +  "layerAttributes" : [ {
    +    "access" : "NONE",
    +    "dataType" : "dataType",
    +    "name" : "name"
    +  }, {
    +    "access" : "NONE",
    +    "dataType" : "dataType",
    +    "name" : "name"
    +  } ]
    +}' \
      -d 'Custom MIME type example not yet supported: application/x-jackson-smile'
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -7891,12 +7817,12 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataRulesApi apiInstance = new DataRulesApi(); String id = id_example; // String | The rule identifier - RuleLimits ruleLimits = ; // RuleLimits | + LayerDetails layerDetails = ; // LayerDetails | try { - apiInstance.setRuleLimits(id, ruleLimits); + apiInstance.setRuleLayerDetails(id, layerDetails); } catch (ApiException e) { - System.err.println("Exception when calling DataRulesApi#setRuleLimits"); + System.err.println("Exception when calling DataRulesApi#setRuleLayerDetails"); e.printStackTrace(); } } @@ -7904,47 +7830,47 @@

    Usage and SDK Samples

    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
     
     final String id = new String(); // String | The rule identifier
    -final RuleLimits ruleLimits = new RuleLimits(); // RuleLimits | 
    +final LayerDetails layerDetails = new LayerDetails(); // LayerDetails | 
     
     try {
    -    final result = await api_instance.setRuleLimits(id, ruleLimits);
    +    final result = await api_instance.setRuleLayerDetails(id, layerDetails);
         print(result);
     } catch (e) {
    -    print('Exception when calling DefaultApi->setRuleLimits: $e\n');
    +    print('Exception when calling DefaultApi->setRuleLayerDetails: $e\n');
     }
     
     
    -
    +
    import org.openapitools.client.api.DataRulesApi;
     
     public class DataRulesApiExample {
         public static void main(String[] args) {
             DataRulesApi apiInstance = new DataRulesApi();
             String id = id_example; // String | The rule identifier
    -        RuleLimits ruleLimits = ; // RuleLimits | 
    +        LayerDetails layerDetails = ; // LayerDetails | 
     
             try {
    -            apiInstance.setRuleLimits(id, ruleLimits);
    +            apiInstance.setRuleLayerDetails(id, layerDetails);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling DataRulesApi#setRuleLimits");
    +            System.err.println("Exception when calling DataRulesApi#setRuleLayerDetails");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     // Configure HTTP basic authorization (authentication scheme: basicAuth)
     [apiConfig setUsername:@"YOUR_USERNAME"];
    @@ -7953,10 +7879,10 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataRulesApi *apiInstance = [[DataRulesApi alloc] init]; String *id = id_example; // The rule identifier (default to null) -RuleLimits *ruleLimits = ; // (optional) +LayerDetails *layerDetails = ; // (optional) -[apiInstance setRuleLimitsWith:id - ruleLimits:ruleLimits +[apiInstance setRuleLayerDetailsWith:id + layerDetails:layerDetails completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error: %@", error); @@ -7965,7 +7891,7 @@

    Usage and SDK Samples

    -
    +
    var GeoServerAcl = require('geo_server_acl');
     var defaultClient = GeoServerAcl.ApiClient.instance;
     
    @@ -7978,7 +7904,7 @@ 

    Usage and SDK Samples

    var api = new GeoServerAcl.DataRulesApi() var id = id_example; // {String} The rule identifier var opts = { - 'ruleLimits': // {RuleLimits} + 'layerDetails': // {LayerDetails} }; var callback = function(error, data, response) { @@ -7988,14 +7914,14 @@

    Usage and SDK Samples

    console.log('API called successfully.'); } }; -api.setRuleLimits(id, opts, callback); +api.setRuleLayerDetails(id, opts, callback);
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -8004,7 +7930,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class setRuleLimitsExample + public class setRuleLayerDetailsExample { public void main() { @@ -8015,12 +7941,12 @@

    Usage and SDK Samples

    // Create an instance of the API class var apiInstance = new DataRulesApi(); var id = id_example; // String | The rule identifier (default to null) - var ruleLimits = new RuleLimits(); // RuleLimits | (optional) + var layerDetails = new LayerDetails(); // LayerDetails | (optional) try { - apiInstance.setRuleLimits(id, ruleLimits); + apiInstance.setRuleLayerDetails(id, layerDetails); } catch (Exception e) { - Debug.Print("Exception when calling DataRulesApi.setRuleLimits: " + e.Message ); + Debug.Print("Exception when calling DataRulesApi.setRuleLayerDetails: " + e.Message ); } } } @@ -8028,7 +7954,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     // Configure HTTP basic authorization: basicAuth
    @@ -8038,17 +7964,17 @@ 

    Usage and SDK Samples

    // Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\DataRulesApi(); $id = id_example; // String | The rule identifier -$ruleLimits = ; // RuleLimits | +$layerDetails = ; // LayerDetails | try { - $api_instance->setRuleLimits($id, $ruleLimits); + $api_instance->setRuleLayerDetails($id, $layerDetails); } catch (Exception $e) { - echo 'Exception when calling DataRulesApi->setRuleLimits: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling DataRulesApi->setRuleLayerDetails: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
     use WWW::OPenAPIClient::DataRulesApi;
    @@ -8059,17 +7985,17 @@ 

    Usage and SDK Samples

    # Create an instance of the API class my $api_instance = WWW::OPenAPIClient::DataRulesApi->new(); my $id = id_example; # String | The rule identifier -my $ruleLimits = WWW::OPenAPIClient::Object::RuleLimits->new(); # RuleLimits | +my $layerDetails = WWW::OPenAPIClient::Object::LayerDetails->new(); # LayerDetails | eval { - $api_instance->setRuleLimits(id => $id, ruleLimits => $ruleLimits); + $api_instance->setRuleLayerDetails(id => $id, layerDetails => $layerDetails); }; if ($@) { - warn "Exception when calling DataRulesApi->setRuleLimits: $@\n"; + warn "Exception when calling DataRulesApi->setRuleLayerDetails: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -8082,23 +8008,23 @@ 

    Usage and SDK Samples

    # Create an instance of the API class api_instance = openapi_client.DataRulesApi() id = id_example # String | The rule identifier (default to null) -ruleLimits = # RuleLimits | (optional) +layerDetails = # LayerDetails | (optional) try: - api_instance.set_rule_limits(id, ruleLimits=ruleLimits) + api_instance.set_rule_layer_details(id, layerDetails=layerDetails) except ApiException as e: - print("Exception when calling DataRulesApi->setRuleLimits: %s\n" % e)
    + print("Exception when calling DataRulesApi->setRuleLayerDetails: %s\n" % e)
    -
    +
    extern crate DataRulesApi;
     
     pub fn main() {
         let id = id_example; // String
    -    let ruleLimits = ; // RuleLimits
    +    let layerDetails = ; // LayerDetails
     
         let mut context = DataRulesApi::Context::default();
    -    let result = client.setRuleLimits(id, ruleLimits, &context).wait();
    +    let result = client.setRuleLayerDetails(id, layerDetails, &context).wait();
     
         println!("{:?}", result);
     }
    @@ -8123,7 +8049,7 @@ 

    Parameters

    -
    +
    @@ -8151,7 +8077,7 @@

    Parameters

    Name Description - ruleLimits + layerDetails

    -
    +
    @@ -8200,79 +8126,57 @@

    Parameters

    Responses

    -

    -

    +

    +

    -

    -
    -
    +
    +
    -

    shiftRulesByPriority

    +

    setRuleLimits

    @@ -8281,35 +8185,37 @@

    shiftRulesByPriority


    -
    /rules/shift
    +
    /rules/id/{id}/limits

    Usage and SDK Samples

    -
    -
    curl -X POST \
    +                          
    +
    curl -X PUT \
      -H "Authorization: Basic [[basicHash]]" \
    - -H "Accept: application/json,application/x-jackson-smile" \
    - "/api/rules/shift?priorityStart=789&offset=789"
    + -H "Content-Type: application/json,application/x-jackson-smile" \
    + "/api/rules/id/{id}/limits" \
    + -d '{ }' \
    + -d 'Custom MIME type example not yet supported: application/x-jackson-smile'
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -8328,14 +8234,13 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataRulesApi apiInstance = new DataRulesApi(); - Long priorityStart = 789; // Long | The minimum priority to start shifting at (inclusive) - Long offset = 789; // Long | The priority offset to apply to all rules from priorityStart onwards + String id = id_example; // String | The rule identifier + RuleLimits ruleLimits = ; // RuleLimits | try { - 'Integer' result = apiInstance.shiftRulesByPriority(priorityStart, offset); - System.out.println(result); + apiInstance.setRuleLimits(id, ruleLimits); } catch (ApiException e) { - System.err.println("Exception when calling DataRulesApi#shiftRulesByPriority"); + System.err.println("Exception when calling DataRulesApi#setRuleLimits"); e.printStackTrace(); } } @@ -8343,48 +8248,47 @@

    Usage and SDK Samples

    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
     
    -final Long priorityStart = new Long(); // Long | The minimum priority to start shifting at (inclusive)
    -final Long offset = new Long(); // Long | The priority offset to apply to all rules from priorityStart onwards
    +final String id = new String(); // String | The rule identifier
    +final RuleLimits ruleLimits = new RuleLimits(); // RuleLimits | 
     
     try {
    -    final result = await api_instance.shiftRulesByPriority(priorityStart, offset);
    +    final result = await api_instance.setRuleLimits(id, ruleLimits);
         print(result);
     } catch (e) {
    -    print('Exception when calling DefaultApi->shiftRulesByPriority: $e\n');
    +    print('Exception when calling DefaultApi->setRuleLimits: $e\n');
     }
     
     
    -
    +
    import org.openapitools.client.api.DataRulesApi;
     
     public class DataRulesApiExample {
         public static void main(String[] args) {
             DataRulesApi apiInstance = new DataRulesApi();
    -        Long priorityStart = 789; // Long | The minimum priority to start shifting at (inclusive)
    -        Long offset = 789; // Long | The priority offset to apply to all rules from priorityStart onwards
    +        String id = id_example; // String | The rule identifier
    +        RuleLimits ruleLimits = ; // RuleLimits | 
     
             try {
    -            'Integer' result = apiInstance.shiftRulesByPriority(priorityStart, offset);
    -            System.out.println(result);
    +            apiInstance.setRuleLimits(id, ruleLimits);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling DataRulesApi#shiftRulesByPriority");
    +            System.err.println("Exception when calling DataRulesApi#setRuleLimits");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     // Configure HTTP basic authorization (authentication scheme: basicAuth)
     [apiConfig setUsername:@"YOUR_USERNAME"];
    @@ -8392,15 +8296,12 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataRulesApi *apiInstance = [[DataRulesApi alloc] init]; -Long *priorityStart = 789; // The minimum priority to start shifting at (inclusive) (default to null) -Long *offset = 789; // The priority offset to apply to all rules from priorityStart onwards (default to null) +String *id = id_example; // The rule identifier (default to null) +RuleLimits *ruleLimits = ; // (optional) -[apiInstance shiftRulesByPriorityWith:priorityStart - offset:offset - completionHandler: ^('Integer' output, NSError* error) { - if (output) { - NSLog(@"%@", output); - } +[apiInstance setRuleLimitsWith:id + ruleLimits:ruleLimits + completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error: %@", error); } @@ -8408,7 +8309,7 @@

    Usage and SDK Samples

    -
    +
    var GeoServerAcl = require('geo_server_acl');
     var defaultClient = GeoServerAcl.ApiClient.instance;
     
    @@ -8419,24 +8320,26 @@ 

    Usage and SDK Samples

    // Create an instance of the API class var api = new GeoServerAcl.DataRulesApi() -var priorityStart = 789; // {Long} The minimum priority to start shifting at (inclusive) -var offset = 789; // {Long} The priority offset to apply to all rules from priorityStart onwards +var id = id_example; // {String} The rule identifier +var opts = { + 'ruleLimits': // {RuleLimits} +}; var callback = function(error, data, response) { if (error) { console.error(error); } else { - console.log('API called successfully. Returned data: ' + data); + console.log('API called successfully.'); } }; -api.shiftRulesByPriority(priorityStart, offset, callback); +api.setRuleLimits(id, opts, callback);
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -8445,7 +8348,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class shiftRulesByPriorityExample + public class setRuleLimitsExample { public void main() { @@ -8455,14 +8358,13 @@

    Usage and SDK Samples

    // Create an instance of the API class var apiInstance = new DataRulesApi(); - var priorityStart = 789; // Long | The minimum priority to start shifting at (inclusive) (default to null) - var offset = 789; // Long | The priority offset to apply to all rules from priorityStart onwards (default to null) + var id = id_example; // String | The rule identifier (default to null) + var ruleLimits = new RuleLimits(); // RuleLimits | (optional) try { - 'Integer' result = apiInstance.shiftRulesByPriority(priorityStart, offset); - Debug.WriteLine(result); + apiInstance.setRuleLimits(id, ruleLimits); } catch (Exception e) { - Debug.Print("Exception when calling DataRulesApi.shiftRulesByPriority: " + e.Message ); + Debug.Print("Exception when calling DataRulesApi.setRuleLimits: " + e.Message ); } } } @@ -8470,7 +8372,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     // Configure HTTP basic authorization: basicAuth
    @@ -8479,19 +8381,18 @@ 

    Usage and SDK Samples

    // Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\DataRulesApi(); -$priorityStart = 789; // Long | The minimum priority to start shifting at (inclusive) -$offset = 789; // Long | The priority offset to apply to all rules from priorityStart onwards +$id = id_example; // String | The rule identifier +$ruleLimits = ; // RuleLimits | try { - $result = $api_instance->shiftRulesByPriority($priorityStart, $offset); - print_r($result); + $api_instance->setRuleLimits($id, $ruleLimits); } catch (Exception $e) { - echo 'Exception when calling DataRulesApi->shiftRulesByPriority: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling DataRulesApi->setRuleLimits: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
     use WWW::OPenAPIClient::DataRulesApi;
    @@ -8501,19 +8402,18 @@ 

    Usage and SDK Samples

    # Create an instance of the API class my $api_instance = WWW::OPenAPIClient::DataRulesApi->new(); -my $priorityStart = 789; # Long | The minimum priority to start shifting at (inclusive) -my $offset = 789; # Long | The priority offset to apply to all rules from priorityStart onwards +my $id = id_example; # String | The rule identifier +my $ruleLimits = WWW::OPenAPIClient::Object::RuleLimits->new(); # RuleLimits | eval { - my $result = $api_instance->shiftRulesByPriority(priorityStart => $priorityStart, offset => $offset); - print Dumper($result); + $api_instance->setRuleLimits(id => $id, ruleLimits => $ruleLimits); }; if ($@) { - warn "Exception when calling DataRulesApi->shiftRulesByPriority: $@\n"; + warn "Exception when calling DataRulesApi->setRuleLimits: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -8525,25 +8425,24 @@ 

    Usage and SDK Samples

    # Create an instance of the API class api_instance = openapi_client.DataRulesApi() -priorityStart = 789 # Long | The minimum priority to start shifting at (inclusive) (default to null) -offset = 789 # Long | The priority offset to apply to all rules from priorityStart onwards (default to null) +id = id_example # String | The rule identifier (default to null) +ruleLimits = # RuleLimits | (optional) try: - api_response = api_instance.shift_rules_by_priority(priorityStart, offset) - pprint(api_response) + api_instance.set_rule_limits(id, ruleLimits=ruleLimits) except ApiException as e: - print("Exception when calling DataRulesApi->shiftRulesByPriority: %s\n" % e)
    + print("Exception when calling DataRulesApi->setRuleLimits: %s\n" % e)
    -
    +
    extern crate DataRulesApi;
     
     pub fn main() {
    -    let priorityStart = 789; // Long
    -    let offset = 789; // Long
    +    let id = id_example; // String
    +    let ruleLimits = ; // RuleLimits
     
         let mut context = DataRulesApi::Context::default();
    -    let result = client.shiftRulesByPriority(priorityStart, offset, &context).wait();
    +    let result = client.setRuleLimits(id, ruleLimits, &context).wait();
     
         println!("{:?}", result);
     }
    @@ -8558,32 +8457,25 @@ 

    Scopes

    Parameters

    - - - - -
    Query parameters
    +
    Path parameters
    - - - - - + + + + + - -
    NameDescription
    priorityStart*
    NameDescription
    id* -
    +
    - Long + String - - (int64) -
    -The minimum priority to start shifting at (inclusive) +The rule identifier
    @@ -8594,126 +8486,137 @@

    Parameters

    offset* +
    -
    -
    -
    - - Long - - - (int64) - +
    Body parameters
    + + + + + + + +
    NameDescription
    ruleLimits +

    + +
    +
    + +

    Responses

    -

    -

    +

    +

    - +
    +
    +

    +

    + -
    -
    -
    - -
    - -
    + + + + +
    -

    -

    +

    +

    -

    -
    -
    +
    +
    -

    swapRules

    +

    shiftRulesByPriority

    @@ -8722,34 +8625,35 @@

    swapRules


    -
    /rules/id/{id}/swapwith/{id2}
    +
    /rules/shift

    Usage and SDK Samples

    -
    +
    curl -X POST \
      -H "Authorization: Basic [[basicHash]]" \
    - "/api/rules/id/{id}/swapwith/{id2}"
    + -H "Accept: application/json,application/x-jackson-smile" \
    + "/api/rules/shift?priorityStart=789&offset=789"
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -8768,13 +8672,14 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataRulesApi apiInstance = new DataRulesApi(); - String id = id_example; // String | The rule identifier - String id2 = id2_example; // String | The rule identifier to swap priorities with + Long priorityStart = 789; // Long | The minimum priority to start shifting at (inclusive) + Long offset = 789; // Long | The priority offset to apply to all rules from priorityStart onwards try { - apiInstance.swapRules(id, id2); + 'Integer' result = apiInstance.shiftRulesByPriority(priorityStart, offset); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DataRulesApi#swapRules"); + System.err.println("Exception when calling DataRulesApi#shiftRulesByPriority"); e.printStackTrace(); } } @@ -8782,47 +8687,48 @@

    Usage and SDK Samples

    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
     
    -final String id = new String(); // String | The rule identifier
    -final String id2 = new String(); // String | The rule identifier to swap priorities with
    +final Long priorityStart = new Long(); // Long | The minimum priority to start shifting at (inclusive)
    +final Long offset = new Long(); // Long | The priority offset to apply to all rules from priorityStart onwards
     
     try {
    -    final result = await api_instance.swapRules(id, id2);
    +    final result = await api_instance.shiftRulesByPriority(priorityStart, offset);
         print(result);
     } catch (e) {
    -    print('Exception when calling DefaultApi->swapRules: $e\n');
    +    print('Exception when calling DefaultApi->shiftRulesByPriority: $e\n');
     }
     
     
    -
    +
    import org.openapitools.client.api.DataRulesApi;
     
     public class DataRulesApiExample {
         public static void main(String[] args) {
             DataRulesApi apiInstance = new DataRulesApi();
    -        String id = id_example; // String | The rule identifier
    -        String id2 = id2_example; // String | The rule identifier to swap priorities with
    +        Long priorityStart = 789; // Long | The minimum priority to start shifting at (inclusive)
    +        Long offset = 789; // Long | The priority offset to apply to all rules from priorityStart onwards
     
             try {
    -            apiInstance.swapRules(id, id2);
    +            'Integer' result = apiInstance.shiftRulesByPriority(priorityStart, offset);
    +            System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling DataRulesApi#swapRules");
    +            System.err.println("Exception when calling DataRulesApi#shiftRulesByPriority");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     // Configure HTTP basic authorization (authentication scheme: basicAuth)
     [apiConfig setUsername:@"YOUR_USERNAME"];
    @@ -8830,12 +8736,15 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataRulesApi *apiInstance = [[DataRulesApi alloc] init]; -String *id = id_example; // The rule identifier (default to null) -String *id2 = id2_example; // The rule identifier to swap priorities with (default to null) +Long *priorityStart = 789; // The minimum priority to start shifting at (inclusive) (default to null) +Long *offset = 789; // The priority offset to apply to all rules from priorityStart onwards (default to null) -[apiInstance swapRulesWith:id - id2:id2 - completionHandler: ^(NSError* error) { +[apiInstance shiftRulesByPriorityWith:priorityStart + offset:offset + completionHandler: ^('Integer' output, NSError* error) { + if (output) { + NSLog(@"%@", output); + } if (error) { NSLog(@"Error: %@", error); } @@ -8843,7 +8752,7 @@

    Usage and SDK Samples

    -
    +
    var GeoServerAcl = require('geo_server_acl');
     var defaultClient = GeoServerAcl.ApiClient.instance;
     
    @@ -8854,24 +8763,24 @@ 

    Usage and SDK Samples

    // Create an instance of the API class var api = new GeoServerAcl.DataRulesApi() -var id = id_example; // {String} The rule identifier -var id2 = id2_example; // {String} The rule identifier to swap priorities with +var priorityStart = 789; // {Long} The minimum priority to start shifting at (inclusive) +var offset = 789; // {Long} The priority offset to apply to all rules from priorityStart onwards var callback = function(error, data, response) { if (error) { console.error(error); } else { - console.log('API called successfully.'); + console.log('API called successfully. Returned data: ' + data); } }; -api.swapRules(id, id2, callback); +api.shiftRulesByPriority(priorityStart, offset, callback);
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -8880,7 +8789,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class swapRulesExample + public class shiftRulesByPriorityExample { public void main() { @@ -8890,13 +8799,14 @@

    Usage and SDK Samples

    // Create an instance of the API class var apiInstance = new DataRulesApi(); - var id = id_example; // String | The rule identifier (default to null) - var id2 = id2_example; // String | The rule identifier to swap priorities with (default to null) + var priorityStart = 789; // Long | The minimum priority to start shifting at (inclusive) (default to null) + var offset = 789; // Long | The priority offset to apply to all rules from priorityStart onwards (default to null) try { - apiInstance.swapRules(id, id2); + 'Integer' result = apiInstance.shiftRulesByPriority(priorityStart, offset); + Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling DataRulesApi.swapRules: " + e.Message ); + Debug.Print("Exception when calling DataRulesApi.shiftRulesByPriority: " + e.Message ); } } } @@ -8904,7 +8814,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     // Configure HTTP basic authorization: basicAuth
    @@ -8913,18 +8823,19 @@ 

    Usage and SDK Samples

    // Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\DataRulesApi(); -$id = id_example; // String | The rule identifier -$id2 = id2_example; // String | The rule identifier to swap priorities with +$priorityStart = 789; // Long | The minimum priority to start shifting at (inclusive) +$offset = 789; // Long | The priority offset to apply to all rules from priorityStart onwards try { - $api_instance->swapRules($id, $id2); + $result = $api_instance->shiftRulesByPriority($priorityStart, $offset); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling DataRulesApi->swapRules: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling DataRulesApi->shiftRulesByPriority: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
     use WWW::OPenAPIClient::DataRulesApi;
    @@ -8934,18 +8845,19 @@ 

    Usage and SDK Samples

    # Create an instance of the API class my $api_instance = WWW::OPenAPIClient::DataRulesApi->new(); -my $id = id_example; # String | The rule identifier -my $id2 = id2_example; # String | The rule identifier to swap priorities with +my $priorityStart = 789; # Long | The minimum priority to start shifting at (inclusive) +my $offset = 789; # Long | The priority offset to apply to all rules from priorityStart onwards eval { - $api_instance->swapRules(id => $id, id2 => $id2); + my $result = $api_instance->shiftRulesByPriority(priorityStart => $priorityStart, offset => $offset); + print Dumper($result); }; if ($@) { - warn "Exception when calling DataRulesApi->swapRules: $@\n"; + warn "Exception when calling DataRulesApi->shiftRulesByPriority: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -8957,24 +8869,25 @@ 

    Usage and SDK Samples

    # Create an instance of the API class api_instance = openapi_client.DataRulesApi() -id = id_example # String | The rule identifier (default to null) -id2 = id2_example # String | The rule identifier to swap priorities with (default to null) +priorityStart = 789 # Long | The minimum priority to start shifting at (inclusive) (default to null) +offset = 789 # Long | The priority offset to apply to all rules from priorityStart onwards (default to null) try: - api_instance.swap_rules(id, id2) + api_response = api_instance.shift_rules_by_priority(priorityStart, offset) + pprint(api_response) except ApiException as e: - print("Exception when calling DataRulesApi->swapRules: %s\n" % e)
    + print("Exception when calling DataRulesApi->shiftRulesByPriority: %s\n" % e)
    -
    +
    extern crate DataRulesApi;
     
     pub fn main() {
    -    let id = id_example; // String
    -    let id2 = id2_example; // String
    +    let priorityStart = 789; // Long
    +    let offset = 789; // Long
     
         let mut context = DataRulesApi::Context::default();
    -    let result = client.swapRules(id, id2, &context).wait();
    +    let result = client.shiftRulesByPriority(priorityStart, offset, &context).wait();
     
         println!("{:?}", result);
     }
    @@ -8989,25 +8902,32 @@ 

    Scopes

    Parameters

    -
    Path parameters
    + + + + +
    Query parameters
    - - - - - + + + + + - +
    NameDescription
    id*
    NameDescription
    priorityStart* -
    +
    - String + Long + + (int64) +
    -The rule identifier +The minimum priority to start shifting at (inclusive)
    @@ -9018,19 +8938,22 @@

    Parameters

    id2*
    offset* -
    +
    - String + Long + + (int64) +
    -The rule identifier to swap priorities with +The priority offset to apply to all rules from priorityStart onwards
    @@ -9043,126 +8966,1057 @@

    Parameters

    +

    Responses

    +

    +

    + + + + -

    Responses

    -

    -

    + +
    +
    +
    + +
    + +
    +
    +

    +

    -
    +
    +
    +
    +
    +
    +

    swapRules

    +

    +
    +
    +
    +

    +

    +

    +
    +
    /rules/id/{id}/swapwith/{id2}
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X POST \
    + -H "Authorization: Basic [[basicHash]]" \
    + "/api/rules/id/{id}/swapwith/{id2}"
    +
    +
    +
    +
    import org.openapitools.client.*;
    +import org.openapitools.client.auth.*;
    +import org.openapitools.client.model.*;
    +import org.openapitools.client.api.DataRulesApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class DataRulesApiExample {
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +        // Configure HTTP basic authorization: basicAuth
    +        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
    +        basicAuth.setUsername("YOUR USERNAME");
    +        basicAuth.setPassword("YOUR PASSWORD");
    +
    +        // Create an instance of the API class
    +        DataRulesApi apiInstance = new DataRulesApi();
    +        String id = id_example; // String | The rule identifier
    +        String id2 = id2_example; // String | The rule identifier to swap priorities with
    +
    +        try {
    +            apiInstance.swapRules(id, id2);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DataRulesApi#swapRules");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    +
    + +
    +
    import 'package:openapi/api.dart';
    +
    +final api_instance = DefaultApi();
    +
    +final String id = new String(); // String | The rule identifier
    +final String id2 = new String(); // String | The rule identifier to swap priorities with
    +
    +try {
    +    final result = await api_instance.swapRules(id, id2);
    +    print(result);
    +} catch (e) {
    +    print('Exception when calling DefaultApi->swapRules: $e\n');
    +}
    +
    +
    +
    + +
    +
    import org.openapitools.client.api.DataRulesApi;
    +
    +public class DataRulesApiExample {
    +    public static void main(String[] args) {
    +        DataRulesApi apiInstance = new DataRulesApi();
    +        String id = id_example; // String | The rule identifier
    +        String id2 = id2_example; // String | The rule identifier to swap priorities with
    +
    +        try {
    +            apiInstance.swapRules(id, id2);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DataRulesApi#swapRules");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
    +// Configure HTTP basic authorization (authentication scheme: basicAuth)
    +[apiConfig setUsername:@"YOUR_USERNAME"];
    +[apiConfig setPassword:@"YOUR_PASSWORD"];
    +
    +// Create an instance of the API class
    +DataRulesApi *apiInstance = [[DataRulesApi alloc] init];
    +String *id = id_example; // The rule identifier (default to null)
    +String *id2 = id2_example; // The rule identifier to swap priorities with (default to null)
    +
    +[apiInstance swapRulesWith:id
    +    id2:id2
    +              completionHandler: ^(NSError* error) {
    +    if (error) {
    +        NSLog(@"Error: %@", error);
    +    }
    +}];
    +
    +
    + +
    +
    var GeoServerAcl = require('geo_server_acl');
    +var defaultClient = GeoServerAcl.ApiClient.instance;
    +
    +// Configure HTTP basic authorization: basicAuth
    +var basicAuth = defaultClient.authentications['basicAuth'];
    +basicAuth.username = 'YOUR USERNAME';
    +basicAuth.password = 'YOUR PASSWORD';
    +
    +// Create an instance of the API class
    +var api = new GeoServerAcl.DataRulesApi()
    +var id = id_example; // {String} The rule identifier
    +var id2 = id2_example; // {String} The rule identifier to swap priorities with
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully.');
    +  }
    +};
    +api.swapRules(id, id2, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using Org.OpenAPITools.Api;
    +using Org.OpenAPITools.Client;
    +using Org.OpenAPITools.Model;
    +
    +namespace Example
    +{
    +    public class swapRulesExample
    +    {
    +        public void main()
    +        {
    +            // Configure HTTP basic authorization: basicAuth
    +            Configuration.Default.Username = "YOUR_USERNAME";
    +            Configuration.Default.Password = "YOUR_PASSWORD";
    +
    +            // Create an instance of the API class
    +            var apiInstance = new DataRulesApi();
    +            var id = id_example;  // String | The rule identifier (default to null)
    +            var id2 = id2_example;  // String | The rule identifier to swap priorities with (default to null)
    +
    +            try {
    +                apiInstance.swapRules(id, id2);
    +            } catch (Exception e) {
    +                Debug.Print("Exception when calling DataRulesApi.swapRules: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +// Configure HTTP basic authorization: basicAuth
    +OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
    +OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');
    +
    +// Create an instance of the API class
    +$api_instance = new OpenAPITools\Client\Api\DataRulesApi();
    +$id = id_example; // String | The rule identifier
    +$id2 = id2_example; // String | The rule identifier to swap priorities with
    +
    +try {
    +    $api_instance->swapRules($id, $id2);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DataRulesApi->swapRules: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use WWW::OPenAPIClient::Configuration;
    +use WWW::OPenAPIClient::DataRulesApi;
    +# Configure HTTP basic authorization: basicAuth
    +$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
    +$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';
    +
    +# Create an instance of the API class
    +my $api_instance = WWW::OPenAPIClient::DataRulesApi->new();
    +my $id = id_example; # String | The rule identifier
    +my $id2 = id2_example; # String | The rule identifier to swap priorities with
    +
    +eval {
    +    $api_instance->swapRules(id => $id, id2 => $id2);
    +};
    +if ($@) {
    +    warn "Exception when calling DataRulesApi->swapRules: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import openapi_client
    +from openapi_client.rest import ApiException
    +from pprint import pprint
    +# Configure HTTP basic authorization: basicAuth
    +openapi_client.configuration.username = 'YOUR_USERNAME'
    +openapi_client.configuration.password = 'YOUR_PASSWORD'
    +
    +# Create an instance of the API class
    +api_instance = openapi_client.DataRulesApi()
    +id = id_example # String | The rule identifier (default to null)
    +id2 = id2_example # String | The rule identifier to swap priorities with (default to null)
    +
    +try:
    +    api_instance.swap_rules(id, id2)
    +except ApiException as e:
    +    print("Exception when calling DataRulesApi->swapRules: %s\n" % e)
    +
    + +
    +
    extern crate DataRulesApi;
    +
    +pub fn main() {
    +    let id = id_example; // String
    +    let id2 = id2_example; // String
    +
    +    let mut context = DataRulesApi::Context::default();
    +    let result = client.swapRules(id, id2, &context).wait();
    +
    +    println!("{:?}", result);
    +}
    +
    +
    +
    + +

    Scopes

    + + +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + + + + + +
    NameDescription
    id* + + +
    +
    +
    + + String + + +
    +The rule identifier +
    +
    +
    + Required +
    +
    +
    +
    id2* + + +
    +
    +
    + + String + + +
    +The rule identifier to swap priorities with +
    +
    +
    + Required +
    +
    +
    +
    + + + + + +

    Responses

    +

    +

    + + + + + + +
    +
    +

    +

    + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    +

    updateRuleById

    +

    +
    +
    +
    +

    +

    +

    +
    +
    /rules/id/{id}
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PATCH \
    + -H "Authorization: Basic [[basicHash]]" \
    + -H "Accept: application/json,application/x-jackson-smile" \
    + -H "Content-Type: application/json,application/x-jackson-smile" \
    + "/api/rules/id/{id}" \
    + -d '{
    +  "request" : "request",
    +  "workspace" : "workspace",
    +  "role" : "role",
    +  "addressRange" : "addressRange",
    +  "description" : "description",
    +  "priority" : 0,
    +  "layer" : "layer",
    +  "subfield" : "subfield",
    +  "service" : "service",
    +  "name" : "name",
    +  "id" : "id",
    +  "extId" : "extId",
    +  "user" : "user",
    +  "limits" : { }
    +}' \
    + -d 'Custom MIME type example not yet supported: application/x-jackson-smile'
    +
    +
    +
    +
    import org.openapitools.client.*;
    +import org.openapitools.client.auth.*;
    +import org.openapitools.client.model.*;
    +import org.openapitools.client.api.DataRulesApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class DataRulesApiExample {
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +        // Configure HTTP basic authorization: basicAuth
    +        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
    +        basicAuth.setUsername("YOUR USERNAME");
    +        basicAuth.setPassword("YOUR PASSWORD");
    +
    +        // Create an instance of the API class
    +        DataRulesApi apiInstance = new DataRulesApi();
    +        String id = id_example; // String | The rule identifier
    +        Rule rule = ; // Rule | 
    +
    +        try {
    +            Rule result = apiInstance.updateRuleById(id, rule);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DataRulesApi#updateRuleById");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    +
    + +
    +
    import 'package:openapi/api.dart';
    +
    +final api_instance = DefaultApi();
    +
    +final String id = new String(); // String | The rule identifier
    +final Rule rule = new Rule(); // Rule | 
    +
    +try {
    +    final result = await api_instance.updateRuleById(id, rule);
    +    print(result);
    +} catch (e) {
    +    print('Exception when calling DefaultApi->updateRuleById: $e\n');
    +}
    +
    +
    +
    + +
    +
    import org.openapitools.client.api.DataRulesApi;
    +
    +public class DataRulesApiExample {
    +    public static void main(String[] args) {
    +        DataRulesApi apiInstance = new DataRulesApi();
    +        String id = id_example; // String | The rule identifier
    +        Rule rule = ; // Rule | 
    +
    +        try {
    +            Rule result = apiInstance.updateRuleById(id, rule);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DataRulesApi#updateRuleById");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
    +// Configure HTTP basic authorization (authentication scheme: basicAuth)
    +[apiConfig setUsername:@"YOUR_USERNAME"];
    +[apiConfig setPassword:@"YOUR_PASSWORD"];
    +
    +// Create an instance of the API class
    +DataRulesApi *apiInstance = [[DataRulesApi alloc] init];
    +String *id = id_example; // The rule identifier (default to null)
    +Rule *rule = ; // 
    +
    +[apiInstance updateRuleByIdWith:id
    +    rule:rule
    +              completionHandler: ^(Rule output, NSError* error) {
    +    if (output) {
    +        NSLog(@"%@", output);
    +    }
    +    if (error) {
    +        NSLog(@"Error: %@", error);
    +    }
    +}];
    +
    +
    + +
    +
    var GeoServerAcl = require('geo_server_acl');
    +var defaultClient = GeoServerAcl.ApiClient.instance;
    +
    +// Configure HTTP basic authorization: basicAuth
    +var basicAuth = defaultClient.authentications['basicAuth'];
    +basicAuth.username = 'YOUR USERNAME';
    +basicAuth.password = 'YOUR PASSWORD';
    +
    +// Create an instance of the API class
    +var api = new GeoServerAcl.DataRulesApi()
    +var id = id_example; // {String} The rule identifier
    +var rule = ; // {Rule} 
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.updateRuleById(id, rule, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using Org.OpenAPITools.Api;
    +using Org.OpenAPITools.Client;
    +using Org.OpenAPITools.Model;
    +
    +namespace Example
    +{
    +    public class updateRuleByIdExample
    +    {
    +        public void main()
    +        {
    +            // Configure HTTP basic authorization: basicAuth
    +            Configuration.Default.Username = "YOUR_USERNAME";
    +            Configuration.Default.Password = "YOUR_PASSWORD";
    +
    +            // Create an instance of the API class
    +            var apiInstance = new DataRulesApi();
    +            var id = id_example;  // String | The rule identifier (default to null)
    +            var rule = new Rule(); // Rule | 
    +
    +            try {
    +                Rule result = apiInstance.updateRuleById(id, rule);
    +                Debug.WriteLine(result);
    +            } catch (Exception e) {
    +                Debug.Print("Exception when calling DataRulesApi.updateRuleById: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +// Configure HTTP basic authorization: basicAuth
    +OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
    +OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');
    +
    +// Create an instance of the API class
    +$api_instance = new OpenAPITools\Client\Api\DataRulesApi();
    +$id = id_example; // String | The rule identifier
    +$rule = ; // Rule | 
    +
    +try {
    +    $result = $api_instance->updateRuleById($id, $rule);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DataRulesApi->updateRuleById: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use WWW::OPenAPIClient::Configuration;
    +use WWW::OPenAPIClient::DataRulesApi;
    +# Configure HTTP basic authorization: basicAuth
    +$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
    +$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';
    +
    +# Create an instance of the API class
    +my $api_instance = WWW::OPenAPIClient::DataRulesApi->new();
    +my $id = id_example; # String | The rule identifier
    +my $rule = WWW::OPenAPIClient::Object::Rule->new(); # Rule | 
    +
    +eval {
    +    my $result = $api_instance->updateRuleById(id => $id, rule => $rule);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DataRulesApi->updateRuleById: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import openapi_client
    +from openapi_client.rest import ApiException
    +from pprint import pprint
    +# Configure HTTP basic authorization: basicAuth
    +openapi_client.configuration.username = 'YOUR_USERNAME'
    +openapi_client.configuration.password = 'YOUR_PASSWORD'
    +
    +# Create an instance of the API class
    +api_instance = openapi_client.DataRulesApi()
    +id = id_example # String | The rule identifier (default to null)
    +rule =  # Rule | 
    +
    +try:
    +    api_response = api_instance.update_rule_by_id(id, rule)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DataRulesApi->updateRuleById: %s\n" % e)
    +
    + +
    +
    extern crate DataRulesApi;
    +
    +pub fn main() {
    +    let id = id_example; // String
    +    let rule = ; // Rule
    +
    +    let mut context = DataRulesApi::Context::default();
    +    let result = client.updateRuleById(id, rule, &context).wait();
    +
    +    println!("{:?}", result);
    +}
    +
    +
    +
    + +

    Scopes

    + + +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    id* + + +
    +
    +
    + + String + + +
    +The rule identifier +
    +
    +
    + Required +
    +
    +
    +
    + + +
    Body parameters
    + + + + + + + + + +
    NameDescription
    rule * +

    + +
    +
    + + + +

    Responses

    +

    +

    + + + + + + +
    +
    +
    + +
    + +
    +
    +

    +

    + + + + + + +
    +
    +

    +

    + + + + + + +
    +
    +

    +

    -

    -
    -
    + +
    +

    WorkspaceAdminRules

    +
    +
    -

    updateRuleById

    +

    adminRuleExistsById

    -

    +

    Returns whether the AdminRule with the given identifier exists


    -
    /rules/id/{id}
    +
    /adminrules/id/{id}/exists

    Usage and SDK Samples

    -
    -
    curl -X PATCH \
    +                          
    +
    curl -X GET \
      -H "Authorization: Basic [[basicHash]]" \
      -H "Accept: application/json,application/x-jackson-smile" \
    - -H "Content-Type: application/json,application/x-jackson-smile" \
    - "/api/rules/id/{id}" \
    - -d '{
    -  "request" : "request",
    -  "workspace" : "workspace",
    -  "role" : "role",
    -  "addressRange" : "addressRange",
    -  "description" : "description",
    -  "priority" : 0,
    -  "layer" : "layer",
    -  "subfield" : "subfield",
    -  "service" : "service",
    -  "name" : "name",
    -  "id" : "id",
    -  "extId" : "extId",
    -  "user" : "user",
    -  "limits" : { }
    -}' \
    - -d 'Custom MIME type example not yet supported: application/x-jackson-smile'
    + "/api/adminrules/id/{id}/exists"
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    -import org.openapitools.client.api.DataRulesApi;
    +import org.openapitools.client.api.WorkspaceAdminRulesApi;
     
     import java.io.File;
     import java.util.*;
     
    -public class DataRulesApiExample {
    +public class WorkspaceAdminRulesApiExample {
         public static void main(String[] args) {
             ApiClient defaultClient = Configuration.getDefaultApiClient();
             // Configure HTTP basic authorization: basicAuth
    @@ -9171,15 +10025,14 @@ 

    Usage and SDK Samples

    basicAuth.setPassword("YOUR PASSWORD"); // Create an instance of the API class - DataRulesApi apiInstance = new DataRulesApi(); + WorkspaceAdminRulesApi apiInstance = new WorkspaceAdminRulesApi(); String id = id_example; // String | The rule identifier - Rule rule = ; // Rule | try { - Rule result = apiInstance.updateRuleById(id, rule); + 'Boolean' result = apiInstance.adminRuleExistsById(id); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DataRulesApi#updateRuleById"); + System.err.println("Exception when calling WorkspaceAdminRulesApi#adminRuleExistsById"); e.printStackTrace(); } } @@ -9187,61 +10040,57 @@

    Usage and SDK Samples

    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
     
     final String id = new String(); // String | The rule identifier
    -final Rule rule = new Rule(); // Rule | 
     
     try {
    -    final result = await api_instance.updateRuleById(id, rule);
    +    final result = await api_instance.adminRuleExistsById(id);
         print(result);
     } catch (e) {
    -    print('Exception when calling DefaultApi->updateRuleById: $e\n');
    +    print('Exception when calling DefaultApi->adminRuleExistsById: $e\n');
     }
     
     
    -
    -
    import org.openapitools.client.api.DataRulesApi;
    +                          
    +
    import org.openapitools.client.api.WorkspaceAdminRulesApi;
     
    -public class DataRulesApiExample {
    +public class WorkspaceAdminRulesApiExample {
         public static void main(String[] args) {
    -        DataRulesApi apiInstance = new DataRulesApi();
    +        WorkspaceAdminRulesApi apiInstance = new WorkspaceAdminRulesApi();
             String id = id_example; // String | The rule identifier
    -        Rule rule = ; // Rule | 
     
             try {
    -            Rule result = apiInstance.updateRuleById(id, rule);
    +            'Boolean' result = apiInstance.adminRuleExistsById(id);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling DataRulesApi#updateRuleById");
    +            System.err.println("Exception when calling WorkspaceAdminRulesApi#adminRuleExistsById");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     // Configure HTTP basic authorization (authentication scheme: basicAuth)
     [apiConfig setUsername:@"YOUR_USERNAME"];
     [apiConfig setPassword:@"YOUR_PASSWORD"];
     
     // Create an instance of the API class
    -DataRulesApi *apiInstance = [[DataRulesApi alloc] init];
    +WorkspaceAdminRulesApi *apiInstance = [[WorkspaceAdminRulesApi alloc] init];
     String *id = id_example; // The rule identifier (default to null)
    -Rule *rule = ; // 
     
    -[apiInstance updateRuleByIdWith:id
    -    rule:rule
    -              completionHandler: ^(Rule output, NSError* error) {
    +[apiInstance adminRuleExistsByIdWith:id
    +              completionHandler: ^('Boolean' output, NSError* error) {
         if (output) {
             NSLog(@"%@", output);
         }
    @@ -9252,7 +10101,7 @@ 

    Usage and SDK Samples

    -
    +
    var GeoServerAcl = require('geo_server_acl');
     var defaultClient = GeoServerAcl.ApiClient.instance;
     
    @@ -9262,9 +10111,8 @@ 

    Usage and SDK Samples

    basicAuth.password = 'YOUR PASSWORD'; // Create an instance of the API class -var api = new GeoServerAcl.DataRulesApi() +var api = new GeoServerAcl.WorkspaceAdminRulesApi() var id = id_example; // {String} The rule identifier -var rule = ; // {Rule} var callback = function(error, data, response) { if (error) { @@ -9273,14 +10121,14 @@

    Usage and SDK Samples

    console.log('API called successfully. Returned data: ' + data); } }; -api.updateRuleById(id, rule, callback); +api.adminRuleExistsById(id, callback);
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -9289,7 +10137,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateRuleByIdExample + public class adminRuleExistsByIdExample { public void main() { @@ -9298,15 +10146,14 @@

    Usage and SDK Samples

    Configuration.Default.Password = "YOUR_PASSWORD"; // Create an instance of the API class - var apiInstance = new DataRulesApi(); + var apiInstance = new WorkspaceAdminRulesApi(); var id = id_example; // String | The rule identifier (default to null) - var rule = new Rule(); // Rule | try { - Rule result = apiInstance.updateRuleById(id, rule); + 'Boolean' result = apiInstance.adminRuleExistsById(id); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling DataRulesApi.updateRuleById: " + e.Message ); + Debug.Print("Exception when calling WorkspaceAdminRulesApi.adminRuleExistsById: " + e.Message ); } } } @@ -9314,7 +10161,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     // Configure HTTP basic authorization: basicAuth
    @@ -9322,42 +10169,40 @@ 

    Usage and SDK Samples

    OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); // Create an instance of the API class -$api_instance = new OpenAPITools\Client\Api\DataRulesApi(); +$api_instance = new OpenAPITools\Client\Api\WorkspaceAdminRulesApi(); $id = id_example; // String | The rule identifier -$rule = ; // Rule | try { - $result = $api_instance->updateRuleById($id, $rule); + $result = $api_instance->adminRuleExistsById($id); print_r($result); } catch (Exception $e) { - echo 'Exception when calling DataRulesApi->updateRuleById: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling WorkspaceAdminRulesApi->adminRuleExistsById: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
    -use WWW::OPenAPIClient::DataRulesApi;
    +use WWW::OPenAPIClient::WorkspaceAdminRulesApi;
     # Configure HTTP basic authorization: basicAuth
     $WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
     $WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';
     
     # Create an instance of the API class
    -my $api_instance = WWW::OPenAPIClient::DataRulesApi->new();
    +my $api_instance = WWW::OPenAPIClient::WorkspaceAdminRulesApi->new();
     my $id = id_example; # String | The rule identifier
    -my $rule = WWW::OPenAPIClient::Object::Rule->new(); # Rule | 
     
     eval {
    -    my $result = $api_instance->updateRuleById(id => $id, rule => $rule);
    +    my $result = $api_instance->adminRuleExistsById(id => $id);
         print Dumper($result);
     };
     if ($@) {
    -    warn "Exception when calling DataRulesApi->updateRuleById: $@\n";
    +    warn "Exception when calling WorkspaceAdminRulesApi->adminRuleExistsById: $@\n";
     }
    -
    +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -9368,26 +10213,24 @@ 

    Usage and SDK Samples

    openapi_client.configuration.password = 'YOUR_PASSWORD' # Create an instance of the API class -api_instance = openapi_client.DataRulesApi() +api_instance = openapi_client.WorkspaceAdminRulesApi() id = id_example # String | The rule identifier (default to null) -rule = # Rule | try: - api_response = api_instance.update_rule_by_id(id, rule) + api_response = api_instance.admin_rule_exists_by_id(id) pprint(api_response) except ApiException as e: - print("Exception when calling DataRulesApi->updateRuleById: %s\n" % e)
    + print("Exception when calling WorkspaceAdminRulesApi->adminRuleExistsById: %s\n" % e)
    -
    -
    extern crate DataRulesApi;
    +                            
    +
    extern crate WorkspaceAdminRulesApi;
     
     pub fn main() {
         let id = id_example; // String
    -    let rule = ; // Rule
     
    -    let mut context = DataRulesApi::Context::default();
    -    let result = client.updateRuleById(id, rule, &context).wait();
    +    let mut context = WorkspaceAdminRulesApi::Context::default();
    +    let result = client.adminRuleExistsById(id, &context).wait();
     
         println!("{:?}", result);
     }
    @@ -9412,7 +10255,7 @@ 

    Parameters

    -
    +
    @@ -9434,78 +10277,27 @@

    Parameters

    -
    Body parameters
    - - - - - - - - - -
    NameDescription
    rule * -

    - -
    -

    Responses

    -

    -

    +

    +

    -

    -
    -
    -

    WorkspaceAdminRules

    -
    -
    +
    +
    -

    adminRuleExistsById

    +

    countAdminRules

    -

    Returns whether the AdminRule with the given identifier exists

    +

    Returns the number of rules that matches the search criteria


    -
    /adminrules/id/{id}/exists
    +
    /adminrules/query/count

    Usage and SDK Samples

    -
    -
    curl -X GET \
    +                          
    +
    curl -X POST \
      -H "Authorization: Basic [[basicHash]]" \
    - -H "Accept: application/json,application/x-jackson-smile" \
    - "/api/adminrules/id/{id}/exists"
    + -H "Accept: application/json" \
    + -H "Content-Type: application/json,application/x-jackson-smile" \
    + "/api/adminrules/query/count" \
    + -d '{
    +  "workspace" : {
    +    "includeDefault" : true,
    +    "value" : "value"
    +  },
    +  "sourceAddress" : {
    +    "includeDefault" : true,
    +    "value" : "value"
    +  },
    +  "roles" : {
    +    "values" : [ "values", "values" ],
    +    "includeDefault" : true
    +  },
    +  "user" : {
    +    "includeDefault" : true,
    +    "value" : "value"
    +  }
    +}' \
    + -d 'Custom MIME type example not yet supported: application/x-jackson-smile'
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -9682,13 +10425,13 @@ 

    Usage and SDK Samples

    // Create an instance of the API class WorkspaceAdminRulesApi apiInstance = new WorkspaceAdminRulesApi(); - String id = id_example; // String | The rule identifier + AdminRuleFilter adminRuleFilter = ; // AdminRuleFilter | try { - 'Boolean' result = apiInstance.adminRuleExistsById(id); + 'Integer' result = apiInstance.countAdminRules(adminRuleFilter); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling WorkspaceAdminRulesApi#adminRuleExistsById"); + System.err.println("Exception when calling WorkspaceAdminRulesApi#countAdminRules"); e.printStackTrace(); } } @@ -9696,46 +10439,46 @@

    Usage and SDK Samples

    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
     
    -final String id = new String(); // String | The rule identifier
    +final AdminRuleFilter adminRuleFilter = new AdminRuleFilter(); // AdminRuleFilter | 
     
     try {
    -    final result = await api_instance.adminRuleExistsById(id);
    +    final result = await api_instance.countAdminRules(adminRuleFilter);
         print(result);
     } catch (e) {
    -    print('Exception when calling DefaultApi->adminRuleExistsById: $e\n');
    +    print('Exception when calling DefaultApi->countAdminRules: $e\n');
     }
     
     
    -
    +
    import org.openapitools.client.api.WorkspaceAdminRulesApi;
     
     public class WorkspaceAdminRulesApiExample {
         public static void main(String[] args) {
             WorkspaceAdminRulesApi apiInstance = new WorkspaceAdminRulesApi();
    -        String id = id_example; // String | The rule identifier
    +        AdminRuleFilter adminRuleFilter = ; // AdminRuleFilter | 
     
             try {
    -            'Boolean' result = apiInstance.adminRuleExistsById(id);
    +            'Integer' result = apiInstance.countAdminRules(adminRuleFilter);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling WorkspaceAdminRulesApi#adminRuleExistsById");
    +            System.err.println("Exception when calling WorkspaceAdminRulesApi#countAdminRules");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     // Configure HTTP basic authorization (authentication scheme: basicAuth)
     [apiConfig setUsername:@"YOUR_USERNAME"];
    @@ -9743,10 +10486,10 @@ 

    Usage and SDK Samples

    // Create an instance of the API class WorkspaceAdminRulesApi *apiInstance = [[WorkspaceAdminRulesApi alloc] init]; -String *id = id_example; // The rule identifier (default to null) +AdminRuleFilter *adminRuleFilter = ; // -[apiInstance adminRuleExistsByIdWith:id - completionHandler: ^('Boolean' output, NSError* error) { +[apiInstance countAdminRulesWith:adminRuleFilter + completionHandler: ^('Integer' output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -9757,7 +10500,7 @@

    Usage and SDK Samples

    -
    +
    var GeoServerAcl = require('geo_server_acl');
     var defaultClient = GeoServerAcl.ApiClient.instance;
     
    @@ -9768,7 +10511,7 @@ 

    Usage and SDK Samples

    // Create an instance of the API class var api = new GeoServerAcl.WorkspaceAdminRulesApi() -var id = id_example; // {String} The rule identifier +var adminRuleFilter = ; // {AdminRuleFilter} var callback = function(error, data, response) { if (error) { @@ -9777,14 +10520,14 @@

    Usage and SDK Samples

    console.log('API called successfully. Returned data: ' + data); } }; -api.adminRuleExistsById(id, callback); +api.countAdminRules(adminRuleFilter, callback);
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -9793,7 +10536,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class adminRuleExistsByIdExample + public class countAdminRulesExample { public void main() { @@ -9803,13 +10546,13 @@

    Usage and SDK Samples

    // Create an instance of the API class var apiInstance = new WorkspaceAdminRulesApi(); - var id = id_example; // String | The rule identifier (default to null) + var adminRuleFilter = new AdminRuleFilter(); // AdminRuleFilter | try { - 'Boolean' result = apiInstance.adminRuleExistsById(id); + 'Integer' result = apiInstance.countAdminRules(adminRuleFilter); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling WorkspaceAdminRulesApi.adminRuleExistsById: " + e.Message ); + Debug.Print("Exception when calling WorkspaceAdminRulesApi.countAdminRules: " + e.Message ); } } } @@ -9817,7 +10560,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     // Configure HTTP basic authorization: basicAuth
    @@ -9826,18 +10569,18 @@ 

    Usage and SDK Samples

    // Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\WorkspaceAdminRulesApi(); -$id = id_example; // String | The rule identifier +$adminRuleFilter = ; // AdminRuleFilter | try { - $result = $api_instance->adminRuleExistsById($id); + $result = $api_instance->countAdminRules($adminRuleFilter); print_r($result); } catch (Exception $e) { - echo 'Exception when calling WorkspaceAdminRulesApi->adminRuleExistsById: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling WorkspaceAdminRulesApi->countAdminRules: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
     use WWW::OPenAPIClient::WorkspaceAdminRulesApi;
    @@ -9847,18 +10590,18 @@ 

    Usage and SDK Samples

    # Create an instance of the API class my $api_instance = WWW::OPenAPIClient::WorkspaceAdminRulesApi->new(); -my $id = id_example; # String | The rule identifier +my $adminRuleFilter = WWW::OPenAPIClient::Object::AdminRuleFilter->new(); # AdminRuleFilter | eval { - my $result = $api_instance->adminRuleExistsById(id => $id); + my $result = $api_instance->countAdminRules(adminRuleFilter => $adminRuleFilter); print Dumper($result); }; if ($@) { - warn "Exception when calling WorkspaceAdminRulesApi->adminRuleExistsById: $@\n"; + warn "Exception when calling WorkspaceAdminRulesApi->countAdminRules: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -9870,23 +10613,23 @@ 

    Usage and SDK Samples

    # Create an instance of the API class api_instance = openapi_client.WorkspaceAdminRulesApi() -id = id_example # String | The rule identifier (default to null) +adminRuleFilter = # AdminRuleFilter | try: - api_response = api_instance.admin_rule_exists_by_id(id) + api_response = api_instance.count_admin_rules(adminRuleFilter) pprint(api_response) except ApiException as e: - print("Exception when calling WorkspaceAdminRulesApi->adminRuleExistsById: %s\n" % e)
    + print("Exception when calling WorkspaceAdminRulesApi->countAdminRules: %s\n" % e)
    -
    +
    extern crate WorkspaceAdminRulesApi;
     
     pub fn main() {
    -    let id = id_example; // String
    +    let adminRuleFilter = ; // AdminRuleFilter
     
         let mut context = WorkspaceAdminRulesApi::Context::default();
    -    let result = client.adminRuleExistsById(id, &context).wait();
    +    let result = client.countAdminRules(adminRuleFilter, &context).wait();
     
         println!("{:?}", result);
     }
    @@ -9901,32 +10644,55 @@ 

    Scopes

    Parameters

    -
    Path parameters
    + + +
    Body parameters
    - - - - - + + + + + @@ -9934,26 +10700,24 @@

    Parameters

    - -

    Responses

    -

    -

    +

    +

    -
    NameDescription
    id*
    NameDescription
    adminRuleFilter * +

    + +
    - - - - - - - - -
    NameDescription
    adminRuleFilter * -

    - -
    -
    +

    Responses

    -

    -

    +

    +

    -

    -
    -
    +
    +
    -

    countAllAdminRules

    +

    createAdminRule

    -

    Returns the total number of rules

    +


    -
    /adminrules/query/count
    +
    /adminrules

    Usage and SDK Samples

    -
    -
    curl -X GET \
    +                          
    +
    curl -X POST \
      -H "Authorization: Basic [[basicHash]]" \
    - -H "Accept: application/json" \
    - "/api/adminrules/query/count"
    + -H "Accept: application/json,application/x-jackson-smile" \
    + -H "Content-Type: application/json,application/x-jackson-smile" \
    + "/api/adminrules?position=" \
    + -d '{
    +  "workspace" : "workspace",
    +  "role" : "role",
    +  "name" : "name",
    +  "addressRange" : "addressRange",
    +  "description" : "description",
    +  "id" : "id",
    +  "extId" : "extId",
    +  "priority" : 0,
    +  "user" : "user"
    +}' \
    + -d 'Custom MIME type example not yet supported: application/x-jackson-smile'
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -10481,12 +11176,14 @@ 

    Usage and SDK Samples

    // Create an instance of the API class WorkspaceAdminRulesApi apiInstance = new WorkspaceAdminRulesApi(); + AdminRule adminRule = ; // AdminRule | + InsertPosition position = ; // InsertPosition | Displacement option related to how to interpret the Rule's priority try { - 'Integer' result = apiInstance.countAllAdminRules(); + AdminRule result = apiInstance.createAdminRule(adminRule, position); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling WorkspaceAdminRulesApi#countAllAdminRules"); + System.err.println("Exception when calling WorkspaceAdminRulesApi#createAdminRule"); e.printStackTrace(); } } @@ -10494,44 +11191,48 @@

    Usage and SDK Samples

    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
     
    +final AdminRule adminRule = new AdminRule(); // AdminRule | 
    +final InsertPosition position = new InsertPosition(); // InsertPosition | Displacement option related to how to interpret the Rule's priority
     
     try {
    -    final result = await api_instance.countAllAdminRules();
    +    final result = await api_instance.createAdminRule(adminRule, position);
         print(result);
     } catch (e) {
    -    print('Exception when calling DefaultApi->countAllAdminRules: $e\n');
    +    print('Exception when calling DefaultApi->createAdminRule: $e\n');
     }
     
     
    -
    +
    import org.openapitools.client.api.WorkspaceAdminRulesApi;
     
     public class WorkspaceAdminRulesApiExample {
         public static void main(String[] args) {
             WorkspaceAdminRulesApi apiInstance = new WorkspaceAdminRulesApi();
    +        AdminRule adminRule = ; // AdminRule | 
    +        InsertPosition position = ; // InsertPosition | Displacement option related to how to interpret the Rule's priority
     
             try {
    -            'Integer' result = apiInstance.countAllAdminRules();
    +            AdminRule result = apiInstance.createAdminRule(adminRule, position);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling WorkspaceAdminRulesApi#countAllAdminRules");
    +            System.err.println("Exception when calling WorkspaceAdminRulesApi#createAdminRule");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     // Configure HTTP basic authorization (authentication scheme: basicAuth)
     [apiConfig setUsername:@"YOUR_USERNAME"];
    @@ -10539,9 +11240,12 @@ 

    Usage and SDK Samples

    // Create an instance of the API class WorkspaceAdminRulesApi *apiInstance = [[WorkspaceAdminRulesApi alloc] init]; +AdminRule *adminRule = ; // +InsertPosition *position = ; // Displacement option related to how to interpret the Rule's priority (optional) (default to null) -[apiInstance countAllAdminRulesWithCompletionHandler: - ^('Integer' output, NSError* error) { +[apiInstance createAdminRuleWith:adminRule + position:position + completionHandler: ^(AdminRule output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -10552,7 +11256,7 @@

    Usage and SDK Samples

    -
    +
    var GeoServerAcl = require('geo_server_acl');
     var defaultClient = GeoServerAcl.ApiClient.instance;
     
    @@ -10563,6 +11267,11 @@ 

    Usage and SDK Samples

    // Create an instance of the API class var api = new GeoServerAcl.WorkspaceAdminRulesApi() +var adminRule = ; // {AdminRule} +var opts = { + 'position': // {InsertPosition} Displacement option related to how to interpret the Rule's priority +}; + var callback = function(error, data, response) { if (error) { console.error(error); @@ -10570,14 +11279,14 @@

    Usage and SDK Samples

    console.log('API called successfully. Returned data: ' + data); } }; -api.countAllAdminRules(callback); +api.createAdminRule(adminRule, opts, callback);
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -10586,7 +11295,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class countAllAdminRulesExample + public class createAdminRuleExample { public void main() { @@ -10596,12 +11305,14 @@

    Usage and SDK Samples

    // Create an instance of the API class var apiInstance = new WorkspaceAdminRulesApi(); + var adminRule = new AdminRule(); // AdminRule | + var position = new InsertPosition(); // InsertPosition | Displacement option related to how to interpret the Rule's priority (optional) (default to null) try { - 'Integer' result = apiInstance.countAllAdminRules(); + AdminRule result = apiInstance.createAdminRule(adminRule, position); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling WorkspaceAdminRulesApi.countAllAdminRules: " + e.Message ); + Debug.Print("Exception when calling WorkspaceAdminRulesApi.createAdminRule: " + e.Message ); } } } @@ -10609,7 +11320,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     // Configure HTTP basic authorization: basicAuth
    @@ -10618,17 +11329,19 @@ 

    Usage and SDK Samples

    // Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\WorkspaceAdminRulesApi(); +$adminRule = ; // AdminRule | +$position = ; // InsertPosition | Displacement option related to how to interpret the Rule's priority try { - $result = $api_instance->countAllAdminRules(); + $result = $api_instance->createAdminRule($adminRule, $position); print_r($result); } catch (Exception $e) { - echo 'Exception when calling WorkspaceAdminRulesApi->countAllAdminRules: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling WorkspaceAdminRulesApi->createAdminRule: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
     use WWW::OPenAPIClient::WorkspaceAdminRulesApi;
    @@ -10638,17 +11351,19 @@ 

    Usage and SDK Samples

    # Create an instance of the API class my $api_instance = WWW::OPenAPIClient::WorkspaceAdminRulesApi->new(); +my $adminRule = WWW::OPenAPIClient::Object::AdminRule->new(); # AdminRule | +my $position = ; # InsertPosition | Displacement option related to how to interpret the Rule's priority eval { - my $result = $api_instance->countAllAdminRules(); + my $result = $api_instance->createAdminRule(adminRule => $adminRule, position => $position); print Dumper($result); }; if ($@) { - warn "Exception when calling WorkspaceAdminRulesApi->countAllAdminRules: $@\n"; + warn "Exception when calling WorkspaceAdminRulesApi->createAdminRule: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -10660,21 +11375,25 @@ 

    Usage and SDK Samples

    # Create an instance of the API class api_instance = openapi_client.WorkspaceAdminRulesApi() +adminRule = # AdminRule | +position = # InsertPosition | Displacement option related to how to interpret the Rule's priority (optional) (default to null) try: - api_response = api_instance.count_all_admin_rules() + api_response = api_instance.create_admin_rule(adminRule, position=position) pprint(api_response) except ApiException as e: - print("Exception when calling WorkspaceAdminRulesApi->countAllAdminRules: %s\n" % e)
    + print("Exception when calling WorkspaceAdminRulesApi->createAdminRule: %s\n" % e)
    -
    +
    extern crate WorkspaceAdminRulesApi;
     
     pub fn main() {
    +    let adminRule = ; // AdminRule
    +    let position = ; // InsertPosition
     
         let mut context = WorkspaceAdminRulesApi::Context::default();
    -    let result = client.countAllAdminRules(&context).wait();
    +    let result = client.createAdminRule(adminRule, position, &context).wait();
     
         println!("{:?}", result);
     }
    @@ -10691,27 +11410,105 @@ 

    Parameters

    +
    Body parameters
    + + + + + + + + + +
    NameDescription
    adminRule * +

    + +
    +
    + + +
    Query parameters
    + + + + + + + + +
    NameDescription
    position + + +
    +
    +
    + + InsertPosition + +
    +Displacement option related to how to interpret the Rule's priority +
    +
    +
    +
    +

    Responses

    -

    -

    - -

    -
    -
    +
    +
    -

    createAdminRule

    +

    deleteAdminRuleById

    @@ -10772,48 +11569,34 @@

    createAdminRule


    -
    /adminrules
    +
    /adminrules/id/{id}

    Usage and SDK Samples

    -
    -
    curl -X POST \
    +                          
    +
    curl -X DELETE \
      -H "Authorization: Basic [[basicHash]]" \
    - -H "Accept: application/json,application/x-jackson-smile" \
    - -H "Content-Type: application/json,application/x-jackson-smile" \
    - "/api/adminrules?position=" \
    - -d '{
    -  "workspace" : "workspace",
    -  "role" : "role",
    -  "name" : "name",
    -  "addressRange" : "addressRange",
    -  "description" : "description",
    -  "id" : "id",
    -  "extId" : "extId",
    -  "priority" : 0,
    -  "user" : "user"
    -}' \
    - -d 'Custom MIME type example not yet supported: application/x-jackson-smile'
    + "/api/adminrules/id/{id}"
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -10832,14 +11615,12 @@ 

    Usage and SDK Samples

    // Create an instance of the API class WorkspaceAdminRulesApi apiInstance = new WorkspaceAdminRulesApi(); - AdminRule adminRule = ; // AdminRule | - InsertPosition position = ; // InsertPosition | Displacement option related to how to interpret the Rule's priority + String id = id_example; // String | The rule identifier try { - AdminRule result = apiInstance.createAdminRule(adminRule, position); - System.out.println(result); + apiInstance.deleteAdminRuleById(id); } catch (ApiException e) { - System.err.println("Exception when calling WorkspaceAdminRulesApi#createAdminRule"); + System.err.println("Exception when calling WorkspaceAdminRulesApi#deleteAdminRuleById"); e.printStackTrace(); } } @@ -10847,48 +11628,45 @@

    Usage and SDK Samples

    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
     
    -final AdminRule adminRule = new AdminRule(); // AdminRule | 
    -final InsertPosition position = new InsertPosition(); // InsertPosition | Displacement option related to how to interpret the Rule's priority
    +final String id = new String(); // String | The rule identifier
     
     try {
    -    final result = await api_instance.createAdminRule(adminRule, position);
    +    final result = await api_instance.deleteAdminRuleById(id);
         print(result);
     } catch (e) {
    -    print('Exception when calling DefaultApi->createAdminRule: $e\n');
    +    print('Exception when calling DefaultApi->deleteAdminRuleById: $e\n');
     }
     
     
    -
    +
    import org.openapitools.client.api.WorkspaceAdminRulesApi;
     
     public class WorkspaceAdminRulesApiExample {
         public static void main(String[] args) {
             WorkspaceAdminRulesApi apiInstance = new WorkspaceAdminRulesApi();
    -        AdminRule adminRule = ; // AdminRule | 
    -        InsertPosition position = ; // InsertPosition | Displacement option related to how to interpret the Rule's priority
    +        String id = id_example; // String | The rule identifier
     
             try {
    -            AdminRule result = apiInstance.createAdminRule(adminRule, position);
    -            System.out.println(result);
    +            apiInstance.deleteAdminRuleById(id);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling WorkspaceAdminRulesApi#createAdminRule");
    +            System.err.println("Exception when calling WorkspaceAdminRulesApi#deleteAdminRuleById");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     // Configure HTTP basic authorization (authentication scheme: basicAuth)
     [apiConfig setUsername:@"YOUR_USERNAME"];
    @@ -10896,15 +11674,10 @@ 

    Usage and SDK Samples

    // Create an instance of the API class WorkspaceAdminRulesApi *apiInstance = [[WorkspaceAdminRulesApi alloc] init]; -AdminRule *adminRule = ; // -InsertPosition *position = ; // Displacement option related to how to interpret the Rule's priority (optional) (default to null) +String *id = id_example; // The rule identifier (default to null) -[apiInstance createAdminRuleWith:adminRule - position:position - completionHandler: ^(AdminRule output, NSError* error) { - if (output) { - NSLog(@"%@", output); - } +[apiInstance deleteAdminRuleByIdWith:id + completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error: %@", error); } @@ -10912,7 +11685,7 @@

    Usage and SDK Samples

    -
    +
    var GeoServerAcl = require('geo_server_acl');
     var defaultClient = GeoServerAcl.ApiClient.instance;
     
    @@ -10923,26 +11696,23 @@ 

    Usage and SDK Samples

    // Create an instance of the API class var api = new GeoServerAcl.WorkspaceAdminRulesApi() -var adminRule = ; // {AdminRule} -var opts = { - 'position': // {InsertPosition} Displacement option related to how to interpret the Rule's priority -}; +var id = id_example; // {String} The rule identifier var callback = function(error, data, response) { if (error) { console.error(error); } else { - console.log('API called successfully. Returned data: ' + data); + console.log('API called successfully.'); } }; -api.createAdminRule(adminRule, opts, callback); +api.deleteAdminRuleById(id, callback);
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -10951,7 +11721,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createAdminRuleExample + public class deleteAdminRuleByIdExample { public void main() { @@ -10961,14 +11731,12 @@

    Usage and SDK Samples

    // Create an instance of the API class var apiInstance = new WorkspaceAdminRulesApi(); - var adminRule = new AdminRule(); // AdminRule | - var position = new InsertPosition(); // InsertPosition | Displacement option related to how to interpret the Rule's priority (optional) (default to null) + var id = id_example; // String | The rule identifier (default to null) try { - AdminRule result = apiInstance.createAdminRule(adminRule, position); - Debug.WriteLine(result); + apiInstance.deleteAdminRuleById(id); } catch (Exception e) { - Debug.Print("Exception when calling WorkspaceAdminRulesApi.createAdminRule: " + e.Message ); + Debug.Print("Exception when calling WorkspaceAdminRulesApi.deleteAdminRuleById: " + e.Message ); } } } @@ -10976,7 +11744,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     // Configure HTTP basic authorization: basicAuth
    @@ -10985,19 +11753,17 @@ 

    Usage and SDK Samples

    // Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\WorkspaceAdminRulesApi(); -$adminRule = ; // AdminRule | -$position = ; // InsertPosition | Displacement option related to how to interpret the Rule's priority +$id = id_example; // String | The rule identifier try { - $result = $api_instance->createAdminRule($adminRule, $position); - print_r($result); + $api_instance->deleteAdminRuleById($id); } catch (Exception $e) { - echo 'Exception when calling WorkspaceAdminRulesApi->createAdminRule: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling WorkspaceAdminRulesApi->deleteAdminRuleById: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
     use WWW::OPenAPIClient::WorkspaceAdminRulesApi;
    @@ -11007,19 +11773,17 @@ 

    Usage and SDK Samples

    # Create an instance of the API class my $api_instance = WWW::OPenAPIClient::WorkspaceAdminRulesApi->new(); -my $adminRule = WWW::OPenAPIClient::Object::AdminRule->new(); # AdminRule | -my $position = ; # InsertPosition | Displacement option related to how to interpret the Rule's priority +my $id = id_example; # String | The rule identifier eval { - my $result = $api_instance->createAdminRule(adminRule => $adminRule, position => $position); - print Dumper($result); + $api_instance->deleteAdminRuleById(id => $id); }; if ($@) { - warn "Exception when calling WorkspaceAdminRulesApi->createAdminRule: $@\n"; + warn "Exception when calling WorkspaceAdminRulesApi->deleteAdminRuleById: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -11031,25 +11795,22 @@ 

    Usage and SDK Samples

    # Create an instance of the API class api_instance = openapi_client.WorkspaceAdminRulesApi() -adminRule = # AdminRule | -position = # InsertPosition | Displacement option related to how to interpret the Rule's priority (optional) (default to null) +id = id_example # String | The rule identifier (default to null) try: - api_response = api_instance.create_admin_rule(adminRule, position=position) - pprint(api_response) + api_instance.delete_admin_rule_by_id(id) except ApiException as e: - print("Exception when calling WorkspaceAdminRulesApi->createAdminRule: %s\n" % e)
    + print("Exception when calling WorkspaceAdminRulesApi->deleteAdminRuleById: %s\n" % e)
    -
    +
    extern crate WorkspaceAdminRulesApi;
     
     pub fn main() {
    -    let adminRule = ; // AdminRule
    -    let position = ; // InsertPosition
    +    let id = id_example; // String
     
         let mut context = WorkspaceAdminRulesApi::Context::default();
    -    let result = client.createAdminRule(adminRule, position, &context).wait();
    +    let result = client.deleteAdminRuleById(id, &context).wait();
     
         println!("{:?}", result);
     }
    @@ -11064,82 +11825,30 @@ 

    Scopes

    Parameters

    - - -
    Body parameters
    - - - - - - - - - -
    NameDescription
    adminRule * -

    - -
    -
    - - -
    Query parameters
    +
    Path parameters
    - - - - - + + + + + @@ -11147,112 +11856,99 @@

    Parameters

    NameDescription
    position
    NameDescription
    id* -
    +
    - InsertPosition + String
    -Displacement option related to how to interpret the Rule's priority +The rule identifier
    +
    + Required +
    + + + +

    Responses

    -

    -

    +

    +

    - +
    +
    +

    +

    + -
    -
    -
    - -
    - -
    + + + + +

    -
    -
    +
    +
    -

    deleteAdminRuleById

    +

    deleteAllAdminRules

    -

    +

    Atomically deletes all admin rules and return the number of rules removed


    -
    /adminrules/id/{id}
    +
    /adminrules/query/count

    Usage and SDK Samples

    -
    +
    curl -X DELETE \
      -H "Authorization: Basic [[basicHash]]" \
    - "/api/adminrules/id/{id}"
    + -H "Accept: application/json" \
    + "/api/adminrules/query/count"
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -11271,12 +11967,12 @@ 

    Usage and SDK Samples

    // Create an instance of the API class WorkspaceAdminRulesApi apiInstance = new WorkspaceAdminRulesApi(); - String id = id_example; // String | The rule identifier try { - apiInstance.deleteAdminRuleById(id); + 'Integer' result = apiInstance.deleteAllAdminRules(); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling WorkspaceAdminRulesApi#deleteAdminRuleById"); + System.err.println("Exception when calling WorkspaceAdminRulesApi#deleteAllAdminRules"); e.printStackTrace(); } } @@ -11284,45 +11980,44 @@

    Usage and SDK Samples

    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
     
    -final String id = new String(); // String | The rule identifier
     
     try {
    -    final result = await api_instance.deleteAdminRuleById(id);
    +    final result = await api_instance.deleteAllAdminRules();
         print(result);
     } catch (e) {
    -    print('Exception when calling DefaultApi->deleteAdminRuleById: $e\n');
    +    print('Exception when calling DefaultApi->deleteAllAdminRules: $e\n');
     }
     
     
    -
    +
    import org.openapitools.client.api.WorkspaceAdminRulesApi;
     
     public class WorkspaceAdminRulesApiExample {
         public static void main(String[] args) {
             WorkspaceAdminRulesApi apiInstance = new WorkspaceAdminRulesApi();
    -        String id = id_example; // String | The rule identifier
     
             try {
    -            apiInstance.deleteAdminRuleById(id);
    +            'Integer' result = apiInstance.deleteAllAdminRules();
    +            System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling WorkspaceAdminRulesApi#deleteAdminRuleById");
    +            System.err.println("Exception when calling WorkspaceAdminRulesApi#deleteAllAdminRules");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     // Configure HTTP basic authorization (authentication scheme: basicAuth)
     [apiConfig setUsername:@"YOUR_USERNAME"];
    @@ -11330,10 +12025,12 @@ 

    Usage and SDK Samples

    // Create an instance of the API class WorkspaceAdminRulesApi *apiInstance = [[WorkspaceAdminRulesApi alloc] init]; -String *id = id_example; // The rule identifier (default to null) -[apiInstance deleteAdminRuleByIdWith:id - completionHandler: ^(NSError* error) { +[apiInstance deleteAllAdminRulesWithCompletionHandler: + ^('Integer' output, NSError* error) { + if (output) { + NSLog(@"%@", output); + } if (error) { NSLog(@"Error: %@", error); } @@ -11341,7 +12038,7 @@

    Usage and SDK Samples

    -
    +
    var GeoServerAcl = require('geo_server_acl');
     var defaultClient = GeoServerAcl.ApiClient.instance;
     
    @@ -11352,23 +12049,21 @@ 

    Usage and SDK Samples

    // Create an instance of the API class var api = new GeoServerAcl.WorkspaceAdminRulesApi() -var id = id_example; // {String} The rule identifier - var callback = function(error, data, response) { if (error) { console.error(error); } else { - console.log('API called successfully.'); + console.log('API called successfully. Returned data: ' + data); } }; -api.deleteAdminRuleById(id, callback); +api.deleteAllAdminRules(callback);
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -11377,7 +12072,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class deleteAdminRuleByIdExample + public class deleteAllAdminRulesExample { public void main() { @@ -11387,12 +12082,12 @@

    Usage and SDK Samples

    // Create an instance of the API class var apiInstance = new WorkspaceAdminRulesApi(); - var id = id_example; // String | The rule identifier (default to null) try { - apiInstance.deleteAdminRuleById(id); + 'Integer' result = apiInstance.deleteAllAdminRules(); + Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling WorkspaceAdminRulesApi.deleteAdminRuleById: " + e.Message ); + Debug.Print("Exception when calling WorkspaceAdminRulesApi.deleteAllAdminRules: " + e.Message ); } } } @@ -11400,7 +12095,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     // Configure HTTP basic authorization: basicAuth
    @@ -11409,17 +12104,17 @@ 

    Usage and SDK Samples

    // Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\WorkspaceAdminRulesApi(); -$id = id_example; // String | The rule identifier try { - $api_instance->deleteAdminRuleById($id); + $result = $api_instance->deleteAllAdminRules(); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling WorkspaceAdminRulesApi->deleteAdminRuleById: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling WorkspaceAdminRulesApi->deleteAllAdminRules: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
     use WWW::OPenAPIClient::WorkspaceAdminRulesApi;
    @@ -11429,17 +12124,17 @@ 

    Usage and SDK Samples

    # Create an instance of the API class my $api_instance = WWW::OPenAPIClient::WorkspaceAdminRulesApi->new(); -my $id = id_example; # String | The rule identifier eval { - $api_instance->deleteAdminRuleById(id => $id); + my $result = $api_instance->deleteAllAdminRules(); + print Dumper($result); }; if ($@) { - warn "Exception when calling WorkspaceAdminRulesApi->deleteAdminRuleById: $@\n"; + warn "Exception when calling WorkspaceAdminRulesApi->deleteAllAdminRules: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -11451,22 +12146,21 @@ 

    Usage and SDK Samples

    # Create an instance of the API class api_instance = openapi_client.WorkspaceAdminRulesApi() -id = id_example # String | The rule identifier (default to null) try: - api_instance.delete_admin_rule_by_id(id) + api_response = api_instance.delete_all_admin_rules() + pprint(api_response) except ApiException as e: - print("Exception when calling WorkspaceAdminRulesApi->deleteAdminRuleById: %s\n" % e)
    + print("Exception when calling WorkspaceAdminRulesApi->deleteAllAdminRules: %s\n" % e)
    -
    +
    extern crate WorkspaceAdminRulesApi;
     
     pub fn main() {
    -    let id = id_example; // String
     
         let mut context = WorkspaceAdminRulesApi::Context::default();
    -    let result = client.deleteAdminRuleById(id, &context).wait();
    +    let result = client.deleteAllAdminRules(&context).wait();
     
         println!("{:?}", result);
     }
    @@ -11481,85 +12175,73 @@ 

    Scopes

    Parameters

    -
    Path parameters
    - - - - - - - - - -
    NameDescription
    id* - - -
    -
    -
    - - String - - -
    -The rule identifier -
    -
    -
    - Required -
    -
    -
    -

    Responses

    -

    -

    +

    +

    - - - -
    -
    -

    -

    - +
    diff --git a/src/domain/adminrule-management/src/main/java/org/geoserver/acl/domain/adminrules/AdminRuleAdminService.java b/src/domain/adminrule-management/src/main/java/org/geoserver/acl/domain/adminrules/AdminRuleAdminService.java index 3b0c7a5..e87f75b 100644 --- a/src/domain/adminrule-management/src/main/java/org/geoserver/acl/domain/adminrules/AdminRuleAdminService.java +++ b/src/domain/adminrule-management/src/main/java/org/geoserver/acl/domain/adminrules/AdminRuleAdminService.java @@ -78,4 +78,6 @@ public interface AdminRuleAdminService { int count(AdminRuleFilter filter); boolean exists(String id); + + int deleteAll(); } diff --git a/src/domain/adminrule-management/src/main/java/org/geoserver/acl/domain/adminrules/AdminRuleAdminServiceImpl.java b/src/domain/adminrule-management/src/main/java/org/geoserver/acl/domain/adminrules/AdminRuleAdminServiceImpl.java index aa0f491..3ece259 100644 --- a/src/domain/adminrule-management/src/main/java/org/geoserver/acl/domain/adminrules/AdminRuleAdminServiceImpl.java +++ b/src/domain/adminrule-management/src/main/java/org/geoserver/acl/domain/adminrules/AdminRuleAdminServiceImpl.java @@ -109,6 +109,11 @@ public boolean delete(@NonNull String id) { return deleted; } + @Override + public int deleteAll() { + return repository.deleteAll(); + } + @Override public Stream getAll() { return repository.findAll(); diff --git a/src/domain/adminrule-management/src/main/java/org/geoserver/acl/domain/adminrules/AdminRuleRepository.java b/src/domain/adminrule-management/src/main/java/org/geoserver/acl/domain/adminrules/AdminRuleRepository.java index 821e097..7c0eb06 100644 --- a/src/domain/adminrule-management/src/main/java/org/geoserver/acl/domain/adminrules/AdminRuleRepository.java +++ b/src/domain/adminrule-management/src/main/java/org/geoserver/acl/domain/adminrules/AdminRuleRepository.java @@ -42,5 +42,7 @@ public interface AdminRuleRepository { boolean deleteById(String id); + int deleteAll(); + Optional findOneByPriority(long priority); } diff --git a/src/domain/adminrule-management/src/test/java/org/geoserver/acl/domain/adminrules/MemoryAdminRuleRepository.java b/src/domain/adminrule-management/src/test/java/org/geoserver/acl/domain/adminrules/MemoryAdminRuleRepository.java index fe634e3..a1ea2cd 100644 --- a/src/domain/adminrule-management/src/test/java/org/geoserver/acl/domain/adminrules/MemoryAdminRuleRepository.java +++ b/src/domain/adminrule-management/src/test/java/org/geoserver/acl/domain/adminrules/MemoryAdminRuleRepository.java @@ -193,6 +193,13 @@ public boolean deleteById(String id) { return rules.removeIf(r -> r.getId().equals(id)); } + @Override + public int deleteAll() { + int count = rules.size(); + rules.clear(); + return count; + } + @Override public Optional findOneByPriority(long priority) { return rules.stream().filter(r -> r.getPriority() == priority).findFirst(); diff --git a/src/domain/rule-management/src/main/java/org/geoserver/acl/domain/rules/RuleAdminService.java b/src/domain/rule-management/src/main/java/org/geoserver/acl/domain/rules/RuleAdminService.java index 0e34694..fe986a9 100644 --- a/src/domain/rule-management/src/main/java/org/geoserver/acl/domain/rules/RuleAdminService.java +++ b/src/domain/rule-management/src/main/java/org/geoserver/acl/domain/rules/RuleAdminService.java @@ -137,4 +137,6 @@ public interface RuleAdminService { * RuleIdentifier#getLayer() layer} set */ Set getAllowedStyles(String ruleId); + + int deleteAll(); } diff --git a/src/domain/rule-management/src/main/java/org/geoserver/acl/domain/rules/RuleAdminServiceImpl.java b/src/domain/rule-management/src/main/java/org/geoserver/acl/domain/rules/RuleAdminServiceImpl.java index cd5d0a9..16a0f69 100644 --- a/src/domain/rule-management/src/main/java/org/geoserver/acl/domain/rules/RuleAdminServiceImpl.java +++ b/src/domain/rule-management/src/main/java/org/geoserver/acl/domain/rules/RuleAdminServiceImpl.java @@ -154,6 +154,11 @@ public boolean delete(@NonNull String id) { return deleted; } + @Override + public int deleteAll() { + return ruleRepository.deleteAll(); + } + @Override public Stream getAll() { return ruleRepository.findAll(); diff --git a/src/domain/rule-management/src/main/java/org/geoserver/acl/domain/rules/RuleRepository.java b/src/domain/rule-management/src/main/java/org/geoserver/acl/domain/rules/RuleRepository.java index e4d2fac..9eeeb74 100644 --- a/src/domain/rule-management/src/main/java/org/geoserver/acl/domain/rules/RuleRepository.java +++ b/src/domain/rule-management/src/main/java/org/geoserver/acl/domain/rules/RuleRepository.java @@ -26,6 +26,8 @@ public interface RuleRepository { boolean deleteById(String id); + int deleteAll(); + int count(); /** diff --git a/src/domain/rule-management/src/test/java/org/geoserver/acl/domain/rules/MemoryRuleRepository.java b/src/domain/rule-management/src/test/java/org/geoserver/acl/domain/rules/MemoryRuleRepository.java index f77cedf..acb7ca3 100644 --- a/src/domain/rule-management/src/test/java/org/geoserver/acl/domain/rules/MemoryRuleRepository.java +++ b/src/domain/rule-management/src/test/java/org/geoserver/acl/domain/rules/MemoryRuleRepository.java @@ -128,6 +128,14 @@ public boolean deleteById(@NonNull String id) { return rules.removeIf(r -> id.equals(r.getId())); } + @Override + public int deleteAll() { + int count = rules.size(); + layerDetails.clear(); + rules.clear(); + return count; + } + @Override public int count() { return rules.size(); diff --git a/src/domain/rule-management/src/test/java/org/geoserver/acl/domain/rules/RuleAdminServiceIT.java b/src/domain/rule-management/src/test/java/org/geoserver/acl/domain/rules/RuleAdminServiceIT.java index 9b6eb23..41ed440 100644 --- a/src/domain/rule-management/src/test/java/org/geoserver/acl/domain/rules/RuleAdminServiceIT.java +++ b/src/domain/rule-management/src/test/java/org/geoserver/acl/domain/rules/RuleAdminServiceIT.java @@ -187,6 +187,26 @@ void testCreateRule_insertPosition_FromEnd(TestInfo testInfo) { r2.withPriority(5))); } + @Test + void testDeleteAll() { + ruleAdminService.insert(Rule.allow().withPriority(10).withLayer("L1")); + ruleAdminService.insert( + Rule.limit().withPriority(11).withLayer("L2").withRuleLimits(sampleLimits())); + + Rule r3 = ruleAdminService.insert(Rule.allow().withPriority(12).withLayer("L2")); + ruleAdminService.setLayerDetails(r3.getId(), sampleDetails(0)); + ruleAdminService.setAllowedStyles(r3.getId(), Set.of("style1", "style2", "style3")); + + final int expected = 3; + assertThat(ruleAdminService.count()).isEqualTo(expected); + + int ret = ruleAdminService.deleteAll(); + assertThat(ret).isEqualTo(expected); + assertThat(ruleAdminService.deleteAll()).isZero(); + + assertThat(ruleAdminService.getAll()).isEmpty(); + } + @Test void testDeleteRuleById() { Rule r1 = ruleAdminService.insert(Rule.allow().withPriority(10).withLayer("L1")); diff --git a/src/integration/openapi/java-client/src/main/java/org/geoserver/acl/api/client/integration/AdminRuleRepositoryClientAdaptor.java b/src/integration/openapi/java-client/src/main/java/org/geoserver/acl/api/client/integration/AdminRuleRepositoryClientAdaptor.java index 90010e8..0db7359 100644 --- a/src/integration/openapi/java-client/src/main/java/org/geoserver/acl/api/client/integration/AdminRuleRepositoryClientAdaptor.java +++ b/src/integration/openapi/java-client/src/main/java/org/geoserver/acl/api/client/integration/AdminRuleRepositoryClientAdaptor.java @@ -129,6 +129,11 @@ public boolean deleteById(@NonNull String id) { } } + @Override + public int deleteAll() { + return apiClient.deleteAllAdminRules(); + } + @Override public Optional findOneByPriority(long priority) { org.geoserver.acl.api.model.AdminRule found; diff --git a/src/integration/openapi/java-client/src/main/java/org/geoserver/acl/api/client/integration/RuleRepositoryClientAdaptor.java b/src/integration/openapi/java-client/src/main/java/org/geoserver/acl/api/client/integration/RuleRepositoryClientAdaptor.java index 0c80534..6ac42a7 100644 --- a/src/integration/openapi/java-client/src/main/java/org/geoserver/acl/api/client/integration/RuleRepositoryClientAdaptor.java +++ b/src/integration/openapi/java-client/src/main/java/org/geoserver/acl/api/client/integration/RuleRepositoryClientAdaptor.java @@ -89,6 +89,11 @@ public boolean deleteById(@NonNull String id) { return true; } + @Override + public int deleteAll() { + return apiClient.deleteAllRules(); + } + @Override public int count() { return apiClient.countAllRules(); diff --git a/src/integration/openapi/spring-server/src/main/java/org/geoserver/acl/api/server/rules/DataRulesApiImpl.java b/src/integration/openapi/spring-server/src/main/java/org/geoserver/acl/api/server/rules/DataRulesApiImpl.java index cad8cf6..3fb2294 100644 --- a/src/integration/openapi/spring-server/src/main/java/org/geoserver/acl/api/server/rules/DataRulesApiImpl.java +++ b/src/integration/openapi/spring-server/src/main/java/org/geoserver/acl/api/server/rules/DataRulesApiImpl.java @@ -69,6 +69,12 @@ public ResponseEntity deleteRuleById(@NonNull String id) { return ResponseEntity.status(status).build(); } + @Override + @IsAdmin + public ResponseEntity deleteAllRules() { + return ResponseEntity.ok(service.deleteAll()); + } + @Override public ResponseEntity> getRules(Integer limit, String nextCursor) { return query(RuleQuery.of(limit, nextCursor)); diff --git a/src/integration/openapi/spring-server/src/main/java/org/geoserver/acl/api/server/rules/WorkspaceAdminRulesApiImpl.java b/src/integration/openapi/spring-server/src/main/java/org/geoserver/acl/api/server/rules/WorkspaceAdminRulesApiImpl.java index 3b9f9ef..b7b8ee2 100644 --- a/src/integration/openapi/spring-server/src/main/java/org/geoserver/acl/api/server/rules/WorkspaceAdminRulesApiImpl.java +++ b/src/integration/openapi/spring-server/src/main/java/org/geoserver/acl/api/server/rules/WorkspaceAdminRulesApiImpl.java @@ -69,6 +69,12 @@ public class WorkspaceAdminRulesApiImpl implements WorkspaceAdminRulesApiDelegat return ResponseEntity.status(deleted ? OK : NOT_FOUND).build(); } + @Override + @IsAdmin + public ResponseEntity deleteAllAdminRules() { + return ResponseEntity.ok(service.deleteAll()); + } + public @Override ResponseEntity adminRuleExistsById(@NonNull String id) { return ResponseEntity.ok(service.exists(id)); } diff --git a/src/integration/persistence-jpa/integration/src/main/java/org/geoserver/acl/integration/jpa/repository/AdminRuleRepositoryJpaAdaptor.java b/src/integration/persistence-jpa/integration/src/main/java/org/geoserver/acl/integration/jpa/repository/AdminRuleRepositoryJpaAdaptor.java index 874e5f5..f37f70d 100644 --- a/src/integration/persistence-jpa/integration/src/main/java/org/geoserver/acl/integration/jpa/repository/AdminRuleRepositoryJpaAdaptor.java +++ b/src/integration/persistence-jpa/integration/src/main/java/org/geoserver/acl/integration/jpa/repository/AdminRuleRepositoryJpaAdaptor.java @@ -276,6 +276,14 @@ public boolean deleteById(@NonNull String id) { return 1 == jparepo.deleteById(decodeId(id).longValue()); } + @Override + @TransactionRequired + public int deleteAll() { + int count = count(); + jparepo.deleteAll(); + return count; + } + private org.geoserver.acl.jpa.model.AdminRule getOrThrowIAE(@NonNull String ruleId) { org.geoserver.acl.jpa.model.AdminRule rule; try { diff --git a/src/integration/persistence-jpa/integration/src/main/java/org/geoserver/acl/integration/jpa/repository/RuleRepositoryJpaAdaptor.java b/src/integration/persistence-jpa/integration/src/main/java/org/geoserver/acl/integration/jpa/repository/RuleRepositoryJpaAdaptor.java index 3530225..1546695 100644 --- a/src/integration/persistence-jpa/integration/src/main/java/org/geoserver/acl/integration/jpa/repository/RuleRepositoryJpaAdaptor.java +++ b/src/integration/persistence-jpa/integration/src/main/java/org/geoserver/acl/integration/jpa/repository/RuleRepositoryJpaAdaptor.java @@ -275,6 +275,14 @@ public boolean deleteById(@NonNull String id) { return true; } + @Override + @TransactionRequired + public int deleteAll() { + int count = count(); + jparepo.deleteAll(); + return count; + } + @Override public boolean existsById(@NonNull String id) { return jparepo.existsById(decodeId(id)); diff --git a/src/openapi/acl-api.yaml b/src/openapi/acl-api.yaml index 93b9407..0c35d82 100644 --- a/src/openapi/acl-api.yaml +++ b/src/openapi/acl-api.yaml @@ -55,6 +55,14 @@ paths: schema: type: string description: Error reason, including offending property names + delete: + operationId: deleteAllRules + description: Atomically deletes all data rules and return the number of rules removed + tags: + - DataRules + responses: + '200': + $ref: '#/components/responses/Count' /rules/query: post: @@ -356,6 +364,15 @@ paths: responses: '201': $ref: '#/components/responses/AdminRule' + delete: + operationId: deleteAllAdminRules + description: Atomically deletes all admin rules and return the number of rules removed + tags: + - WorkspaceAdminRules + responses: + '200': + $ref: '#/components/responses/Count' + /adminrules/query: post: parameters: @@ -402,6 +419,7 @@ paths: responses: '200': $ref: '#/components/responses/Count' + /adminrules/query/one/priority/{priority}: get: operationId: findOneAdminRuleByPriority