Service agnostic cloud storage access with TMS Cloud Pack for.net



Similar documents
Login with other services to ASP.NET websites with TMS Cloud Pack for.net

PaperStream Connect. Setup Guide. Version Copyright Fujitsu

From Delphi to the cloud

Introduction to Cloud Storage GOOGLE DRIVE

Proposal. Deployment Guide. How to Use CloudBerry Drive with Oracle Storage Cloud Service

Hosted SharePoint. OneDrive for Business. OneDrive for Business with Hosted SharePoint. Secure UK Cloud Document Management from Your Office Anywhere

Cloud Elements! Marketing Hub Provisioning and Usage Guide!

White Paper. Anywhere, Any Device File Access with IT in Control. Enterprise File Serving 2.0

Enterprise Private Cloud Storage

Contents Jive StreamOnce

School Account Configuration Procedures

SharePoint Reset Password Web Part

Administering the Web Server (IIS) Role of Windows Server

Administering the Web Server (IIS) Role of Windows Server 10972B; 5 Days

Dacorum U3A Computer Support Group. Friday 27th March 2015

Utilizing SASED OneDrive Cloud Storage

Technical Support Set-up Procedure

Asset Manager. Open Text Web Solutions Management Server 10.0

SAP Digital CRM. Getting Started Guide. All-in-one customer engagement built for teams. Run Simple

The full setup includes the server itself, the server control panel, Firebird Database Server, and three sample applications with source code.

INTEGRATION GUIDE. DIGIPASS Authentication for Google Apps using IDENTIKEY Federation Server

10972B: Administering the Web Server (IIS) Role of Windows Server

owncloud Architecture Overview

Manual for Android 1.5

Project Plan 365 Collaboration with Microsoft Project Files (MPP) in OneDrive cloud

Business and enterprise cloud sync, backup and sharing solutions

Quick Start Guide Using OneDisk with the Tappin Service

How To Synchronize With Gmail For Business On Shoretel

Release Notes. CTERA Portal May CTERA Portal Release Notes 1

Microsoft Administering the Web Server (IIS) Role of Windows Server

Guide to Setting up Docs2Manage using Cloud Services

WHMCS Integration Manual

PolyU Connect Mobile Connection. Setup Guide

BarTender Print Portal. Web-based Software for Printing BarTender Documents WHITE PAPER

How to successfully migrate from GoogleApps

Introduction Upload Upload Document Quick Upload Salesforce 1 Upload Salesforce File Upload Download...

Enterprise Archive Managed Archiving & ediscovery Services User Manual

AutoMerge Online Service Configuration for MS CRM 2013

See the Developer s Getting Started Guide for an introduction to My Docs Online Secure File Delivery and how to use it programmatically.

Pronestor Room & Catering

Cloud Backup for Joomla

Wireless Security Camera with the Arduino Yun

Voice. Internet. Apps. Data Center. Wide Area Networks. Business is better in the cloud

Getting Started with the Ed-Fi ODS and Ed-Fi ODS API

Solving the Online File-Sharing Problem Replacing Rogue Tools with the Right Tools

Access All Your Files on All Your Devices

ConvincingMail.com Marketing Solution Manual. Contents

Protecting Your Data On The Network, Cloud And Virtual Servers

Office 365 Cheat Sheet OneDrive for Business

Configuring Single Sign-on from the VMware Identity Manager Service to Dropbox

SharePoint Integration Framework Developers Cookbook

Getting Started with vcloud Air Object Storage powered by Google Cloud Platform

Backing up your digital image collection provides it with essential protection.

Setting Up Jive for SharePoint Online and Office 365. Introduction 2

Cloud Elements! Events Management BETA! API Version 2.0

Archive Attender Version 3.5

Set up My Sites (SharePoint Server

Project Plan 365 Collaboration with Microsoft Project Files (MPP) in Dropbox cloud

DIGITAL FORENSIC INVESTIGATION OF CLOUD STORAGE SERVICES

Office 365 and SharePoint Local File Share Synchronization

Working in the Cloud

System Administration Training Guide. S100 Installation and Site Management

Manage all your Office365 users and licenses

inforouter V8.0 Server & Client Requirements

skype ID: store.belvg US phone number:

Storage Made Easy. Cloud File Server Overview

PORTAL ADMINISTRATION

Windows Intune Walkthrough: Windows Phone 8 Management

General principles and architecture of Adlib and Adlib API. Petra Otten Manager Customer Support

CTERA Agent for Linux

This module explains the Microsoft Dynamics NAV architecture and its core components.

Content Delivery Service (CDS)

Mobile App User's Guide

Chapter 1 Kingsoft Office for Android: A Close Look. Compatible with Microsoft Office: With Kingsoft Office for Android, users are allowed to create,

OpenText Information Hub (ihub) 3.1 and 3.1.1

Citrix Virtual Classroom. Deliver file sharing and synchronization services using Citrix ShareFile. Self-paced exercise guide

Worksheet - Document management and Cloud Services on the ipad

WINDOWS SERVER SMALL BUSINESS SOLUTIONS. Name: Marko Drev

Lotus Notes 8.5 to Office 365 for business

PrinterOn Mobile App for ios and Android

Workflow approval via

owncloud Architecture Overview

Live Maps. for System Center Operations Manager 2007 R2 v Installation Guide

Customize Mobile Apps with MicroStrategy SDK: Custom Security, Plugins, and Extensions

SafeGuard Enterprise upgrade guide. Product version: 6.1

Resco CRM Guide. Get to know Resco CRM

Drop Shipping. Contents. Overview 2. Quick Tips 3. Basic Setup 4. Drop Ship Options 5. File Pickup Options 6. Messages 8

Content Management System

BioHPC Cloud Storage. portal.biohpc.swmed.edu Updated for

MOC Deploying and Managing Windows 10 Using Enterprise Services

mylittleadmin for MS SQL Server Installation Guide

Transcription:

Service agnostic cloud stage access with TMS Cloud Pack f.net Introduction Cloud stage quickly became an accepted technology f various scenarios. Whether it is f backup purposes, sharing files with colleagues a mechanism to ensure critical data is available anytime and anywhere, cloud stage offers an ideal solution. The maj players these days in cloud stage offerings are Dropbox, Google Drive, Microsoft OneDrive and Box.NET. Each of these services also offers their own API to access cloud stage files upload files on the cloud stage belonging to an user account. With TMS Cloud Pack f.net, you can now write an application that has built-in access to a cloud stage that is agnostic of the cloud stage service used. With a single interface, the application gains full access to the cloud stage of choice. In addition to these web cloud stage services, also WebDav server access has been covered by this same common interface. What s me, this agnostic approach is valid f the different platfms.net suppts: WinFms, WPF, Windows Ste apps, ASP.NET apps The ICloudStage interface In TMS Cloud Pack f.net, the stage access is unified with the ICloudStage interface. Our different components f Dropbox, Google Drive, Microsoft OneDrive and Box.NET all offer the ICloudStage interface. private ICloudStage Stage get; set; Internally, in TMS Cloud Pack f.net, the architecture is: ICloudStage interface definition:

public interface ICloudStage : ICloudStageBase CloudStageItemBase Copy(CloudStageItemBase itemsource, string target); CloudStageItemBase Move(CloudStageItemBase itemsource, string target); CloudStageItemBase Download(CloudStageItemBase item); CloudStageItemBase Upload(CloudStageItemBase item); CloudStageItemBase Edit(CloudStageItemBase item); CloudStageItemBase CreateDir(CloudStageItemBase item); CloudStageItemBase RemoveDir(CloudStageItemBase item); CloudStageItemBase DeleteFile(CloudStageItemBase item); ICloudStageFolderCollection Folders get; WebDav,CalDav,CardDav,Box,Dropbox,OneDrive,GoogleDrive are components that currently implement this interface. Creating your first cloud stage agnostic application In this article, we ll provide step by step guidelines to create your first WinFms application that will be able to seamlessly integrate with your cloud stage services of choice. Of course, you need to start by registering your application with each of these services to obtain a unique application key and secret and set a proper callback URL. The TMS Cloud Pack f.net developers guide provides instructions where you can register your application f each of these services. When you have your application key and secret, you can start by dropping the cloud stage service components of your choice to the fm:

In this sample we will use Google Drive, Box.NET, DropBox and OneDrive. Also drop an OAuthWinfmPanel component on the fm that will be used f the authentication/authization step. Each cloud stage component has a property Authenticat and under this Authenticat property you can find the OAuthPanel reference. Set f each cloud stage component Authenticat.OAuthPanel to the instance of the OAuthWinfmPanel: CloudStage.Authenticat.OAuthPanel = OAuthWinfmsPanel1; Next configure the component with the application key and secret. You can do this programmatically via properties CloudStage.Authenticat.OAuthApplication.Key and CloudStage.Authenticat.OAuthApplication.Secret.

You can also create a XML file that contains these settings OAuth.CFG and use LoadSettings() to have the component retrieve the settings. In the next step, wire-up the AfterOpen event f each of the cloud stage components. This event is triggered when the component could obtain a successful connection to the cloud stage service. In this event, the application could fill f example a treeview with the structure of the files as retrieved from the cloud stage: private void stage_afteropen(object sender, ref bool handled) opened = true; ToggleControls(); WinFmsBase.FillTreeView(treeView1, Stage.Folders); FillTreeView is a method available in the WinFmsBase namespace that is just a utility method to allow you to easily populate a treeview component. (Note that equivalent methods are available to fill an ASP.NET treeview f example) The Node.Tag will be set to an ICloudStageItem object, you can use that to access the selected item like this: ICloudStageItem di = (CloudStageItemBase)treeView1.SelectedNode.Tag; and perfm further actions on it. Once this is setup, the application is ready to use the cloud stage service of choice and then wk with this stage service solely through the unified ICloudStage & ICloudStageItem interfaces.

Connecting A global private interface Stage is used that simply points to the cloud stage component that we want to use: private ICloudStage Stage get; set; and that interface could be initialized from a select of the cloud service: switch (CloudStageIndex) case 0: Stage = dropbox1; break; case 1: Stage = onedrive1; break; case 2: Stage = googledrive1; break; case 3: Stage = box1; break; and with this interface, the connection to the cloud stage service can be started with Stage.Open(); This will bring up the authentication / authization fm and when successfully completed, it will trigger the AfterOpen event of the Stage. Retrieving folder infmation ICloudStage.Folders points to the root of the cloud stage. F files and folders under root, Items exist: You can access files and folders within this root folder with: ICloudStageItem ICloudStage.Folders[0].Items[x] F example, to loop through all files and folders within a folder, you can use: feach (ICloudStageItem item in Stage.Folders[0].Items) // do an action on the item

If the item is a folder, it is indicated by item.itemtype and files under this folder can in turn be retrieved with: feach (ICloudStageItem item in Stage.Folders[0].Items) if (item.itemtype == ItemType.Folder) feach (ICloudStageItem subitem in item.items) // get items in subfolder here Note that this folder structure has a lazy load design, so this means that only when you are trying to access it, the component will populate it from the server, significantly benefitting the perfmance when you wk with a cloud stage account that has a large amount of files. Upload/Download You can download files easily when you have the ICloudStageItem interface. Note that when you would have used the FillTreeview method, the Node.Tag of a node in this treeview contains such an ICloudStageItem interface. To retrieve this interface f the selected treeview node: ICloudStageItem Item = (CloudStageItemBase)treeView1.SelectedNode.Tag; Once this ICloudStageItem is retrieved, downloading the file that is represented by this interface can be done with: item.savetopath(mypath); item.download(myfilename); item.download(astream); If your selected ICloudStageItem interface is a Folder, then you can upload a file to this folder with following commands:

var item = FolderItem.Items.InsertFile(MyLocalFilePath); var item = FolderItem.Items.InsertFile(AStream); Note that InsertFile() does not start the upload yet. To allow f uploading several files at once, you can first add multiple files with InsertFile and then start the actual multi-file upload with: FolderItem.Post() To replace an existing file, you would: item.edit(stream); item.edit(myfilename); and finalize the update with: FolderItem.Post() Creating folders To create a folder in the root under a specific folder, you can use: var item = CurrentItem.Items.CreateDir(MyFolderName); Followed by item.post(); CurrentItem.Items.Post() Note that equivalent to file uploading, you can create multiple folders and the actual folder creation on the stage service is only executed when you call Post().

Delete a File Folder You can delete multiple files with following code: followed by f (var i = 0 ; i < CurrentItem.Items.Count; i++) CurrentItem.Items.Delete(I); CurrentItem.Items.Post(); CurrentItem.Items[index].Delete(); CurrentItem.Items[index].Post; Share a File Folder You can create a share link f a file on the cloud stage simply by calling the following command GetShare() and you can send this link to other people to download the file: CurrentItem.GetShare().Link Conclusion TMS Cloud Pack f.net completely eliminates the need to write service specific code f integrating cloud stage services in your.net applications. With one set of components, you can add access to the wld s most popular cloud stage services in a simple and consistent way. At this moment, we offer access to 4 popular cloud stage services and also WebDav servers and our team is already busy developing me component wrappers f other cloud stage services. Me infmation, trial version, demos and documentation about TMS Cloud Pack f.net can be found at: http://www.tmssoftware.com/site/tmscloudnet.asp