congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ConfigGroupMarshaller.marshall
Code IndexAdd Tabnine to your IDE (free)

How to use
marshall
method
in
org.guvnor.structure.backend.config.ConfigGroupMarshaller

Best Java code snippets using org.guvnor.structure.backend.config.ConfigGroupMarshaller.marshall (Showing top 4 results out of 315)

origin: org.kie.workbench/kie-wb-common-cli-project-migration

  private void saveConfiguration(final ConfigGroup configGroup,
                  final Path filePath,
                  final CommentedOption commentedOption) {
    try {
      ioService.startBatch(filePath.getFileSystem());
      ioService.write(filePath,
              marshaller.marshall(configGroup),
              commentedOption);

      updateLastModified();
    } catch (Exception ex) {
      throw new RuntimeException(ex);
    } finally {
      ioService.endBatch();
    }
  }
}
origin: org.guvnor/guvnor-structure-backend

@Override
public boolean updateConfiguration(ConfigGroup configGroup) {
  String filename = configGroup.getName().replaceAll(INVALID_FILENAME_CHARS,
                            "_");
  final Path filePath = ioService.get(systemRepository.getUri()).resolve(filename + configGroup.getType().getExt());
  final CommentedOption commentedOption = new CommentedOption(getIdentityName(),
                                "Updated config " + filePath.getFileName());
  try {
    ioService.startBatch(filePath.getFileSystem());
    ioService.write(filePath,
            marshaller.marshall(configGroup),
            commentedOption);
    updateLastModified();
  } catch (Exception ex) {
    throw new RuntimeException(ex);
  } finally {
    ioService.endBatch();
  }
  //Invalidate cache if a new item has been created; otherwise cached value is stale
  configuration.remove(configGroup.getType());
  return true;
}
origin: kiegroup/appformer

private boolean saveConfiguration(final ConfigGroup configGroup,
                 final Path path,
                 final String commitMessage,
                 final boolean isNew) {
  // avoid duplicated writes to not cause cyclic cluster sync
  if (isNew && ioService.exists(path)) {
    return true;
  }
  final CommentedOption commentedOption = new CommentedOption(getIdentityName(),
                                commitMessage);
  try {
    ioService.startBatch(path.getFileSystem());
    ioService.write(path,
            marshaller.marshall(configGroup),
            commentedOption);
    updateLastModified();
  } catch (Exception ex) {
    throw new RuntimeException(ex);
  } finally {
    ioService.endBatch();
  }
  invalidateCacheAfterUpdatingConfigGroup(configGroup);
  return true;
}
origin: org.guvnor/guvnor-structure-backend

@Override
public boolean addConfiguration(final ConfigGroup configGroup) {
  String filename = configGroup.getName().replaceAll(INVALID_FILENAME_CHARS,
                            "_");
  final Path filePath = ioService.get(systemRepository.getUri()).resolve(filename + configGroup.getType().getExt());
  // avoid duplicated writes to not cause cyclic cluster sync
  if (ioService.exists(filePath)) {
    return true;
  }
  final CommentedOption commentedOption = new CommentedOption(getIdentityName(),
                                "Created config " + filePath.getFileName());
  try {
    ioService.startBatch(filePath.getFileSystem());
    ioService.write(filePath,
            marshaller.marshall(configGroup),
            commentedOption);
    updateLastModified();
  } catch (Exception ex) {
    throw new RuntimeException(ex);
  } finally {
    ioService.endBatch();
  }
  //Invalidate cache if a new item has been created; otherwise cached value is stale
  configuration.remove(configGroup.getType());
  return true;
}
org.guvnor.structure.backend.configConfigGroupMarshallermarshall

Popular methods of ConfigGroupMarshaller

  • unmarshall
  • <init>

Popular in Java

  • Finding current android device location
  • startActivity (Activity)
  • putExtra (Intent)
  • setContentView (Activity)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • ImageIO (javax.imageio)
  • JTable (javax.swing)
  • Top 17 Plugins for Android Studio
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