Class ScriptNode.NodeValueConverter

  • Enclosing class:
    ScriptNode

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.Serializable convertValueForRepo​(java.io.Serializable value)
      Convert an object from any script wrapper value to a valid repository serializable value.
      java.io.Serializable convertValueForScript​(org.alfresco.service.namespace.QName qname, java.io.Serializable value)
      Convert an object from any repository serialized value to a valid script object.
      java.io.Serializable convertValueForScript​(ServiceRegistry services, org.mozilla.javascript.Scriptable scope, org.alfresco.service.namespace.QName qname, java.io.Serializable value)
      Convert an object from any repository serialized value to a valid script object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NodeValueConverter

        public NodeValueConverter()
    • Method Detail

      • convertValueForScript

        public java.io.Serializable convertValueForScript​(org.alfresco.service.namespace.QName qname,
                                                          java.io.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 java.io.Serializable convertValueForScript​(ServiceRegistry services,
                                                          org.mozilla.javascript.Scriptable scope,
                                                          org.alfresco.service.namespace.QName qname,
                                                          java.io.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 java.io.Serializable convertValueForRepo​(java.io.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