cmis 4.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 56

CMIS - A browser and server side CMIS client written in Dart #

This package allows browsing of and data manipluation in CMIS V1.1 specification browser binding compliant CMIS servers such as the one hosted at Alfresco.

This version of the implementation allows only data inspection, querying and Create/Delete of folders and documents. An implementation Matrix mapping functionality of this package to the CMIS specification is provided in the file 'doc/CMIS Implementation Matrix'.

It is envisaged that this clients functionality will be expanded as future versions are released.

The specification used is supplied in the 'doc/specification' folder.

The main API is contained in the Cmis and CmisSession classes along with usage information.

Testing is achieved via an interactive test suite for the browser client, full details are contained in the '/test/doc/Using The Test Suite document'. Detailed usage information and result parsing can be obtained by inspecting the test/src files that drive the test suite. The 'test/output/ pictures' directory contains several screenshots of the output from the Alfresco test server above.

For the browser based client CORS restrictions apply, all testing was done via an Apache proxy server configuration of which is supplied in the 'test/doc/httpd-vhosts.conf' file. Please be aware of this before using thsi package.

NOTE: This client does not currently parse CMIS ATOM feeds, this has been raised as an issue and will be addressed in the next release. Also several 'helper' utilities can be added to aid with result parsing, these also will be added in a later release.

Although this package can be used as a standalone entity it is envisaged that this client will form a core package that higher level clients will wrap around to achieve more intelligent CMIS interfacing.

4.0.0 #

Issue 3

3.0.0 #

Updated for Dart 2.0 release

2.0.0 #

Updated for Dart 1.0 release Test html updated to use latest bootstrap

example/example.dart

/*
 * Package : cmis
 * Author : S. Hamblett <steve.hamblett@linux.com>
 * Date   : 05/09/2018
 * Copyright :  S.Hamblett@OSCF
 */

library cmisexample;

import 'dart:async';
import 'package:json_object_lite/json_object_lite.dart';
import 'package:cmis/cmis_server_client.dart';
import 'package:cmis/cmis.dart';

CmisSession cmisSession;

// Cmis get repositories function wrapped in a future wrapper
Future<JsonObjectLite<dynamic>> getRepositories() async {
  final Completer<JsonObjectLite<dynamic>> completer = Completer<JsonObjectLite<dynamic>>();

  void localcompleter() {
    final dynamic cmisResponse = cmisSession.completionResponse;
    final dynamic repo = cmisResponse.jsonCmisResponse.toList()[0];
    final String repositoryId = repo.toList()[0];
    cmisSession.repositoryId = repositoryId;
    completer.complete(repo);
  }

  cmisSession.resultCompletion = localcompleter;
  cmisSession.getRepositories();
  return completer.future;
}

Future<void> main() async {
  /// Examples of usage can be found in the test suite
  /// Currently this client uses a completion callback mechanism, this can easily be converted into
  /// a future based interface by wrapping the client calls, see below

  // Initialise
  final CmisServerClient cmisClient = CmisServerClient();
  const String cmisRepositoryId = '';
  const String cmisUrl = 'http://cmis.alfresco.com/cmisbrowser';
  const String cmisUser = 'admin';
  const String cmisPassword = 'admin';
  const String serviceUrl = '';

  try {
    cmisSession = cmisClient.getCmisSession(
        cmisUrl, serviceUrl, cmisUser, cmisPassword, cmisRepositoryId);
  } on Exception catch (e) {
    print(e);
  }

  // Get the repositories, future based
  await getRepositories();
  // or ... JsonObjectLite<dynamic> info = await getRepositories();
  print('Repository id is : ${cmisSession.repositoryId}');

}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  cmis: ^4.0.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:cmis/cmis.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
11
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
56
Learn more about scoring.

We analyzed this package on Nov 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:cmis/cmis.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev <3.0.0
http ^0.12.0+2 0.12.0+2
json_object_lite ^2.0.0 2.1.0
mime ^0.9.6+3 0.9.6+3
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
http_parser 3.1.3
meta 1.1.8
path 1.6.4
pedantic 1.8.0+1
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
bootjack ^1.0.1
build_runner ^1.6.2
build_test ^0.10.8
build_web_compilers ^2.1.4
dart_style ^1.2.9
dartdoc ^0.28.4
test ^1.6.5