All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.cwilper.fcrepo.cloudsync.api.CloudSyncService Maven / Gradle / Ivy

package com.github.cwilper.fcrepo.cloudsync.api;

import java.io.InputStream;
import java.util.List;

public interface CloudSyncService {

    // -----------------------------------------------------------------------
    //                               Service
    // -----------------------------------------------------------------------

    ServiceInfo getServiceInfo();

    ServiceInfo initialize(ServiceInit serviceInit) throws AlreadyInitializedException;

    // -----------------------------------------------------------------------
    //                                Users
    // -----------------------------------------------------------------------

    User createUser(User user) throws UnauthorizedException, NameConflictException;

    List listUsers();

    User getUser(String id) throws ResourceNotFoundException;

    User getCurrentUser();

    User updateUser(String id, User user) throws UnauthorizedException, ResourceNotFoundException, NameConflictException;

    void deleteUser(String id) throws UnauthorizedException, ResourceInUseException;

    // -----------------------------------------------------------------------
    //                                Tasks
    // -----------------------------------------------------------------------

    Task createTask(Task task) throws NameConflictException;

    List listTasks();

    Task getTask(String id) throws ResourceNotFoundException;

    Task updateTask(String id, Task task) throws ResourceNotFoundException, NameConflictException;

    void deleteTask(String id) throws ResourceInUseException;

    // -----------------------------------------------------------------------
    //                             Object Sets
    // -----------------------------------------------------------------------

    ObjectSet createObjectSet(ObjectSet objectSet) throws NameConflictException;

    List listObjectSets();

    ObjectSet getObjectSet(String id) throws ResourceNotFoundException;

    void deleteObjectSet(String id) throws ResourceInUseException;

    // -----------------------------------------------------------------------
    //                            Object Stores
    // -----------------------------------------------------------------------

    ObjectStore createObjectStore(ObjectStore objectStore) throws NameConflictException;

    List listObjectStores();

    ObjectStore getObjectStore(String id) throws ResourceNotFoundException;

    void deleteObjectStore(String id) throws ResourceInUseException;

    // -----------------------------------------------------------------------
    //                              Task Logs
    // -----------------------------------------------------------------------

    // sorted by finishDate in descending order, nulls first
    List listTaskLogs();

    TaskLog getTaskLog(String id) throws ResourceNotFoundException;

    InputStream getTaskLogContent(String id) throws ResourceNotFoundException;

    void deleteTaskLog(String id) throws ResourceInUseException;

    // -----------------------------------------------------------------------
    //                             DuraCloud
    // -----------------------------------------------------------------------

    List listProviderAccounts(String url,
                                               String username,
                                               String password);

    List listSpaces(String url,
                           String username,
                           String password,
                           String providerAccountId);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy