List of usage examples for org.springframework.util LinkedMultiValueMap LinkedMultiValueMap
public LinkedMultiValueMap()
From source file:org.kaaproject.kaa.server.common.admin.AdminClient.java
private NotificationDto sendNotification(NotificationDto notification, ByteArrayResource resource) throws Exception { MultiValueMap<String, Object> params = new LinkedMultiValueMap<>(); params.add("notification", notification); params.add("file", resource); return restTemplate.postForObject(restTemplate.getUrl() + "sendNotification", params, NotificationDto.class); }
From source file:org.kaaproject.kaa.server.common.admin.AdminClient.java
private EndpointNotificationDto sendUnicastNotification(NotificationDto notification, String clientKeyHash, ByteArrayResource resource) throws Exception { MultiValueMap<String, Object> params = new LinkedMultiValueMap<>(); params.add("notification", notification); params.add("endpointKeyHash", clientKeyHash); params.add("file", resource); return restTemplate.postForObject(restTemplate.getUrl() + "sendUnicastNotification", params, EndpointNotificationDto.class); }
From source file:org.kaaproject.kaa.server.common.admin.AdminClient.java
/** * Send unicast notification to the client identified by endpointKeyHash. * * @param notification the notification * @param clientKeyHash the client key hash * @param notificationMessage the body of notification * @return the endpoint notification dto *//*from ww w.j a v a2 s .c om*/ public EndpointNotificationDto sendUnicastNotificationSimplified(NotificationDto notification, String clientKeyHash, String notificationMessage) throws Exception { MultiValueMap<String, Object> params = new LinkedMultiValueMap<>(); params.add("notification", notification); params.add("endpointKeyHash", clientKeyHash); params.add("file", getStringResource("notification", notificationMessage)); return restTemplate.postForObject(restTemplate.getUrl() + "sendUnicastNotification", params, EndpointNotificationDto.class); }
From source file:org.kaaproject.kaa.server.common.admin.AdminClient.java
/** * Delete topic by its id.//from w w w .j a va 2 s. com * * @param topicId the topic id */ public void deleteTopic(String topicId) throws Exception { MultiValueMap<String, Object> params = new LinkedMultiValueMap<>(); params.add("topicId", topicId); restTemplate.postForLocation(restTemplate.getUrl() + "delTopic", params); }
From source file:org.kaaproject.kaa.server.common.admin.AdminClient.java
/** * Delete endpoint group by its id.// w w w . j a v a 2 s.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 www . j ava2 s .c o 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 ww w. j av a 2 s . com 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 w w w . ja v a2s . 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 *///from w w w .j a va2 s . 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 w w. j av a 2s . 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); }