SAS Data Integration Studio 4.3
Version Control Plugin Reference

com.sas.workspace.plugins
Interface VersionControlPluginInterface


public interface VersionControlPluginInterface

Classes implementing this interface will be loaded by the com.sas.metadata.archive plugin and used to interface with a specific version control system. The archive plugin will load the first plugin of this type that it finds, so be sure to remove unwanted implementations of this interface.

Classes that implement this interface should also implement the com.sas.wadmin.app.ApplicationOptionsPluginInterface so that their options panel can be displayed.


Method Summary
 boolean commit(ArchiveInfo archive, java.lang.String spk_path)
          This method will take an ArchiveInfo object and a path on the local disk to an SPK file that has just been exported from DIS.
 boolean edit(ArchiveInfo archive, ArchiveInfo newArchive)
          Used for changing or renaming an existing archive.
 java.util.List<ArchiveInfo> getArchives()
          Returns a list containing data about every version of every archive on the version control system.
 java.util.Properties getConfigurationProperties()
          Returns a map containing key/value pairs of all the VCS specific connection information, such as server information, etc.
 ArchiveInfo getPreviousArchive(ArchiveInfo current)
          This method will analyze the version of the archive passed in and return the ArchiveInfo that is one version older, or null if no previous version exists.
 boolean isConfigurationCorrect()
          This will perform a test login to the version control system and return true if the login was successful, false otherwise.
 boolean isTypePasswordInCmdWin()
          Some version control systems require that the user enter his or her password at a command prompt.
 boolean remove(ArchiveInfo archive)
          This will remove the specified archive from the VCS system.
 boolean retrieve(ArchiveInfo archive, java.lang.String spk_path)
          This method will take an ArchiveInfo object and a path on the local disk.
 void setConfigurationProperties(java.util.Properties props)
          Initializes the plugin with the data needed for operation.
 

Method Detail

isConfigurationCorrect

boolean isConfigurationCorrect()
This will perform a test login to the version control system and return true if the login was successful, false otherwise. This will be used to ensure that a valid connection to the VCS can be made.

Returns:
true if the configuration for the VCS server is correct, allowing the user to log in.

isTypePasswordInCmdWin

boolean isTypePasswordInCmdWin()
Some version control systems require that the user enter his or her password at a command prompt. If this is required for this VCS, this method should return true.

Returns:
true if the password must be typed in a command window

commit

boolean commit(ArchiveInfo archive,
               java.lang.String spk_path)
This method will take an ArchiveInfo object and a path on the local disk to an SPK file that has just been exported from DIS. The version control plugin module will then commit the SPK file to the version control system, and will also update and commit the master archive list. Returns true if successful, false otherwise.

Parameters:
archive - the ArchiveInfo object to be stored to the version control system.
spk_path - The path where the archived was exported to.
Returns:
true if successful, false otherwise.

retrieve

boolean retrieve(ArchiveInfo archive,
                 java.lang.String spk_path)
This method will take an ArchiveInfo object and a path on the local disk. The VCS module will then retrieve the specified SPK file from the version control system (it could be any version of any archive), and store the SPK file to the specified location on disk. Returns true if successful, false otherwise.

Parameters:
archive - an ArchiveInfo object representing the archive to be retrieved.
spk_path - The path where the retrieved file should be stored.
Returns:
true if successful, false otherwise.

getPreviousArchive

ArchiveInfo getPreviousArchive(ArchiveInfo current)
This method will analyze the version of the archive passed in and return the ArchiveInfo that is one version older, or null if no previous version exists.

Parameters:
current - The current version of the ArchiveInfo
Returns:
The next oldest version of the ArchiveInfo

remove

boolean remove(ArchiveInfo archive)
This will remove the specified archive from the VCS system. Returns true if successful, false otherwise. Depending on the specific version control system, removing a specific version of an object may not be possible. In these cases, as long as the archive is removed from the master list (typically serialized to XML), the user will not be able to access it through this plugin.

Parameters:
archive - the ArchiveInfo object to be removed from the version control system.
Returns:
true if successful, false otherwise.

edit

boolean edit(ArchiveInfo archive,
             ArchiveInfo newArchive)
Used for changing or renaming an existing archive. Given an ArchiveInfo that currently exists, and a new ArchiveInfo with updated data, the new data will replace the old data. Note that this should only be used to modify the name and/or description of the archive.

Parameters:
archive - The current ArchiveInfo object
newArchive - The newer ArchiveInfo object, which will replace the old one.
Returns:
true if the process completes successfully, false otherwise.

getConfigurationProperties

java.util.Properties getConfigurationProperties()
Returns a map containing key/value pairs of all the VCS specific connection information, such as server information, etc.

Returns:
a Properties object containing a set of key/value pairs representing all the information that the plugin needs to store between sessions.

setConfigurationProperties

void setConfigurationProperties(java.util.Properties props)
Initializes the plugin with the data needed for operation. This will accept a map containing key/value pairs of all the VCS specific connection information, but should NOT be persisted or stored by individual VCS modules. The ArchiveCore plugin will handle storing this information between sessions.

Parameters:
props - a Properties object containing a set of key/value pairs representing all the information that the plugin needs to store between sessions.

getArchives

java.util.List<ArchiveInfo> getArchives()
Returns a list containing data about every version of every archive on the version control system. One way to approach this is to maintain an XML file on the actual version control system, which will contain every version of every SPK file that has been committed to the server, in addition to a list of the contents of each of those SPK files. The commit, remove, and edit methods will update this master file every time the action is performed.

Returns:
a list containing an ArchiveInfo object for every version of every archive on the version control system. This list of ArchiveInfo objects is typically serialized to an XML file.

SAS Data Integration Studio 4.3
Version Control Plugin Reference

Copyright (c) 2011 SAS Institute, Inc.