GithubHelp home page GithubHelp logo

cedfou / elvis-provider Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jahia/elvis-provider

0.0 2.0 0.0 235 KB

This is an external provider to connect Elvis - Digital Asset Management

Java 100.00%

elvis-provider's Introduction

Elvis External Provider

INFORMATION

This module allow you to create a mount point in your Digital Factory in order to browse and search your folders/files on your Elvis Server.
Note: Elvis collection are displayed as an empty folder.

MINIMAL REQUIREMENTS

  • Digital Factory 7.1.0.1
  • DF Module - External data provider V3.0.1
  • Elvis DAM V5
  • Important: to use this module you must create yourself a table in your database before deploying it on your instance.
    You will find the script to use here (choose the one related to your DB)

PROVIDED MAPPING

By default the module as a default mapping for all files and three extended mapping for images, documents and pdf. It is possible to add properties to those mapping by just updating the spring.xml, it is also possible to add new mappings, to do that just follow the pattern of the existing mappings.

e.g if you want to add a property to the default mapping, you need to copy this line and modify p:elvisName, p:jcrName and p:elvisType with the name of the property you want to add
For this value p:elvisType it can be either string or array, map is not managed currently, so the two field that are actually map are specifically managed.

    <bean p:elvisName="mimeType" p:jcrName="jcr:mimeType" p:elvisType="string"
      class="org.jahia.modules.external.elvis.ElvisPropertyMapping"/>

The following is the default mapping for file:

    <bean class="org.jahia.modules.external.elvis.ElvisTypeMapping" id="elvisFile"
          p:jcrMixins="elvismix:file" p:elvisName="file">
        <property name="properties">
            <list>
                <bean p:elvisName="description" p:jcrName="jcr:description"
                      p:elvisType="string"
                      class="org.jahia.modules.external.elvis.ElvisPropertyMapping"/>

                <bean p:elvisName="assetCreator" p:jcrName="jcr:createdBy"
                      p:elvisType="string"
                      class="org.jahia.modules.external.elvis.ElvisPropertyMapping"/>
                <bean p:elvisName="assetCreated" p:jcrName="jcr:created"
                      p:elvisType="map"
                      class="org.jahia.modules.external.elvis.ElvisPropertyMapping"/>

                <bean p:elvisName="assetModifier" p:jcrName="jcr:lastModifiedBy"
                      p:elvisType="string"
                      class="org.jahia.modules.external.elvis.ElvisPropertyMapping"/>
                <bean p:elvisName="assetModified" p:jcrName="jcr:lastModified"
                      p:elvisType="map"
                      class="org.jahia.modules.external.elvis.ElvisPropertyMapping"/>

                <bean p:elvisName="mimeType" p:jcrName="jcr:mimeType"
                      p:elvisType="string"
                      class="org.jahia.modules.external.elvis.ElvisPropertyMapping"/>

                <bean p:elvisName="textContent" p:jcrName="jcr:content"
                      p:elvisType="string"
                      class="org.jahia.modules.external.elvis.ElvisPropertyMapping"/>

                <bean p:elvisName="tags" p:jcrName="j:tagList"
                      p:elvisType="array"
                      class="org.jahia.modules.external.elvis.ElvisPropertyMapping"/>
            </list>
        </property>
    </bean>

Note: following mapping is for images and is extending elvisFile which is the default mapping, so if you want to add a mapping, you should at least extend elvisFile

    <bean class="org.jahia.modules.external.elvis.ElvisTypeMapping" parent="elvisFile" id="elvisImage"
          p:jcrMixins="jmix:image jmix:exif" p:elvisName="image">
        <property name="properties">
            <list merge="true">
                <bean p:elvisName="width" p:jcrName="j:width"
                      p:elvisType="string"
                      class="org.jahia.modules.external.elvis.ElvisPropertyMapping"/>
                <bean p:elvisName="height" p:jcrName="j:height"
                      p:elvisType="string"
                      class="org.jahia.modules.external.elvis.ElvisPropertyMapping"/>
                <bean p:elvisName="colorSpace" p:jcrName="j:colorSpace"
                      p:elvisType="string"
                      class="org.jahia.modules.external.elvis.ElvisPropertyMapping"/>
                <bean p:elvisName="orientation" p:jcrName="j:orientation"
                      p:elvisType="string"
                      class="org.jahia.modules.external.elvis.ElvisPropertyMapping"/>
                <bean p:elvisName="resolutionUnit" p:jcrName="j:resolutionUnit"
                      p:elvisType="string"
                      class="org.jahia.modules.external.elvis.ElvisPropertyMapping"/>
                <bean p:elvisName="resolutionX" p:jcrName="j:xresolution"
                      p:elvisType="string"
                      class="org.jahia.modules.external.elvis.ElvisPropertyMapping"/>
                <bean p:elvisName="resolutionY" p:jcrName="j:yresolution"
                      p:elvisType="string"
                      class="org.jahia.modules.external.elvis.ElvisPropertyMapping"/>
            </list>
        </property>
    </bean>

Note: following mapping is for documents/pdf is extending elvisFile

    <bean class="org.jahia.modules.external.elvis.ElvisTypeMapping" parent="elvisFile" id="elvisDocument"
          p:jcrMixins="jmix:document" p:elvisName="document pdf">
        <property name="properties">
            <list merge="true">
                <bean p:elvisName="numberOfPages" p:jcrName="j:pageCount"
                      p:elvisType="string"
                      class="org.jahia.modules.external.elvis.ElvisPropertyMapping"/>
            </list>
        </property>
    </bean>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.