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

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

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

origin: org.jbpm/jbpm-form-services

@Override 
protected URL asURL(String path) throws URISyntaxException {
  if (exceptionType != null && exceptionType.equals(URISyntaxException.class)) throw new URISyntaxException(path, "mocking");
  return super.asURL(path);
}
@Override 
origin: org.jbpm/form-services

@Override 
protected URL asURL(String path) throws URISyntaxException {
  if (exceptionType != null && exceptionType.equals(URISyntaxException.class)) throw new URISyntaxException(path, "mocking");
  return super.asURL(path);
}
@Override 
origin: org.jbpm/jbpm-form-services

@Override
public List<MenuOptionDescription> listOptions() throws MenuServiceException {
  Gson gson = new Gson();
  List<MenuOptionDescription> retval = new ArrayList<MenuOptionDescription>();
  try {
    URL url = asURL("/menuOptions.json");
    retval = gson.fromJson(createReader(url), new TypeToken<List<MenuOptionDescription>>(){}.getType());
  } catch (URISyntaxException e) {
    throw new MenuServiceException("Problem finding menu options json file", e); 
  } catch (FileNotFoundException e) {
    throw new MenuServiceException("No menu options json file found", e);
  } catch (Exception e) {
    throw new MenuServiceException("Unexpected error", e);
  }
  return retval;
}

origin: org.jbpm/form-services

@Override
public List<MenuOptionDescription> listOptions() throws MenuServiceException {
  Gson gson = new Gson();
  List<MenuOptionDescription> retval = new ArrayList<MenuOptionDescription>();
  try {
    URL url = asURL("/menuOptions.json");
    retval = gson.fromJson(createReader(url), new TypeToken<List<MenuOptionDescription>>(){}.getType());
  } catch (URISyntaxException e) {
    throw new MenuServiceException("Problem finding menu options json file", e); 
  } catch (FileNotFoundException e) {
    throw new MenuServiceException("No menu options json file found", e);
  } catch (Exception e) {
    throw new MenuServiceException("Unexpected error", e);
  }
  return retval;
}

origin: org.jbpm/jbpm-form-services

@Override
public List<ValidationDescription> listValidations() throws MenuServiceException {
  Gson gson = new Gson();
  List<ValidationDescription> retval = null;
  try {
    URL url = asURL("/validations.json");
    retval = gson.fromJson(createReader(url), new TypeToken<List<ValidationDescription>>(){}.getType());
  } catch (URISyntaxException e) {
    throw new MenuServiceException("Problem finding validations json file", e); 
  } catch (FileNotFoundException e) {
    throw new MenuServiceException("No validations json file found", e);
  } catch (Exception e) {
    throw new MenuServiceException("Unexpected error", e);
  }
  return retval;
}

origin: org.jbpm/form-services

@Override
public List<ValidationDescription> listValidations() throws MenuServiceException {
  Gson gson = new Gson();
  List<ValidationDescription> retval = null;
  try {
    URL url = asURL("/validations.json");
    retval = gson.fromJson(createReader(url), new TypeToken<List<ValidationDescription>>(){}.getType());
  } catch (URISyntaxException e) {
    throw new MenuServiceException("Problem finding validations json file", e); 
  } catch (FileNotFoundException e) {
    throw new MenuServiceException("No validations json file found", e);
  } catch (Exception e) {
    throw new MenuServiceException("Unexpected error", e);
  }
  return retval;
}

origin: org.jbpm/form-services

private void writeMenuItems(Map<String, List<MenuItemDescription>> items) throws MenuServiceException {
  try {
    FormRepresentationEncoder encoder = FormEncodingFactory.getEncoder();
    String json = encoder.encodeMenuItemsMap(items);
    URL url = asURL("/menuItems.json");
    writeToURL(url, json);
  } catch (FormEncodingException e) {
    throw new MenuServiceException("Problem transforming menu items to json", e);
  } catch (URISyntaxException e) {
    throw new MenuServiceException("Problem finding menu items json file", e);
  } catch (FileNotFoundException e) {
    throw new MenuServiceException("No menu items json file found", e);
  } catch (IOException e) {
    throw new MenuServiceException("Problem writing menu items json file", e);
  } catch (Exception e) {
    throw new MenuServiceException("Unexpected error", e);
  }
}
origin: org.jbpm/jbpm-form-services

private void writeMenuItems(Map<String, List<MenuItemDescription>> items) throws MenuServiceException {
  try {
    FormRepresentationEncoder encoder = FormEncodingFactory.getEncoder();
    String json = encoder.encodeMenuItemsMap(items);
    URL url = asURL("/menuItems.json");
    writeToURL(url, json);
  } catch (FormEncodingException e) {
    throw new MenuServiceException("Problem transforming menu items to json", e);
  } catch (URISyntaxException e) {
    throw new MenuServiceException("Problem finding menu items json file", e);
  } catch (FileNotFoundException e) {
    throw new MenuServiceException("No menu items json file found", e);
  } catch (IOException e) {
    throw new MenuServiceException("Problem writing menu items json file", e);
  } catch (Exception e) {
    throw new MenuServiceException("Unexpected error", e);
  }
}
origin: org.jbpm/jbpm-form-services

@Override
public Map<String, List<MenuItemDescription>> listMenuItems() throws MenuServiceException {
  Map<String, List<MenuItemDescription>> retval = null;
  try {
    FormRepresentationDecoder decoder = FormEncodingFactory.getDecoder();
    URL url = asURL("/menuItems.json");
    String json = readURL(url);
    retval = decoder.decodeMenuItemsMap(json);
  } catch (FormEncodingException e) {
    throw new MenuServiceException("Problem parsing menu items json file", e);
  } catch (URISyntaxException e) {
    throw new MenuServiceException("Problem finding menu items json file", e);
  } catch (FileNotFoundException e) {
    throw new MenuServiceException("No menu items json file found", e);
  } catch (IOException e) {
    throw new MenuServiceException("Problem reading menu items json file", e);
  } catch (Exception e) {
    throw new MenuServiceException("Unexpected error", e);
  }
  return retval;
}
origin: org.jbpm/form-services

@Override
public Map<String, List<MenuItemDescription>> listMenuItems() throws MenuServiceException {
  Map<String, List<MenuItemDescription>> retval = null;
  try {
    FormRepresentationDecoder decoder = FormEncodingFactory.getDecoder();
    URL url = asURL("/menuItems.json");
    String json = readURL(url);
    retval = decoder.decodeMenuItemsMap(json);
  } catch (FormEncodingException e) {
    throw new MenuServiceException("Problem parsing menu items json file", e);
  } catch (URISyntaxException e) {
    throw new MenuServiceException("Problem finding menu items json file", e);
  } catch (FileNotFoundException e) {
    throw new MenuServiceException("No menu items json file found", e);
  } catch (IOException e) {
    throw new MenuServiceException("Problem reading menu items json file", e);
  } catch (Exception e) {
    throw new MenuServiceException("Unexpected error", e);
  }
  return retval;
}
org.jbpm.form.builder.services.impl.fsFSMenuServiceasURL

Popular methods of FSMenuService

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

Popular in Java

  • Making http requests using okhttp
  • setScale (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Top 25 Plugins for Webstorm
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