Esempio n. 1
0
  @CliCommand(
      value = "json all",
      help = "Adds @RooJson annotation to all types annotated with @RooJavaBean")
  public void all(
      @CliOption(
              key = "deepSerialize",
              unspecifiedDefaultValue = "false",
              specifiedDefaultValue = "true",
              mandatory = false,
              help = "Indication if deep serialization should be enabled")
          final boolean deep) {

    jsonOperations.annotateAll(deep);
  }
Esempio n. 2
0
  @CliCommand(value = "json add", help = "Adds @RooJson annotation to target type")
  public void add(
      @CliOption(
              key = "class",
              mandatory = false,
              unspecifiedDefaultValue = "*",
              optionContext = UPDATE_PROJECT,
              help = "The java type to apply this annotation to")
          final JavaType target,
      @CliOption(
              key = "rootName",
              mandatory = false,
              help = "The root name which should be used to wrap the JSON document")
          final String rootName,
      @CliOption(
              key = "deepSerialize",
              unspecifiedDefaultValue = "false",
              specifiedDefaultValue = "true",
              mandatory = false,
              help = "Indication if deep serialization should be enabled.")
          final boolean deep) {

    jsonOperations.annotateType(target, rootName, deep);
  }
Esempio n. 3
0
 @CliAvailabilityIndicator({"json setup", "json add", "json all"})
 public boolean isPropertyAvailable() {
   return jsonOperations.isJsonInstallationPossible();
 }