org.pentaho.platform.util.client
Class PublisherUtil

java.lang.Object
  extended by org.pentaho.platform.util.client.PublisherUtil

public class PublisherUtil
extends Object


Field Summary
static int FILE_ADD_FAILED
           
static int FILE_ADD_INVALID_PUBLISH_PASSWORD
           
static int FILE_ADD_INVALID_USER_CREDENTIALS
           
static int FILE_ADD_SUCCESSFUL
           
static int FILE_EXISTS
           
 
Constructor Summary
PublisherUtil()
           
 
Method Summary
static String getPasswordKey(String passWord)
          Utility for getting the MD5 hash from the provided key for sending the publishPassword.
static int publish(String publishURL, String publishPath, File[] publishFiles, String publishPassword, String serverUserid, String serverPassword, boolean overwrite)
          Publishes a list of files and a datasource to the server with basic authentication to the server
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_EXISTS

public static final int FILE_EXISTS
See Also:
Constant Field Values

FILE_ADD_FAILED

public static final int FILE_ADD_FAILED
See Also:
Constant Field Values

FILE_ADD_SUCCESSFUL

public static final int FILE_ADD_SUCCESSFUL
See Also:
Constant Field Values

FILE_ADD_INVALID_PUBLISH_PASSWORD

public static final int FILE_ADD_INVALID_PUBLISH_PASSWORD
See Also:
Constant Field Values

FILE_ADD_INVALID_USER_CREDENTIALS

public static final int FILE_ADD_INVALID_USER_CREDENTIALS
See Also:
Constant Field Values
Constructor Detail

PublisherUtil

public PublisherUtil()
Method Detail

publish

public static int publish(String publishURL,
                          String publishPath,
                          File[] publishFiles,
                          String publishPassword,
                          String serverUserid,
                          String serverPassword,
                          boolean overwrite)
Publishes a list of files and a datasource to the server with basic authentication to the server

Parameters:
publishURL - The URL of the Pentaho server
publishPath - The path in the solution to place the files
publishFiles - Array of File objects to post to the server
dataSource - The datasource to publish to the server
publishPassword - The publishing password for the server
serverUserid - The userid to authenticate to the server
serverPassword - The password to authenticate with the server
Returns:
Server response as a string

getPasswordKey

public static final String getPasswordKey(String passWord)
Utility for getting the MD5 hash from the provided key for sending the publishPassword.

Parameters:
passWord - The password to get an MD5 hash of
Returns:
zero-padded MD5 hash of the password