@Override protected ClientInvocation apply(ClientInvocation invocation, Object object) { Form form = null; Object entity = invocation.getEntity(); if (entity != null) { if (entity instanceof Form) { form = (Form) entity; } else { throw new RuntimeException(Messages.MESSAGES.cannotSetFormParameter()); } } else { form = new Form(); invocation.setEntity(Entity.form(form)); } String value = invocation.getClientConfiguration().toString(object); form.param(paramName, value); return invocation; }
@Override protected ClientInvocationBuilder apply(ClientInvocationBuilder target, Object object) { Form form = null; Object entity = target.getInvocation().getEntity(); if (entity != null) { if (entity instanceof Form) { form = (Form) entity; } else { throw new RuntimeException(Messages.MESSAGES.cannotSetFormParameter()); } } else { form = new Form(); target.getInvocation().setEntity(Entity.form(form)); } String value = target.getInvocation().getClientConfiguration().toString(object); form.param(paramName, value); return target; }
@Override protected ClientInvocationBuilderInterface apply(ClientInvocationBuilderInterface target, Object object) { Form form = null; Object entity = target.getInvocation().getEntity(); if (entity != null) { if (entity instanceof Form) { form = (Form) entity; } else { throw new RuntimeException(Messages.MESSAGES.cannotSetFormParameter()); } } else { form = new Form(); target.getInvocation().setEntity(Entity.form(form)); } String value = target.getInvocation().getClientConfiguration().toString(object); form.param(paramName, value); return target; }