Codota Logo
FSMenuService.listMenuItems
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
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

  • Updating database using SQL prepared statement
  • getExternalFilesDir (Context)
  • addToBackStack (FragmentTransaction)
  • findViewById (Activity)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JFrame (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now