Class ScriptNode.NodeValueConverter

java.lang.Object
org.alfresco.repo.jscript.ValueConverter
org.alfresco.repo.jscript.ScriptNode.NodeValueConverter
Enclosing class:
ScriptNode

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

    • NodeValueConverter

      public NodeValueConverter()
  • Method Details

    • convertValueForScript

      public Serializable convertValueForScript(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, 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