IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.ras.impord.data
Interface IImportDataModel

All Superinterfaces:
IDataModel

public interface IImportDataModel
extends IDataModel

This interface holds all the data needed to import a RAS asset. It represents the model part of the model-view-controller implementation of the RAS import service. Although it can be, it's not intended to be implemented by clients.


Field Summary
 
Fields inherited from interface com.ibm.xtools.ras.core.data.IDataModel
NULL
 
Method Summary
 void addToOverwriteList(String filename)
          Add to the list of files that can be overwritten by the import service if necessary
 void clearOverwriteList()
          Clear the list of files that can be overwritten by the import service
 void clearTargetProjectLocations()
          Clear the "project name" <=>"target project location" mapping maintained in the data model.
 void close()
          Closes and releases all resources being held by the data model.
 Boolean getAcceptAllLicenses()
          Checks if all licences have been accepted by the import data model client.
 IImportLicenseModel[] getAllLicenses(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
          Retrieve licenses associated with the artifacts pacakged in the asset.
 Asset getAsset(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
          Retrieve the Asset for this data model.
 String getAssetPath()
          Retrieve the asset path.
 String[] getDeployableFeaturesInAsset(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
          Retreves the deployable features contained in the asset.
 String[] getDeployablePluginsInAsset(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
          Retrieves the deployable plugins/fragments contained in the asset.
 String getDeployablesInstallSite()
          Retrieve the installation location for deployable features and plugins.
 String getImportStatusLog()
          Retrieve the status log file associated with the import of this asset if one exists.
 Artifact getManifestArtifact()
          Retrieve the asset's manifest Artifact if possible.
 String getManifestFolder()
          Retreives the manifest folder path.
 List getOverwriteList()
           
 Boolean getOverwriteWithoutPromptingOption()
          Retrieve the overwrite silently option.
 String[] getProjectsInAsset(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
          Retrieves the projects contained in the asset.
 IRelatedAssetManager getRelatedAssetManager(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
          Get the IRelatedAssetManager associated with an Asset
 Boolean getSaveManifestOption()
          Retrieves the save manifest option.
 String getTargetFolder()
          Retrieve the target folder path.
 String getTargetProjectLocation()
          Retrieve the target project location.
 String getTargetProjectLocation(String projectName)
          Retrieve the target project location for the project identified by the projectName.
 org.eclipse.swt.widgets.Shell getUIContext()
          Retrieve the UI context for import operations.
 void removeTargetProjectLocation(String projectName)
          Remove the target project file path for the project identified by projectName.
 void setAcceptAllLicenses(boolean theOption)
          Accept all the licenses associated with the artifacts packaged with the asset.
 void setAssetPath(String assetPath)
          Set the asset file path for the import data model.
 void setDeployablesInstallSite(String siteName)
          Set the installation location to the given site on the local filesystem for deploying features and plugins.
 void setManifestFolder(String thePath)
          Set the folder path where the manifest will be stored in.
 void setOverwriteWithoutPromptingOption(boolean theOption)
          Set the overwrite silently option.
 void setSaveManifestOption(boolean theOption)
          Set the save manifest option.
 void setTargetFolder(String thePath)
          Set the target folder path.
 void setTargetProjectLocation(String thePath)
          Set the target project file path.
 void setTargetProjectLocation(String projectName, String thePath)
          Set the target project file path for only the project identified by projectName.
 void setUIContext(org.eclipse.swt.widgets.Shell shell)
          Set the UI context for import operations.
 org.eclipse.core.runtime.IStatus validateAll(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
          Validates the properties of the data model to determine if it's in a state acceptable to the import service.
 
Methods inherited from interface com.ibm.xtools.ras.core.data.IDataModel
addDataModelListener, containsProperty, getProperty, getPropertyAsBoolean, getPropertyAsInteger, getPropertyAsString, removeDataModelListener, removeProperty, setProperty, setProperty, setProperty
 

Method Detail

setAssetPath

public void setAssetPath(String assetPath)
Set the asset file path for the import data model.

Parameters:
assetPath - the asset file path

getAssetPath

public String getAssetPath()
Retrieve the asset path. It will be the file path or the repository logical path if the data model was set using a repository asset view.

Returns:
the asset path or null if it doesn't exist.

getAsset

public Asset getAsset(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Retrieve the Asset for this data model.

Parameters:
progressMonitor - to monitor progress of getting the asset. getAsset() could be long running if a large asset is being retrieved the first time.
Returns:
asset.

getManifestArtifact

public Artifact getManifestArtifact()
Retrieve the asset's manifest Artifact if possible. Manifest artifacts are tagged with activity type ImportActivityTaskTypes.SAVE_MANIFEST to aid retrieval.

Returns:
manifest Artifact or null if nothing is found.

getRelatedAssetManager

public IRelatedAssetManager getRelatedAssetManager(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Get the IRelatedAssetManager associated with an Asset

Parameters:
progressMonitor - to monitor progress of getting the related asset manager for this asset. getRelatedAssetManager could be long running especially the first time it is invoked on large assets.
Returns:
the related asset manager for the the asset in the data model.

getImportStatusLog

public String getImportStatusLog()
Retrieve the status log file associated with the import of this asset if one exists.

Returns:
absolute path of status log, null if it does not exist.

getTargetFolder

public String getTargetFolder()
Retrieve the target folder path.

Returns:
the target folder path or null if it doesn't exist.

setTargetFolder

public void setTargetFolder(String thePath)
Set the target folder path. This path should be relative to the workspace and should be rooted in a project.

Parameters:
thePath - the target folder path
Throws:
NullPointerException - if thePath is null

getTargetProjectLocation

public String getTargetProjectLocation()
Retrieve the target project location.

Returns:
the target project file path or null if it doesn't exist.

getTargetProjectLocation

public String getTargetProjectLocation(String projectName)
Retrieve the target project location for the project identified by the projectName.

Parameters:
projectName - for the project whose target location is being retrieved.
Returns:
the target project file path or null if it doesn't exist.

setTargetProjectLocation

public void setTargetProjectLocation(String thePath)
Set the target project file path.

Parameters:
thePath - the target project file path/location.
Throws:
NullPointerException - if thePath is null

setTargetProjectLocation

public void setTargetProjectLocation(String projectName,
                                     String thePath)
Set the target project file path for only the project identified by projectName. Overrides the target project location set using setTargetProjectLocation(String thePath).

Parameters:
projectName - identifies the project to associate with the path/location.
thePath - the target project file path/location.
See Also:
clearTargetProjectLocations()

removeTargetProjectLocation

public void removeTargetProjectLocation(String projectName)
Remove the target project file path for the project identified by projectName.

Parameters:
projectName - name of the project which is being disassociated with a project location

clearTargetProjectLocations

public void clearTargetProjectLocations()
Clear the "project name" <=>"target project location" mapping maintained in the data model.


getDeployablesInstallSite

public String getDeployablesInstallSite()
Retrieve the installation location for deployable features and plugins.

Returns:
the installation location or null if it does not exist.

setDeployablesInstallSite

public void setDeployablesInstallSite(String siteName)
Set the installation location to the given site on the local filesystem for deploying features and plugins.

Parameters:
siteName - is the given installation location.

getProjectsInAsset

public String[] getProjectsInAsset(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Retrieves the projects contained in the asset.

Parameters:
progressMonitor - to monitor progress of the getProjectsInAsset. It could potentially be long-running, especially when invoked for the first time.
Returns:
array of projects contained in asset or null if no asset has been specified in the data model.

getDeployablePluginsInAsset

public String[] getDeployablePluginsInAsset(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Retrieves the deployable plugins/fragments contained in the asset.

Parameters:
progressMonitor - to monitor progress of this method as it can potentially validate the asset.
Returns:
the plugin names that will be deployed by the import operation or null if no asset has been specified in the data model.

getDeployableFeaturesInAsset

public String[] getDeployableFeaturesInAsset(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Retreves the deployable features contained in the asset.

Parameters:
progressMonitor - to monitor progress of this method as it can potentially validate the asset.
Returns:
the feature names that will be deployed by the import operation or null if no asset has been specified in the data model.

getAllLicenses

public IImportLicenseModel[] getAllLicenses(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Retrieve licenses associated with the artifacts pacakged in the asset.

Parameters:
progressMonitor - to monitor progress of this method as it can potentially validate the asset.
Returns:
array of licenses of type IImportLicenseModel.

setAcceptAllLicenses

public void setAcceptAllLicenses(boolean theOption)
Accept all the licenses associated with the artifacts packaged with the asset. If there are artifacts that require licenses, acceptAllLicenses() has to be invoked before performing an import.

Parameters:
theOption - set to true to accept licenses, else set to false.

getAcceptAllLicenses

public Boolean getAcceptAllLicenses()
Checks if all licences have been accepted by the import data model client.

Returns:
true if all the licenses have been accepted, otherwise return false.

getSaveManifestOption

public Boolean getSaveManifestOption()
Retrieves the save manifest option. Identical to getPropertyAsBoolean(ImportDataModelConstants.OPTION_SAVE_MANIFEST)

Returns:
the save manifest option

setSaveManifestOption

public void setSaveManifestOption(boolean theOption)
Set the save manifest option. Identical to setProperty(ImportDataModelConstants.OPTION_SAVE_MANIFEST, theOption)

Parameters:
theOption - the save manifest option

getManifestFolder

public String getManifestFolder()
Retreives the manifest folder path. Identical to getProperty(ImportDataModelConstants.MANIFEST_PATH)

Returns:
the string representing path where the manifest will be stored.

setManifestFolder

public void setManifestFolder(String thePath)
Set the folder path where the manifest will be stored in. Identical to setProperty(ImportDataModelConstants.MANIFEST_PATH, theOption)

Parameters:
thePath - representing the manifest folder path.

getOverwriteWithoutPromptingOption

public Boolean getOverwriteWithoutPromptingOption()
Retrieve the overwrite silently option. Identical to getPropertyAsBoolean(ImportDataModelConstants.OPTION_OVERWRITE_WITHOUT_PROMPTING)

Returns:
the overwrite silently option

setOverwriteWithoutPromptingOption

public void setOverwriteWithoutPromptingOption(boolean theOption)
Set the overwrite silently option. Identical to setProperty(ImportDataModelConstants.OPTION_OVERWRITE_WITHOUT_PROMPTING, theOption)

Parameters:
theOption - the overwrite silently option

addToOverwriteList

public void addToOverwriteList(String filename)
Add to the list of files that can be overwritten by the import service if necessary

Parameters:
filename - is a full path name to the file that can be overwritten by the import service if necessary.

clearOverwriteList

public void clearOverwriteList()
Clear the list of files that can be overwritten by the import service


getOverwriteList

public List getOverwriteList()
Returns:
list of files that can be overwritten by the import service

validateAll

public org.eclipse.core.runtime.IStatus validateAll(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Validates the properties of the data model to determine if it's in a state acceptable to the import service.

Parameters:
progressMonitor - to monitor progress of validate data model operation. The validate operation could be long running for large assets.
Returns:
IStatus that holds the status code and status messages if any

setUIContext

public void setUIContext(org.eclipse.swt.widgets.Shell shell)
Set the UI context for import operations.

Parameters:
shell - is the org.eclipse.swt.widgets.Shell context under which any user interaction takes place or null if there isn't any.

getUIContext

public org.eclipse.swt.widgets.Shell getUIContext()
Retrieve the UI context for import operations.

Returns:
org.eclipse.swt.widgets.Shell or null if it was not set.

close

public void close()
Closes and releases all resources being held by the data model.


IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.