From 40678d509c3509051ffee0bf872d2760bb2e7e12 Mon Sep 17 00:00:00 2001 From: Richard Millet Date: Fri, 30 Jul 2010 07:20:00 +0000 Subject: [PATCH] NOJIRA: Artifacts for media handling prototype that was finished several weeks ago but never checked-in. --- .../common/imaging/nuxeo/NuxeoImageUtils.java | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/NuxeoImageUtils.java diff --git a/services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/NuxeoImageUtils.java b/services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/NuxeoImageUtils.java new file mode 100644 index 000000000..8fb5d76d5 --- /dev/null +++ b/services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/NuxeoImageUtils.java @@ -0,0 +1,69 @@ +/** + * NuxeoImageUtils.java + * + * {Purpose of This Class} + * + * {Other Notes Relating to This Class (Optional)} + * + * $LastChangedBy: $ + * $LastChangedRevision: $ + * $LastChangedDate: $ + * + * This document is a part of the source code and related artifacts + * for CollectionSpace, an open source collections management system + * for museums and related institutions: + * + * http://www.collectionspace.org + * http://wiki.collectionspace.org + * + * Copyright © 2009 {Contributing Institution} + * + * Licensed under the Educational Community License (ECL), Version 2.0. + * You may not use this file except in compliance with this License. + * + * You may obtain a copy of the ECL 2.0 License at + * https://source.collectionspace.org/collection-space/LICENSE.txt + */ +package org.collectionspace.services.common.imaging.nuxeo; + +import java.io.File; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.nuxeo.ecm.core.api.repository.RepositoryInstance; +import org.nuxeo.common.utils.FileUtils; +import org.nuxeo.ecm.core.api.Blob; +import org.nuxeo.ecm.core.api.ClientException; +import org.nuxeo.ecm.core.api.DocumentModel; +import org.nuxeo.ecm.core.api.blobholder.BlobHolder; +import org.nuxeo.ecm.core.api.blobholder.BlobHolderAdapterService; +import org.nuxeo.ecm.core.api.impl.DocumentModelImpl; +import org.nuxeo.ecm.core.api.impl.blob.FileBlob; +//import org.nuxeo.ecm.core.repository.jcr.testing.RepositoryOSGITestCase; +import org.nuxeo.ecm.platform.picture.api.adapters.PictureBlobHolder; +import org.nuxeo.runtime.api.Framework; + +import org.collectionspace.services.common.ServiceMain; + +public class NuxeoImageUtils { + NuxeoImageUtils() { + //empty constructor + } + + /** + * Creates the picture. + */ + static public void createPicture() { + RepositoryInstance nuxeoSession = null; + + try { + nuxeoSession = ServiceMain.getInstance().getNuxeoConnector().getRepositorySession(); + //nuxeoSession. + } catch (Exception e) { + e.printStackTrace(); + } + } +} -- 2.47.3