Class ScriptNode.NodeValueConverter

  • Enclosing class:
    ScriptNode

    public class ScriptNode.NodeValueConverter
    extends ValueConverter
    Value converter with knowledge of Node specific value types
    • Constructor Detail

      • NodeValueConverter

        public NodeValueConverter()
    • Method Detail

      • convertValueForScript

        public Serializable convertValueForScript​(org.alfresco.service.namespace.QName qname,
                                                  Serializable value)
        Convert an object from any repository serialized value to a valid script object. This includes converting Collection multi-value properties into JavaScript Array objects.
        Parameters:
        qname - QName of the property value for conversion
        value - Property value
        Returns:
        Value safe for scripting usage
      • convertValueForScript

        public Serializable convertValueForScript​(ServiceRegistry services,
                                                  org.mozilla.javascript.Scriptable scope,
                                                  org.alfresco.service.namespace.QName qname,
                                                  Serializable value)
        Description copied from class: ValueConverter
        Convert an object from any repository serialized value to a valid script object. This includes converting Collection multi-value properties into JavaScript Array objects.
        Overrides:
        convertValueForScript in class ValueConverter
        Parameters:
        services - Repository Services Registry
        scope - Scripting scope
        qname - QName of the property value for conversion
        value - Property value
        Returns:
        Value safe for scripting usage
      • convertValueForRepo

        public Serializable convertValueForRepo​(Serializable value)
        Description copied from class: ValueConverter
        Convert an object from any script wrapper value to a valid repository serializable value. This includes converting JavaScript Array objects to Lists of valid objects.
        Overrides:
        convertValueForRepo in class ValueConverter
        Parameters:
        value - Value to convert from script wrapper object to repo serializable value
        Returns:
        valid repo value