Git Product home page Git Product logo

storage-cloud's Introduction

Artifact that allows integration with different archives and is composed of the following modules:

  1. CMIS
  2. AZURE
  3. Amazon S3
  4. Local filesystem (for test and demo purposes)

storage-cloud is released under the GNU AGPL v3 license. Maven Central

MAVEN dependency

Artifact Version
Apache Chemistry Maven Central
Spring.io Maven Central with version prefix filter
AZURE Maven Central
AMAZON S3 Maven Central

Usage

    InputStream is = IOUtils.toInputStream(TEXT, Charset.defaultCharset());
    Map<String, Object> map = new HashMap();
    map.put(StoragePropertyNames.NAME.value(), "test-file");
    map.put(StoragePropertyNames.OBJECT_TYPE_ID.value(), StoragePropertyNames.CMIS_DOCUMENT.value());
    map.put(StoragePropertyNames.SECONDARY_OBJECT_TYPE_IDS.value(), Arrays.asList(StoragePropertyNames.ASPECT_TITLED.value()));
    map.put(CM_TITLE, TITLE);
    map.put(CM_DESCRIPTION, DESCRIPTION);
    StorageObject document = storeService.storeSimpleDocument(is, "text/plain", "/", map);

    InputStream iss = storeService.getResource(document.getKey());
    assertEquals(TEXT, IOUtils.toString(iss, Charset.defaultCharset()));
    assertEquals(TITLE, document.getPropertyValue(CM_TITLE));
    assertEquals(DESCRIPTION, document.getPropertyValue(CM_DESCRIPTION));

    final String folderPath = storeService.createFolderIfNotPresent(
            "/my-path",
            "my-name",
            "my-title",
            "my-description");
    assertNotNull(folderPath);

Configuration

All configuration properties are listed here. The properties' names are dependent on the chosen driver

cnr.storage.driver=

cnr.storage.azure.connectionString=
cnr.storage.azure.containerName=

cnr.storage.filesystem.directory=

cnr.storage.s3.authUrl=
cnr.storage.s3.accessKey=
cnr.storage.s3.secretKey=
cnr.storage.s3.bucketName=
cnr.storage.s3.deleteAfter=
cnr.storage.s3.signingRegion=

CMIS properties are an exception, as they are loaded by the Chemistry library. The relevant properties are

repository.base.url=
org.apache.chemistry.opencmis.[...]=

See SessionParameter for a reference of all OpenCmis parameters. A minimal set of parameters for CMIS is

repository.base.url=
org.apache.chemistry.opencmis.session.repository.id=
org.apache.chemistry.opencmis.binding.atompub.url=
org.apache.chemistry.opencmis.binding.browser.url=
org.apache.chemistry.opencmis.binding.spi.type=
org.apache.chemistry.opencmis.binding.connecttimeout=
org.apache.chemistry.opencmis.binding.readtimeout=
org.apache.chemistry.opencmis.binding.httpinvoker.classname=
org.apache.chemistry.opencmis.user=
org.apache.chemistry.opencmis.password=

๐Ÿ‘ How to Contribute

The main purpose of this repository is to continue evolving storage-cloud. We want to make contributing to this project as easy and transparent as possible, and we are grateful to the community for contributing bugfixes and improvements.

๐Ÿ“„ License

storage-cloud is GNU AFFERO GENERAL PUBLIC LICENSE licensed, as found in the LICENSE file.

storage-cloud's People

Contributors

cirosalvio avatar csalvioiss avatar dirgensa avatar francescou avatar mspasiano avatar mtrycz avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

storage-cloud's Issues

The file Readed and created didn't release

The implementation didn't release the properties files created and readed and the delete method didn't remove the properties file.
When a file already exsist is throwed a generic exception

StoreService method hasAspect

Il metodo per l'implementazione con Driver FileSystem va in ClassCastException come di seguito:
java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
at it.cnr.si.spring.storage.StoreService.hasAspect(StoreService.java:300)

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.