Tabnine Logo
FormRepresentation.getFormItems
Code IndexAdd Tabnine to your IDE (free)

How to use
getFormItems
method
in
org.jbpm.form.builder.services.model.FormRepresentation

Best Java code snippets using org.jbpm.form.builder.services.model.FormRepresentation.getFormItems (Showing top 6 results out of 315)

origin: org.jbpm/form-services

@Override
public String encode(FormRepresentation form) throws FormEncodingException {
  StringBuilder builder = new StringBuilder();
  builder.append("{\n");
  builder.append("  \"name\": ").append(encodeString(form.getName())).append(",\n");
  builder.append("  \"action\": ").append(encodeString(form.getAction())).append(",\n");
  builder.append("  \"processName\": ").append(encodeString(form.getProcessName())).append(",\n");
  builder.append("  \"taskId\": ").append(encodeString(form.getTaskId())).append(",\n");
  builder.append("  \"documentation\": ").append(encodeString(form.getDocumentation())).append(",\n");
  builder.append("  \"enctype\": ").append(encodeString(form.getEnctype())).append(",\n");
  builder.append("  \"lastModified\": \"").append(form.getLastModified()).append("\",\n");
  builder.append("  \"method\": ").append(encodeString(form.getMethod())).append(",\n");
  builder.append("  \"formItems\": ").append(encodeList(form.getFormItems())).append(",\n");
  builder.append("  \"formValidations\": ").append(encodeList(form.getFormValidations())).append(",\n");
  builder.append("  \"inputs\": ").append(encodeInputs(form.getInputs())).append(",\n");
  builder.append("  \"outputs\": ").append(encodeOutputs(form.getOutputs())).append(",\n");
  builder.append("  \"onLoadScripts\": ").append(encodeList(form.getOnLoadScripts())).append(",\n");
  builder.append("  \"onSubmitScripts\": ").append(encodeList(form.getOnSubmitScripts())).append("\n");
  builder.append("}\n");
  return builder.toString();
}

origin: org.jbpm/jbpm-form-services

@Override
public String encode(FormRepresentation form) throws FormEncodingException {
  StringBuilder builder = new StringBuilder();
  builder.append("{\n");
  builder.append("  \"name\": ").append(encodeString(form.getName())).append(",\n");
  builder.append("  \"action\": ").append(encodeString(form.getAction())).append(",\n");
  builder.append("  \"processName\": ").append(encodeString(form.getProcessName())).append(",\n");
  builder.append("  \"taskId\": ").append(encodeString(form.getTaskId())).append(",\n");
  builder.append("  \"documentation\": ").append(encodeString(form.getDocumentation())).append(",\n");
  builder.append("  \"enctype\": ").append(encodeString(form.getEnctype())).append(",\n");
  builder.append("  \"lastModified\": \"").append(form.getLastModified()).append("\",\n");
  builder.append("  \"method\": ").append(encodeString(form.getMethod())).append(",\n");
  builder.append("  \"formItems\": ").append(encodeList(form.getFormItems())).append(",\n");
  builder.append("  \"formValidations\": ").append(encodeList(form.getFormValidations())).append(",\n");
  builder.append("  \"inputs\": ").append(encodeInputs(form.getInputs())).append(",\n");
  builder.append("  \"outputs\": ").append(encodeOutputs(form.getOutputs())).append(",\n");
  builder.append("  \"onLoadScripts\": ").append(encodeList(form.getOnLoadScripts())).append(",\n");
  builder.append("  \"onSubmitScripts\": ").append(encodeList(form.getOnSubmitScripts())).append("\n");
  builder.append("}\n");
  return builder.toString();
}

origin: org.jbpm/form-services

private void abstractTestSaveMenuItemProblem(final Class<?> exceptionType) throws Exception {
  FSMenuService service = createMockedService(exceptionType);
  MenuItemDescription sampleDescription = new MenuItemDescription();
  sampleDescription.setAllowedEvents(new ArrayList<String>());
  sampleDescription.setEffects(new ArrayList<FormEffectDescription>());
  FormItemRepresentation item = MockFormHelper.createMockForm("form", "param1").getFormItems().iterator().next();
  sampleDescription.setItemRepresentationMap(item.getDataMap());
  sampleDescription.setIconUrl("https://www.google.com/images/srpr/logo3w.png");
  sampleDescription.setName("name");
  try {
    service.saveMenuItem("group", sampleDescription);
    fail("saveMenuItem shouldn't succeed");
  } catch (MenuServiceException e) {
    assertNotNull("e shouldn't be null", e);
    Throwable cause = e.getCause();
    assertNotNull("cause shouldn't be null", cause);
    assertTrue("cause should be a " + exceptionType.getName(), cause.getClass().equals(exceptionType));
  }
}
@Test
origin: org.jbpm/jbpm-form-services

private void abstractTestSaveMenuItemProblem(final Class<?> exceptionType) throws Exception {
  FSMenuService service = createMockedService(exceptionType);
  MenuItemDescription sampleDescription = new MenuItemDescription();
  sampleDescription.setAllowedEvents(new ArrayList<String>());
  sampleDescription.setEffects(new ArrayList<FormEffectDescription>());
  FormItemRepresentation item = MockFormHelper.createMockForm("form", "param1").getFormItems().iterator().next();
  sampleDescription.setItemRepresentationMap(item.getDataMap());
  sampleDescription.setIconUrl("https://www.google.com/images/srpr/logo3w.png");
  sampleDescription.setName("name");
  try {
    service.saveMenuItem("group", sampleDescription);
    fail("saveMenuItem shouldn't succeed");
  } catch (MenuServiceException e) {
    assertNotNull("e shouldn't be null", e);
    Throwable cause = e.getCause();
    assertNotNull("cause shouldn't be null", cause);
    assertTrue("cause should be a " + exceptionType.getName(), cause.getClass().equals(exceptionType));
  }
}
@Test
origin: org.jbpm/form-services

  @Test
  public void testSaveMenuItemEncodingProblem() throws Exception {
    FSMenuService service = createMockedService(null);
    MenuItemDescription sampleDescription = new MenuItemDescription();
    sampleDescription.setAllowedEvents(new ArrayList<String>());
    sampleDescription.setEffects(new ArrayList<FormEffectDescription>());
    FormItemRepresentation item = MockFormHelper.createMockForm("form", "param1").getFormItems().iterator().next();
    sampleDescription.setItemRepresentationMap(item.getDataMap());
    sampleDescription.setName("name");
    FormRepresentationEncoder encoder = EasyMock.createMock(FormRepresentationEncoder.class);
    FormEncodingException exception = new FormEncodingException();
    @SuppressWarnings("unchecked")
    Map<String, List<MenuItemDescription>> anyObject = EasyMock.anyObject(Map.class);
    EasyMock.expect(encoder.encodeMenuItemsMap(anyObject)).andThrow(exception).once();
    FormEncodingFactory.register(encoder, FormEncodingFactory.getDecoder());
    
    EasyMock.replay(encoder);
    try {
      service.saveMenuItem("group", sampleDescription);
      fail("saveMenuItem shouldn't succeed");
    } catch (MenuServiceException e) {
      assertNotNull("e shouldn't be null", e);
      Throwable cause = e.getCause();
      assertNotNull("cause shouldn't be null", cause);
      assertTrue("cause should be a FormEncodingException", cause instanceof FormEncodingException);
    }
    EasyMock.verify(encoder);
  }
// THIS TEST REQUIRES THE REAL GWT Components so it should be executed in the showcase    
origin: org.jbpm/jbpm-form-services

  @Test
  public void testSaveMenuItemEncodingProblem() throws Exception {
    FSMenuService service = createMockedService(null);
    MenuItemDescription sampleDescription = new MenuItemDescription();
    sampleDescription.setAllowedEvents(new ArrayList<String>());
    sampleDescription.setEffects(new ArrayList<FormEffectDescription>());
    FormItemRepresentation item = MockFormHelper.createMockForm("form", "param1").getFormItems().iterator().next();
    sampleDescription.setItemRepresentationMap(item.getDataMap());
    sampleDescription.setName("name");
    FormRepresentationEncoder encoder = EasyMock.createMock(FormRepresentationEncoder.class);
    FormEncodingException exception = new FormEncodingException();
    @SuppressWarnings("unchecked")
    Map<String, List<MenuItemDescription>> anyObject = EasyMock.anyObject(Map.class);
    EasyMock.expect(encoder.encodeMenuItemsMap(anyObject)).andThrow(exception).once();
    FormEncodingFactory.register(encoder, FormEncodingFactory.getDecoder());
    
    EasyMock.replay(encoder);
    try {
      service.saveMenuItem("group", sampleDescription);
      fail("saveMenuItem shouldn't succeed");
    } catch (MenuServiceException e) {
      assertNotNull("e shouldn't be null", e);
      Throwable cause = e.getCause();
      assertNotNull("cause shouldn't be null", cause);
      assertTrue("cause should be a FormEncodingException", cause instanceof FormEncodingException);
    }
    EasyMock.verify(encoder);
  }
// THIS TEST REQUIRES THE REAL GWT Components so it should be executed in the showcase    
org.jbpm.form.builder.services.modelFormRepresentationgetFormItems

Popular methods of FormRepresentation

  • <init>
  • setAction
  • setEnctype
  • setMethod
  • setName
  • addFormItem
  • getAction
  • getDocumentation
  • getEnctype
  • getFormValidations
  • getInputs
  • getLastModified
  • getInputs,
  • getLastModified,
  • getMethod,
  • getName,
  • getOnLoadScripts,
  • getOnSubmitScripts,
  • getOutputs,
  • getProcessName,
  • getTaskId

Popular in Java

  • Making http post requests using okhttp
  • getSharedPreferences (Context)
  • compareTo (BigDecimal)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • JTextField (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now