MOVEit DMZ API Java
Introduction


Overview - Requirements - Installation - Class Reference - Example Code - Contacts - Software License

Overview

MOVEit DMZ API Java provides a Java-based interface to create, manage and delete files, folders, secure messages, messageboxes, users and groups on a MOVEit DMZ server.  MOVEit DMZ API Java is platform-independent and can run equally well on Windows, Linux, Solaris and many other operating systems. As such, MOVEit DMZ API Java is a basis for platform-independent secure file transfer applications such as the precompiled "mishell" command-line application included with this distribution.

MOVEit DMZ API Java consists of five Java classes contained in the "com.stdnet.moveit.api" package. Although MOVEit DMZ API along with all of the MOVEit family of products are now owned and supported by Ipswitch, the "com.stdnet" namespace created by the original developers is being retained for backward compatibility. The Java classes are:

  • Client
    This class does most of the work in the MOVEit DMZ API Java suite; Client is the only class which directly connects to a MOVEit DMZ server. (Other classes listed below are used to organize data obtained from or sent through a Client class.)

  • MOVEitFileInfo
    This class defines a container object which describe specific MOVEit DMZ files. Objects of this type are returned either directly, as with the getFileDetails method, or in HashMaps, as with the listFilesInFolder method.

  • MOVEitFolderInfo
    This class defines a container object which describe specific MOVEit DMZ folders and/or messageboxes. Objects of this type are returned either directly, as with the getFolderDetails method, or in HashMaps, as with the listFolders method.

  • MOVEitUserInfo 
    This class defines a container object which describe specific MOVEit DMZ users. Objects of this type are returned either directly, as with the getUserDetails method, or in HashMaps, as with the listUsers method.

  • MOVEitMessageInfo
    This class defines a container object which describe specific MOVEit DMZ secure messages. Like other "container" classes, objects of this type are returned either directly, as with the readMessage method, or in HashMaps, as with the listNewMessages method. Unlike other "container" classes, MOVEitMessageInfo is not only returned from Client queries, but is also used independently to create new secure messages. To support this second role, MOVEitMessageInfo has methods to edit new message recipients and attachments. A link to a valid Client object is required to send new messages.

Requirements

MOVEit DMZ API Java requires a Java runtime environment corresponding to Sun's Java SE 6 or 7 (also known as 1.6 and 1.7). You may obtain an appropriate version of Java for your specific operating system from Oracle's Java site.

Application development with MOVEit DMZ API Java requires a Java compiler in addition to the runtime environment. Oracle's Java compiler, along with several other application development tools, can be found in the Java SDK package.

For ease-of-use, it is recommended that Java's installed "bin" directory be added to the PATH environment variable (or similar facility, depending on your operating system) so the Java program loader, compiler, and any other Java utilities can be called directly from the command line. The bin directory is normally located in the main Java installation directory.

Installation

Installation of the MOVEit DMZ API Java classes involves extracting the installation file into a folder to which your Java applications will have access. The path to the class heirarchy may then be specified when calling your applications by using the "-classpath" option of the java runtime environment, or by adding the location to your Java classpath environment variable.

Once the MOVEit DMZ API Java package is installed, you can test to see if everything is working correctly by trying out the mishell application that is included. If you are in the directory where you extracted the API installation file, simply run this command:

java mishell
Otherwise, you may need to add the installation location path to the call with the "-classpath" tag, like so:
java -classpath /path/to/moveit/api/ mishell
If you end up with an mishell prompt, then Java was able to find the mishell program and the MOVEit DMZ API Java library. You can try signing on to your MOVEit DMZ server by entering the following commands in the mishell program and filling in your username and password when requested:
open moveit.yourcompany.com
dir
Be sure to use your correct hostname, username, and password. If there are no errors, and you get back a directory listing, then MOVEit DMZ API Java was able to successfully connect to your MOVEit DMZ server. Type "exit" to exit the mishell program.

Class Reference

See the MOVEit DMZ API Class Reference (in JavaDoc format) for a complete description of the available methods and properties of the various MOVEit DMZ API Java classes.

Example Code

(Please be sure to see the source code for the included "mishell" command-line file transfer application for a longer example.)

The following is a simple example of how to use the MOVEit DMZ API Java classes in a Java program. This example will signon to a MOVEit DMZ server, get a list of folders available on the system, print out the name of each folder, and signoff. To compile this application, create a text file called MOVEitAPIExample.java, and copy the code below to this file. Next, use the "javac" Java compiler program to compile the application, like so:

javac MOVEitAPIExample.java
You may need to use the "-classpath" flag to set the location to your MOVEit DMZ API Java library, like so:
javac -classpath /path/to/moveit/api MOVEitAPIExample.java
Finally, you can run the application by calling it's name with the Java program loader. If you used the "-classpath" flag when compiling, you will need to use it again when running the program loader, along with the current directory, so that the program loader can find your newly compiled application as well:
java -classpath /path/to/moveit/api;. MOVEitAPIExample

/* Begin Example MOVEit DMZ API Java application */

import com.stdnet.moveit.api.*;
import java.util.HashMap;
import java.util.Iterator;

class MOVEitAPIExample {
   public static void main(String[] args) {
      String host = "moveit.mydomain.com";
      boolean secure = true;  // we want to connect securely
      boolean ignorecertprobs = true;  // our DMZ server has a test certificate
      String username = "dmzuser";
      String password = "myp@ss";

      // Create an instance of the API class
      Client oAPI = new Client();
      oAPI.host(host);
      oAPI.secure(secure);
      oAPI.ignoreCertProbs(ignorecertprobs);

      // Signon to the DMZ server
      if (!(oAPI.signon(username,password))) {
         System.err.println("Error signing on to DMZ server: " + oAPI.errorDescription());
         System.exit(1);
      }

      // Get a list of folders
      HashMap oFolders = oAPI.listFolders();

      // Iterate through the list of FolderInfo objects. Print out ID and path.
      if (!(oFolders == null)) {
         System.out.println("Found " + oFolders.size() + " folders:\n");
         for (Iterator it = oFolders.keySet().iterator();it.hasNext();) {
            String folder = (String)it.next();
            MOVEitFolderInfo oFolder = (MOVEitFolderInfo)(oFolders.get(folder));
            System.out.println(oFolder.ID() + "\t" + folder);
         }
      } else {
         System.err.println("Error getting folder list: " + oAPI.errorDescription());
         System.exit(1);
      }

      // Signoff of the DMZ server
      oAPI.signoff();
   }
}

/* End Example MOVEit DMZ API Java application */

Contacts

mishell and MOVEit DMZ API Java are part of the MOVEit family of enterprise products by Ipswitch, Inc.  You can contact Ipswitch via any of the following ways:

SUPPORT SITE: https://moveitsupport.ipswitch.com
email: moveitinfo@ipswitch.com
Web: http://www.ipswitch.com
telephone: (608)824-3610
fax: (608)824-3609
postal mail: Ipswitch, Inc.
File Transfer Division
1111 Deming Way, Suite 101
Madison, WI 53717
USA

Software License

MOVEit DMZ API is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. MOVEit DMZ API is licensed, not sold.

1. GRANT OF LICENSE. This license agreement grants you the following rights:

Installation and Use. You may install and use MOVEit DMZ API on any computer for any legal use. You may also make copies of MOVEit DMZ API for backup and archival purposes.

Distribution. You may not reproduce or distribute license key-codes or licensed versions of the product except under the express and written permission of Ipswitch, Inc.

2. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS.

Limitations on Reverse Engineering, Decompilation, and Disassembly. You may not reverse engineer, decompile, or disassemble MOVEit DMZ API, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.

Software Transfer. You may permanently transfer all of your rights under this license agreement provided the recipient agrees to the terms of this license agreement. Ipswitch must be notified and approve of the transfer before such a transfer would become valid.

Termination. Without prejudice to any other rights, Ipswitch may terminate this license agreement if you fail to comply with the terms and conditions of this license agreement. In such event, you must destroy all copies of MOVEit DMZ API and all of its component parts.

Rental. You may not sell, rent, or lease MOVEit DMZ API itself. (Many organizations may however find it useful to bill for the services MOVEit DMZ API and other MOVEit components provide. This is not only allowed but encouraged.)

3. COPYRIGHT. All title and copyrights in and to MOVEit DMZ API (including but not limited to any images, photographs, animations, video, audio, music, text, and "applets" incorporated into the MOVEit DMZ API), the accompanying printed materials, and any copies of the MOVEit DMZ API are owned by Ipswitch or its suppliers. MOVEit DMZ API protected by copyright laws and international treaty provisions. Therefore, you must treat MOVEit DMZ API like any other copyrighted material.

WARRANTY AND LIMITATION OF LIABILITY

This software, and all accompanying files, data and materials, are distributed "AS IS" and with no warranties of any kind, whether express or implied. Good data processing procedure dictates that any program be thoroughly tested with non-critical data before relying on it. The user must assume the entire risk of using the program. This disclaimer of warranty constitutes an essential part of the agreement. In no event shall Ipswitch, Inc. or its principals, shareholders, officers, employees, affiliates, contractors, subsidiaries, or parent organizations, be liable for any incidental, consequential, or punitive damages whatsoever relating to the use of MOVEit Central, or your relationship with Ipswitch, Inc.

NO OTHER WARRANTIES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IPSWITCH, INC. AND ITS SUPPLIERS DISCLAIM ALL OTHER WARRANTIES AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE PRODUCT, AND THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT SERVICES. THIS LIMITED WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS. YOU MAY HAVE OTHERS, WHICH VARY FROM STATE/JURISDICTION TO STATE/JURISDICTION.

LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL IPSWITCH, INC. OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE PRODUCT OR THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT SERVICES, EVEN IF IPSWITCH, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN ANY CASE, IPSWITCH'S ENTIRE LIABILITY UNDER ANY PROVISION OF THIS EULA SHALL BE LIMITED TO U.S. $0.01; PROVIDED, HOWEVER, IF YOU HAVE ENTERED INTO A IPSWITCH, INC. SUPPORT SERVICES AGREEMENT, IPSWITCH'S ENTIRE LIABILITY REGARDING SUPPORT SERVICES SHALL BE GOVERNED BY THE TERMS OF THAT AGREEMENT. BECAUSE SOME STATES AND JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY, THE ABOVE LIMITATION MAY NOT APPLY TO YOU.

TRADEMARKS. All names of products and companies used in this document, the software, or the enclosed documentation may be trademarks of their corresponding owners. Their use in this document is intended to be in compliance with the respective guidelines and licenses. Windows, Windows 95, Windows 98, Windows NT, Windows 2000 and Windows XP are trademarks of Microsoft.