Class JsonPropertyFactory

java.lang.Object
com.atlassian.confluence.plugins.contentproperty.JsonPropertyFactory

@Component public class JsonPropertyFactory extends Object
Factory for ContentProperty objects
Since:
5.6
  • Constructor Details

  • Method Details

    • buildContentPropertyFromFunction

      public com.google.common.base.Function<CustomContentEntityObject,JsonContentProperty> buildContentPropertyFromFunction(Content content, Expansions expansions)
    • buildContentPropertyFromFunction

      public com.google.common.base.Function<CustomContentEntityObject,JsonContentProperty> buildContentPropertyFromFunction()
    • buildSpacePropertyFromFunction

      public com.google.common.base.Function<CustomContentEntityObject,JsonSpaceProperty> buildSpacePropertyFromFunction(Space space, Expansions expansions)
    • buildContentPropertyFrom

      public JsonContentProperty buildContentPropertyFrom(CustomContentEntityObject storageContentProperty, Expansions expansions)
      Convert the given CustomContentEntityObject into a corresponding ContentProperty.
      Parameters:
      storageContentProperty - the storage value to convert
      expansions - the properties to expand while building the ContentProperty
      Returns:
      the property
      Throws:
      NotFoundException - if the referenced owner in the storageContentProperty cannot be found via the ContentService
    • buildSpacePropertyFrom

      public JsonSpaceProperty buildSpacePropertyFrom(CustomContentEntityObject property, Expansions expansions)
      Convert the given CustomContentEntityObject into a corresponding SpaceProperty.
      Parameters:
      property - the storage value to convert
      expansions - the properties to expand while building the SpaceProperty
      Returns:
      the property
      Throws:
      NotFoundException - if the referenced owner in the property cannot be found via the SpaceService
    • buildFrom

      public JsonContentProperty buildFrom(Content content, CustomContentEntityObject storageContentProperty, Expansions expansions)
      Convert the given CustomContentEntityObject into a corresponding ContentProperty with the given container.
      Parameters:
      content - the container. This must have been initialized via the ContentService or ContentFactory, rather than deserialized from the client
      storageContentProperty - the storage value to convert
      expansions - the properties to expand while building the ContentProperty
      Returns:
      the property
    • buildFrom

      public JsonContentProperty buildFrom(CustomContentEntityObject storageContentProperty)
      Convert the given CustomContentEntityObject into a corresponding ContentProperty with the given container.
      Parameters:
      storageContentProperty - the storage value to convert
      Returns:
      the property
    • buildFrom

      public JsonSpaceProperty buildFrom(Space space, CustomContentEntityObject storageContentProperty, Expansions expansions)
    • makeVersion

      public Version makeVersion(ContentEntityObject entity)
    • makeVersion

      public Reference<Version> makeVersion(ContentEntityObject entity, boolean expanded)