Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • dam_objects_selector (String) : This is a selector for data structures that should be processed. Typical setup include either the objectname (damimport,transfer,massimportitem), or a tag prefixed by a # to select the data structures (“#damobject”) .

  • dam_resource_field_selector (String) : Selector for the property that stores the binary file : ‘binary’

  • async_denorm_thread_pool_size (int):

    Status
    colourPurple
    titlesince 2021.4
    Maximum number of threads for asynchronous operations

  • dam_denormalization_config (JSON) : A long JSON that will describes the extraction and transformations that will be applied to an asset.

  • enable_async_transforms (Boolean) : Activates the Async transformations

  • dam_denormalization_force_update (Boolean) : Will activate the transformations at each save of the asset.

...

  • booleanToActivated

    • class : com.wedia.packaged.dam.triggers.datatransformers.impl.BooleanToActivatedTransformer

    • init : none

    • input : a transformation returning java.lang.Boolean

    • output : java.lang.String Value for a property of type child and nature activated (true → "1", false → "2"). If the input is not a Boolean, we parse in Boolean (if input is "true" then the output will be 1). If the input is null, null is returned (and can be processed by the caller).

  • blurHash

    • class : com.wedia.packaged.dam.triggers.datatransformers.impl.BlurhashTransformer

    • init : org.json.JSONObject (optional) may contain :

      • baseVariations : String or array of strings ; the base variations used to compute the hash. By default: ["photo", "poster", "thumbnailtiny"]

      • components: Integer or array of Integer, the number of components to be included in the hash. If an array is provided, the first one represents the number of components on the X axis, the second one on the Y axis. Default: 4

    • output : java.lang.String the asset blurhash

  • dimensionProperty

    • class : com.wedia.packaged.dam.triggers.datatransformers.impl.DimensionToPropertyTransformer

    • init : java.lang.String (required)

    • input : a transformation returning a com.noheto.image.interfaces.IDimension object (cf resourceToDimension)

    • output : According to the past init :

      • pxwidth : java.lang.Long the width in pixels com.noheto.image.interfaces.IDimension.getPixelWidth

      • pxheight : java.lang.Long the height en pixelcom.noheto.image.interfaces.IDimension.getPixelHeight

      • duration :java.lang.Doublethe duration in secondscom.noheto.image.interfaces.IDimension.getDurationVideo

      • colorspace : java.lang.String The color spacecom.noheto.image.interfaces.IDimension.getColorspace

      • ratio :java.lang.Doublethe image ratio or -1 if width or height <= 0

      • xdpi : java.lang.Integer pixels density on X axiscom.noheto.image.interfaces.IDimension.getXDpi

      • ydpi : java.lang.Integerpixels density on Y axis com.noheto.image.interfaces.IDimension.getYDpi

  • dimensionTag

    • class : com.wedia.packaged.dam.triggers.datatransformers.impl.DimensionToTagValueTransformer

    • init : java.lang.String (required), the name of the tag to return (ex: “exif:artist”)

    • input : a transformation returning a com.noheto.image.interfaces.IDimension object (cf resourceToDimension)

    • output : java.lang.String the value of the tag passed in init. Returns null if the value of the tag is empty or null.

  • dimensionMultiTag

    • class: com.wedia.packaged.dam.triggers.datatransformers.impl.DimensionToMultiTagValue

    • init: java.lang.String (required), the name of the tag to return (ex: “iptc:2:25”)

    • input: a transformation returning a com.noheto.image.interfaces.IDimension object (cf resourceToDimension)

    • output : java.util.List<java.lang.String> containing the value of the tag as well as those of tags with the same prefix (ex: “iptc:2:25_1”, “iptc:2:25_2”, …)

  • duplicatesFinder

    • class: com.wedia.packaged.dam.triggers.datatransformers.impl.DuplicatesFinderTransformer

    • init: org.json.JSONObject or java.lang.String or null

      class : com.wedia.packaged.
      • if a JSONObject, valid properties are:

        • objects: java.lang.String a selector on structures to check (default: #damobject)

        • properties: java.lang.String a coma separated list of properties to check (default: phdiff)

      • if a String, the value will define properties to check

    • input: none

    • output: A JSONArray containing found duplicates. Each item in the array is a JSON object containing:

      • $resource: String, name of the structure having a duplicate of current instance

      • id: Long, id of instance in the structure

    parseExifDate

        • Status
          colourPurple
          titleSince 11.28
          properties can be defined as a

          • JSONObject. Each key is treated as a fieldSelector. Value is a boolean defining if a proximity search should be done on this field

          • JSONArray, each value can be

            • a String

            • a JSONObject (as above)

          • default value

            Status
            colourPurple
            titleSince 11.28
            is: {"phavg,phdiff": true, "sha": false}

      • if a String, the value will define properties to check

    • input: none

    • output: A JSONArray containing found duplicates. Each item in the array is a JSON object containing:

      • $resource: String, name of the structure having a duplicate of current instance

      • id: Long, id of instance in the structure

  • parseExifDate

    • class : com.wedia.packaged.dam.triggers.datatransformers.impl.ExifToDateTransformer

    • init : java.lang.String name of the tag to read (don't forget the prefix "exif:")

    • input : a transformation returning a com.noheto.image.interfaces.IDimension object (cf resourceToDimension)

    • output : java.util.Date if the parse did not fail. Otherwise, the input is returned.

  • parseBoolean

    • class : com.wedia.packaged.dam.triggers.datatransformers.impl.StringToBooleanTransformer

    • init : none

    • input : a transformation returning a java.lang.String

    • output : the result of a Boolean.parseBoolean on the String passed in parameter. Returns the input if the input is not a String

  • resourceFromFieldPattern

    • class : com.wedia.packaged.dam.triggers.datatransformers.impl.PropertyToResourceTransformer

    • init : java.lang.String if null or empty, we use the value of the dam_resource_field_selector parameter of the plugin

    • input : none

    • output : com.noheto.remote.interfaces.IResourceDimensionExtendedobtained using the first field which is validated by the selector in init and which is a file or image type

  • resourceToDimension

    • class : com.wedia.packaged.dam.triggers.datatransformers.impl.ResourceToDimensionTransformer

    • init : none

    • input : a transformation returning a com.noheto.remote.interfaces.IResourceDimensionExtended(cf resourceFromFieldPattern)

    • output : com.noheto.image.interfaces.IDimension the IDimension object obtained from the input resource

  • resourceProperty

    • class : com.wedia.packaged.dam.triggers.datatransformers.impl.ResourceToPropertyTransformer

    • init : java.lang.String (required)

    • input : a transformation returning a com.noheto.remote.interfaces.IResourceDimensionExtended (cf resourceFromFieldPattern)

    • output : According to the input init :

      • filesize : java.lang.Long the size of the resource in bytescom.noheto.remote.interfaces.IResourceDimensionExtended.getSize

      • contenttype : java.lang.String the content-type of the resourcecom.noheto.remote.interfaces.IResourceDimensionExtended.getContentType

      • pagecount :java.lang.Integerthe number of pages in the resourcecom.noheto.image.interfaces.IImaging.getNumberOfPages

      • imagehash : java.lang.String the hash of the imagecom.noheto.image.interfaces.IImaging.getHashImage

      • sha256 :java.lang.Stringthe sha256 of the resource (beware this processing is expensive)

      • phavg : java.lang.Long the average perceptual hash of the resource com.noheto.image.interfaces.IImaging.getHashImageAverage

      • phdiff : java.lang.Long the hash of perceptual difference resource com.noheto.image.interfaces.IImaging.getHashImageDifference

  • asChild

    • class : com.wedia.packaged.dam.triggers.datatransformers.impl.StringToChild

    • init :

      • java.lang.String the property that will host the value to create in a Wedia structure (by default "name")

      • Status
        colourPurple
        titleSince 11.25
        , it is possible to pass a JSON object which will be extended with the following values:

        • lookupProperty (default to: “name”) the name of the property that will host the value to create in a Wedia structure.

        • createIfNotExists createIfNotExist (default to: true) do we must create the instance if the instance is not found ?

        • withoutSecurity (default to false) must override the security at the creation of the target instance (we use the surfer who is at the origin of the denormalization)

        • withoutTriggers (default to false) should we ignore the triggers ?

    • input : A transformation returning java.lang.String ou unejava.util.Collection<java.lang.String>

      Status
      colourPurple
      titleSince 11.25
      also accepts :

      • com.wedia.packaged.utils.i18n.ITranslated

      • com.wedia.packaged.utils.i18n.ITranslatable

      • java.util.Collection<com.wedia.packaged.utils.i18n.ITranslated>

      • java.util.Collection<com.wedia.packaged.utils.i18n.ITranslatable>
        which allow to create target instances in different locales (i18n fields management)

    • output : wsnoheto.engine.IObjectReadOnly or java.util.List<wsnoheto.engine.IObjectReadOnly>For each value of the input, search in the nature of the transformed property the instance whose property passed in init has this value. If not found, create the instance (with the current user).

  • resourcePath

    • class : com.wedia.packaged.dam.triggers.datatransformers.impl.SelectorToPath

    • init : init : java.lang.String (optional

      Status
      titleSince 11.25
      ) if null or empty, the value of the dam_resource_field_selector parameter of the plugin is used.

    • input : none

    • output : java.lang.String representing the server path to the resource

  • regexExtract

    • class : com.wedia.packaged.dam.triggers.datatransformers.impl.RegExpPatternMatcher

      init : java.lang.String (a regular expression) or an org.json.JSONObjectthat can define :

      • regexp : java.lang.String a regular expression

      • .matches() is used in the java service, so it is important that the entire input must match the regular expression.

      • The regular expression should be a capturing one with “( )”, and as said before, it should be made for the entire input (by using .*).

        • Example : Regex to match the first 7 characters of your input : "^(.{7}).*"

    • init : java.lang.String (a regular expression) or an org.json.JSONObjectthat can define :

      • regexp : java.lang.String a regular expression

      • outputNullIfNoMatch : boolean (default false)

      • outputFirstNotEmptyGroup : boolean (default false)

    • input : a transformation returning java.lang.String

    • output : Checks the regular expression on the input. Depending on the options :

      • If the regular expression does not matches, returns null if outputNullIfNoMatch is true, returns the input otherwise

      • If the regular expression match

        • returns the value of the first group capturing non null and non empty if outputFirstNotEmptyGroup (group 0 excluded)

        • returns the value of index group 1 otherwise

...

Info

This transformer will return the first format matching available formats, using ratio (± threshold) or minRatio -threshold and maxRatio+threshold.

You can provide as many formats definitions as you want for this transformer.

Following definitions will always always be added to your configuration (thus evaluated after yours): [{key: "5:4", ratio: 5/4}, {key: "4:3", ratio: 4/3}, {key: "3:2", ratio: 3/2}, {key: "16:10", ratio: 16/10}, {key: "16:9", ratio: 16/9}, {key: "1.85:1", ratio: 1.85}, {key: "2.39:1", minRatio: 2.39, maxRatio: 2.40}, {key: "others"}]

If you want to completely override default behaviour, you have to define your own formats (with either ratio or minRatio maxRatio and provide the last entry without neither ratio nor minRatio maxRatio. A key can be omitted if you want to retrieve null.or minRatio maxRatio and provide the last entry without neither ratio nor minRatio maxRatio. A key can be omitted if you want to retrieve null.

  • Status
    colourPurple
    titleSince 11.27
    staticVal

    • class : com.wedia.packaged.dam.triggers.datatransformers.impl.StaticPropertyTransformer

    • init : java.lang.StringThe String representation of the value you want to retrieve.

    • input : none

    • output : the init String

Info

If target field is of type date (new) or datetime, the init value “now” will return a new Date()

  • Status
    colourPurple
    titleSince 11.27
    greaterThan

    • class : com.wedia.packaged.dam.triggers.datatransformers.impl.GreaterThan

    • init : java.lang.String or java.lang.Number The number to compare input with

    • input : java.lang.Integer int value to compare

    • output : true if input is strictly greater than init

  • Status
    colourPurple
    titleSince 11.27
    countCommon

    • class : com.wedia.packaged.dam.triggers.datatransformers.impl.CountCommonValues

    • init : null (default) or java.lang.Stringor JSON array of java.lang.String

    • input : String output transform or Array of String output transforms

    • output : number of common values between input and init (case sensitive)

  • Status
    colourPurple
    titleSince 11.2728
    staticVal negate

    • class : com.wedia.packaged.dam.triggers.datatransformers.impl.StaticPropertyTransformerNegationTransformer

    • init: java.lang.StringThe String representation of the value you want to retrieve.none

    • input : none any

    • output : the init String

...

      • null if input is null

      • !input if input is a Boolean

      • !Boolean.parseBoolean(input.toString()) else

  • Status
    colourPurple
    titleSince 11.2730
    greaterThan every

    • class: com.wedia.packaged.dam.triggers.datatransformers.impl.GreaterThanEveryTransformer

    • init : java.lang.String or java.lang.Number The number to compare input with

    • input : java.lang.Integer int value to compare

    • output : true if input is strictly greater than init: none

    • input: Collection of transforms or single transform

    • output: if a Collection of transforms is given as input, will set output to true if none of given inputs returns an output of null, something different than a Boolean, false. If input is a single transform, returns the output of the single transform.

  • Status
    colourPurple
    titleSince 11.2730
    countCommon isAllowed

    • class: com.wedia.packaged.dam.triggers.datatransformers.impl.CountCommonValuesIsAllowedBySecurity

    • init: null (default) or java.lang.Stringor JSON array of java.lang.String

    • input : String output transform or Array of String output transforms

    • output : number of common values between input and init (case sensitive)

    Status
    colourPurple
    titleSince 11.28
    negate

    • class : com.wedia.packaged.dam.triggers.datatransformers.impl.NegationTransformer

    • init: none

    • input : any

    • output :

    • null if input is null

    • !input if input is a Boolean

    • !Boolean.parseBoolean(input.toString()) else

      or JSONObject; object can contain following keys:

      • domain: Security domain name (default: objectdata)

      • action: Security action (default: update)

      • params: Object containing String values that are added before calling the security rule.
        objectname, object and surfer are automatically added by the transformer

    • input: none

    • output: true if surfer is allowed to perform action described in init, false otherwise

Trigger metadata extraction manually

...