CIN document archiver

CIN document Archiver

This document describes how to archive your documents locally on the server or onto another server. All you need to do is provide the required correct configuration and credentials if needed in order for the archiver to work. Since credentials and path configuration are considered env (environment) variables the will require a deploy and a setup the configure correctly.

CIN Document

The document filename is based on the target_market + GTIN number + extension. The CIN document is the exact same document we produced for the Datapool.

Defaults

By default the document archiver is not setup so no unwanted bloat would be created.

The archiver can store or as local storage or with an external storage.

Setting up the archiver for local storage

# src/Bundle/GsOneConnectorBundle/Resources/config/file_storage.yml
parameters:
  gsone_document_storage_dir: '%kernel.root_dir%/gsone_document_storage'

services:
  Induxx\Component\FileStorage\FileStorageProvider.gsone_document_storage_dir:
    class: Induxx\Component\FileStorage\FileStorageProvider
    arguments:
      - '%gsone_document_storage_dir%'
      - 'gsone_document_storage_dir'

Setting up the archiver for external storage

# config/..
oneup_flysystem:
  adapters:
    your_external_adapter:
      sftp:
        host: "%sftp_host%"
        port: "%sftp_port%"
        username: "%sftp_user%"
        password: "%sftp_password%"
        root: ~
        timeout: ~
        privateKey: ~
        permPrivate: ~
        permPublic: ~
        directoryPerm: ~
  filesystems:
    your_external_filesystem:
      adapter: your_external_adapter
      alias: your_external_filesystem

# src/Bundle/GsOneConnectorBundle/Resources/config/file_storage.yml
services:
  Induxx\Component\FileStorage\FileStorageProvider.gsone_document_storage_dir:
    class: Induxx\Component\FileStorage\FlySystemStorageProvider
    arguments:
      - '@oneup_flysystem.your_external_filesystem'
      - 'incoming_path'
      - 'gsone_document_storage_dir'