congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
FSMenuService.listMenuItems
Code IndexAdd Tabnine to your IDE (free)

How to use
listMenuItems
method
in
org.jbpm.form.builder.services.impl.fs.FSMenuService

Best Java code snippets using org.jbpm.form.builder.services.impl.fs.FSMenuService.listMenuItems (Showing top 10 results out of 315)

origin: org.jbpm/form-services

@Override
public void saveMenuItem(String groupName, MenuItemDescription item) throws MenuServiceException {
  Map<String, List<MenuItemDescription>> items = listMenuItems();
  addToMap(groupName, item, items);
  writeMenuItems(items);
}

origin: org.jbpm/jbpm-form-services

@Override
public void saveMenuItem(String groupName, MenuItemDescription item) throws MenuServiceException {
  Map<String, List<MenuItemDescription>> items = listMenuItems();
  addToMap(groupName, item, items);
  writeMenuItems(items);
}

origin: org.jbpm/jbpm-form-services

@Override
public void deleteMenuItem(String groupName, MenuItemDescription item) throws MenuServiceException {
  Map<String, List<MenuItemDescription>> items = listMenuItems();
  removeFromMap(groupName, item, items);
  writeMenuItems(items);
}
origin: org.jbpm/form-services

@Override
public void deleteMenuItem(String groupName, MenuItemDescription item) throws MenuServiceException {
  Map<String, List<MenuItemDescription>> items = listMenuItems();
  removeFromMap(groupName, item, items);
  writeMenuItems(items);
}
origin: org.jbpm/form-services

@Test
public void testListItemsOK() throws Exception {
  FSMenuService service = new FSMenuService();
  Map<String, List<MenuItemDescription>> items = service.listMenuItems();
  assertNotNull("items shouldn't be null", items);
  assertFalse("items shouldn't be empty", items.isEmpty());
  for (String key : items.keySet()) {
    assertNotNull("items of key " + key + " shouldn't be null", items.get(key));
    assertFalse("items of key " + key + " shouldn't be empty", items.get(key).isEmpty());
  }
}
@Test
origin: org.jbpm/jbpm-form-services

@Test
public void testListItemsOK() throws Exception {
  FSMenuService service = new FSMenuService();
  Map<String, List<MenuItemDescription>> items = service.listMenuItems();
  assertNotNull("items shouldn't be null", items);
  assertFalse("items shouldn't be empty", items.isEmpty());
  for (String key : items.keySet()) {
    assertNotNull("items of key " + key + " shouldn't be null", items.get(key));
    assertFalse("items of key " + key + " shouldn't be empty", items.get(key).isEmpty());
  }
}
@Test
origin: org.jbpm/jbpm-form-services

private void abstractTestListItemsProblem(final Class<?> exceptionType) throws Exception {
  FSMenuService service = createMockedService(exceptionType);
  try {
    service.listMenuItems();
    fail("listOptions 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

private void abstractTestListItemsProblem(final Class<?> exceptionType) throws Exception {
  FSMenuService service = createMockedService(exceptionType);
  try {
    service.listMenuItems();
    fail("listOptions 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 testListItemsEncodingProblem() throws Exception {
  FSMenuService service = createMockedService(null);
  FormRepresentationDecoder decoder = EasyMock.createMock(FormRepresentationDecoder.class);
  FormEncodingFactory.register(FormEncodingFactory.getEncoder(), decoder);
  FormEncodingException exception = new FormEncodingException("Something going wrong");
  EasyMock.expect(decoder.decodeMenuItemsMap(EasyMock.anyObject(String.class))).andThrow(exception).once();
  
  EasyMock.replay(decoder);
  try {
    service.listMenuItems();
    fail("listOptions 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(decoder);
}
@Test
origin: org.jbpm/jbpm-form-services

@Test
public void testListItemsEncodingProblem() throws Exception {
  FSMenuService service = createMockedService(null);
  FormRepresentationDecoder decoder = EasyMock.createMock(FormRepresentationDecoder.class);
  FormEncodingFactory.register(FormEncodingFactory.getEncoder(), decoder);
  FormEncodingException exception = new FormEncodingException("Something going wrong");
  EasyMock.expect(decoder.decodeMenuItemsMap(EasyMock.anyObject(String.class))).andThrow(exception).once();
  
  EasyMock.replay(decoder);
  try {
    service.listMenuItems();
    fail("listOptions 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(decoder);
}
@Test
org.jbpm.form.builder.services.impl.fsFSMenuServicelistMenuItems

Popular methods of FSMenuService

  • asURL
  • createReader
  • readURL
  • writeToURL
  • <init>
  • addToMap
  • getFormBuilderProperties
  • listOptions
  • listValidations
  • removeFromMap
  • saveMenuItem
  • writeMenuItems
  • saveMenuItem,
  • writeMenuItems

Popular in Java

  • Reading from database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • putExtra (Intent)
  • setScale (BigDecimal)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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