List of usage examples for org.springframework.util MultiValueMap add
void add(K key, @Nullable V value);
From source file:org.kaaproject.kaa.server.common.admin.AdminClient.java
/** * Delete endpoint group by its id.// w ww . j a v a 2s. c o m * * @param endpointGroupId the endpoint group id */ public void deleteEndpointGroup(String endpointGroupId) throws Exception { MultiValueMap<String, Object> params = new LinkedMultiValueMap<>(); params.add("endpointGroupId", endpointGroupId); restTemplate.postForLocation(restTemplate.getUrl() + "delEndpointGroup", params); }
From source file:org.kaaproject.kaa.server.common.admin.AdminClient.java
/** * Delete configuration record by schema id and endpoint group id. * * @param schemaId the schema id//from w ww.ja va 2 s. co m * @param endpointGroupId the endpoint group id */ public void deleteConfigurationRecord(String schemaId, String endpointGroupId) throws Exception { MultiValueMap<String, Object> params = new LinkedMultiValueMap<>(); params.add("schemaId", schemaId); params.add("endpointGroupId", endpointGroupId); restTemplate.postForObject(restTemplate.getUrl() + "delConfigurationRecord", params, Void.class); }
From source file:org.kaaproject.kaa.server.common.admin.AdminClient.java
/** * Delete profile filter record by schema ids and endpoin group id. * * @param endpointProfileSchemaId the endpoint profile schema id * @param serverProfileSchemaId the server profile schema id * @param endpointGroupId the endpoint group id *///from w w w. ja va2 s .c o m public void deleteProfileFilterRecord(String endpointProfileSchemaId, String serverProfileSchemaId, String endpointGroupId) throws Exception { MultiValueMap<String, Object> params = new LinkedMultiValueMap<>(); params.add("endpointProfileSchemaId", endpointProfileSchemaId); params.add("serverProfileSchemaId", serverProfileSchemaId); params.add("endpointGroupId", endpointGroupId); restTemplate.postForObject(restTemplate.getUrl() + "delProfileFilterRecord", params, Void.class); }
From source file:org.kaaproject.kaa.server.common.admin.AdminClient.java
/** * Delete user by user id./*from www . ja v a 2 s . c o m*/ * * @param userId the user id */ public void deleteUser(String userId) throws Exception { MultiValueMap<String, Object> params = new LinkedMultiValueMap<>(); params.add("userId", userId); restTemplate.postForLocation(restTemplate.getUrl() + "delUser", params); }
From source file:org.kaaproject.kaa.server.common.admin.AdminClient.java
/** * Adds the event class family version to existing event class family with * specific id. Current user will be marked as creator of schema. * * @param eventClassFamilyId the event class family id * @param eventClassFamilyVersion the version of event class family *//* w w w .java2s .c o m*/ public void addEventClassFamilyVersion(String eventClassFamilyId, EventClassFamilyVersionDto eventClassFamilyVersion) throws Exception { MultiValueMap<String, Object> params = new LinkedMultiValueMap<>(); params.add("eventClassFamilyId", eventClassFamilyId); params.add("eventClassFamilyVersion", eventClassFamilyVersion); restTemplate.postForLocation(restTemplate.getUrl() + "addEventClassFamilyVersion", params); }
From source file:org.kaaproject.kaa.server.common.admin.AdminClient.java
/** * Delete log appender by its id.//from w ww. ja v a2s. c o m * * @param logAppenderId the log appender id */ public void deleteLogAppender(String logAppenderId) throws Exception { MultiValueMap<String, Object> params = new LinkedMultiValueMap<>(); params.add("logAppenderId", logAppenderId); restTemplate.postForLocation(restTemplate.getUrl() + "delLogAppender", params); }
From source file:org.kaaproject.kaa.server.common.admin.AdminClient.java
/** * Delete user verifier by its id./* w w w. ja v a 2s. c o m*/ * * @param userVerifierId the user verifier id */ public void deleteUserVerifier(String userVerifierId) throws Exception { MultiValueMap<String, Object> params = new LinkedMultiValueMap<>(); params.add("userVerifierId", userVerifierId); restTemplate.postForLocation(restTemplate.getUrl() + "delUserVerifier", params); }
From source file:org.kaaproject.kaa.server.common.admin.AdminClient.java
/** * Deletes an SDK profile by its identifier. * * @param sdkProfile the sdk profile// w w w .jav a 2 s .c o m */ public void deleteSdkProfile(SdkProfileDto sdkProfile) throws Exception { MultiValueMap<String, Object> params = new LinkedMultiValueMap<>(); params.add("topicId", sdkProfile.getId()); restTemplate.postForLocation(restTemplate.getUrl() + "deleteSdkProfile", params); }
From source file:org.kaaproject.kaa.server.common.admin.AdminClient.java
/** * Generates an SDK for the specified target platform from the SDK profile . * * @param sdkProfileId the sdk profile id * @param targetPlatform the target platform */// w w w . j av a2 s .c o m public void downloadSdk(String sdkProfileId, SdkPlatform targetPlatform, String destination) { FileResponseExtractor extractor = new FileResponseExtractor(new File(destination)); MultiValueMap<String, String> parameters = new LinkedMultiValueMap<>(); parameters.add("sdkProfileId", sdkProfileId); parameters.add("targetPlatform", targetPlatform.toString()); RequestCallback request = new DataRequestCallback<>(parameters); restTemplate.execute(restTemplate.getUrl() + "sdk", HttpMethod.POST, request, extractor); }
From source file:org.kaaproject.kaa.server.common.admin.AdminClient.java
/** * Generates an SDK for the specified target platform from specified SDK profile. * * @param sdkProfileId the sdk profile id * @param targetPlatform the target platform *//*from w w w .j a v a 2s . c o m*/ public FileData downloadSdk(String sdkProfileId, SdkPlatform targetPlatform) { FileDataResponseExtractor extractor = new FileDataResponseExtractor(); MultiValueMap<String, String> parameters = new LinkedMultiValueMap<>(); parameters.add("sdkProfileId", sdkProfileId); parameters.add("targetPlatform", targetPlatform.toString()); RequestCallback request = new DataRequestCallback<>(parameters); return restTemplate.execute(restTemplate.getUrl() + "sdk", HttpMethod.POST, request, extractor); }