Class JsonPropertyFactory


  • public class JsonPropertyFactory
    extends Object
    Factory for ContentProperty objects
    Since:
    5.6
    • Method Detail

      • 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