Class CustomBaseObject

java.lang.Object
org.forgerock.openidm.tools.scriptedbundler.CustomBaseObject
Direct Known Subclasses:
CustomConfiguration, CustomObjectType, CustomObjectTypeProperty, CustomObjectTypePropertyFlag, CustomObjectTypePropertyItemProperty, CustomObjectTypePropertyItems, CustomProperty, ProvidedProperty

public class CustomBaseObject extends Object
Base object for configuration -> object tree [de]serialization. This object tree is used by the Handlebars template processor to process templates into output files with variable substitution. It is constructed from a JSON configuration file.
  • Constructor Details

    • CustomBaseObject

      public CustomBaseObject()
  • Method Details

    • setIsLast

      public void setIsLast(boolean last)
      Set whether this object is the last in a container of similar objects. This is a helper method for Handlebars to help it decide whether to continue a JSON list (",") or close it ("]" or "}"). It is not set via deserialization of the configuration.
      Parameters:
      last -
    • getIsLast

      public boolean getIsLast()
      Return whether this is the last object in a collection of similar objects. Handlebars helper method. It is not serialized with other bean properties.
      Returns:
    • flagLast

      public <O extends CustomBaseObject> List<O> flagLast(List<O> list)
      Utility method to flag the last item in a collection as being the last item. This is then used in our templates to help with formatting the output.
      Type Parameters:
      O -
      Parameters:
      list -
      Returns: