class CustomDataSourceContextStrategy implements
        ContextManagementStrategy<ClientCustomDataSource, ClientCustomDataSource>,
        GenericTypeMetadataBuilder<ClientCustomDataSource>,
        ContextParametrizedMetadataBuilder<ClientCustomDataSource, PartialMetadataOptions> {

    @Override
    public ClientCustomDataSource getContextForClient(ClientCustomDataSource contextDescription, Map<String, Object> data, Map<String, String[]> additionalProperties) {
        ClientCustomDataSource copy = new ClientCustomDataSource(contextDescription);
        final List<ClientProperty> properties = copy.getProperties();
        if (properties != null) {
            Iterator<ClientProperty> iterator = properties.iterator();
            for (; iterator.hasNext(); ) {
                ClientProperty property = iterator.next();
                if (propertiesToIgnore.contains(property.getKey())) iterator.remove();
            }
        }
        return copy;
    }

}