com.informatica.powercenter.sdk.mapfwk.core
Class Repository

java.lang.Object
  extended by com.informatica.powercenter.sdk.mapfwk.core.Repository

public class Repository
extends java.lang.Object

Repository is a data source for storing all the Power Center objects. This is the top-level object and contains folders which in turn contains mappings.


Constructor Summary
Repository()
          Default Constructor
Repository(java.lang.String name, java.lang.String busName, java.lang.String desc)
          Constructor with all the values passed in
 
Method Summary
 void addFolder(Folder folderObj)
          Add a folder object to the repository
 void createConnection(ConnectionObject connObj)
          This function creates a new connection defined the ConnectionObject passed to it.
 void deleteConnection(java.lang.String connectionType, java.lang.String connectionName)
          This function deletes the connection with the specified name.
 java.lang.String getBusinessName()
          Method to get the business name
 java.util.Vector getConnectionObjects()
          To retrieve ConnectionObjects in the current repository
 java.util.Vector getConnectionObjects(NameFilter filter)
           
 java.util.Vector getConnectionObjects(java.lang.String strConnType)
           
 java.util.Vector getConnectionObjects(java.lang.String strConnType, NameFilter filter)
           
 java.lang.String getDescription()
          Method to return the description
 java.util.Vector getFolder()
          Returns the vector of Folder objects from the repository.
 java.util.Vector getFolder(NameFilter objFilter)
          Returns the vector of Folder objects from the repository.
 java.util.Vector getModifiedFolders()
          Returns the vector of Folder objects from the repository.
 java.lang.String getName()
          Method to get the name
 RepoProperties getProperties()
          Return the Repository properties
 RepositoryConnectionManager getRepositoryConnectionManager()
          Returns the RepositoryConnectionManager that has been set for this repository.
 void importModifiedObjectsToFolder(MapFwkOutputContext context, java.lang.String folderName)
          Save and import all folders that have been modified into the folder specified by folderName in the repository
 void removeFolder(Folder folderObj)
          Remove a folder object from the repository
 void retrieveRepo(MapFwkRetrieveContext retrieveCnxt)
          method used to retrieve the objects from powercenter repository
 void runWorkflow(java.lang.String workflowName)
          Run the workflow
 void save(MapFwkOutputContext context, boolean doImport)
          Saves the repository object
 void saveAndImportModifiedFolders(MapFwkOutputContext context)
          Save and import all modified folders into the repository.
 void setBusinessName(java.lang.String busName)
          Method to set the business name
 void setConnectionObjects(java.util.Vector vConnObjs)
           
 void setDescription(java.lang.String desc)
          Method to set the description
 void setName(java.lang.String name)
          Method to set the name
 void setProperties(RepoProperties props)
          Set the Repository Properties
 void setRepositoryConnectionManager(RepositoryConnectionManager mgr)
          used to set the repository connection manager for repository this is set to a CachedRepositoryConnectionManager
 void updateConnection(ConnectionObject connObj)
          This function updates the connection specified by the connection object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Repository

public Repository()
Default Constructor


Repository

public Repository(java.lang.String name,
                  java.lang.String busName,
                  java.lang.String desc)
Constructor with all the values passed in

Parameters:
name - name of the repository
busName - business name of the repository
desc - description of the repository
Method Detail

getRepositoryConnectionManager

public RepositoryConnectionManager getRepositoryConnectionManager()
Returns the RepositoryConnectionManager that has been set for this repository.

Returns:
RepositoryConnectionManager

getBusinessName

public java.lang.String getBusinessName()
Method to get the business name

Returns:
Returns the business name

setBusinessName

public void setBusinessName(java.lang.String busName)
Method to set the business name

Parameters:
busName - The business name to set.

getDescription

public java.lang.String getDescription()
Method to return the description

Returns:
Returns the description.

setDescription

public void setDescription(java.lang.String desc)
Method to set the description

Parameters:
desc - The description to set.

getName

public java.lang.String getName()
Method to get the name

Returns:
Returns the m_strName.

setName

public void setName(java.lang.String name)
Method to set the name

Parameters:
name - name to set.
Throws:
MapFwkOutputException - Exception

save

public void save(MapFwkOutputContext context,
                 boolean doImport)
          throws MapFwkOutputException
Saves the repository object

Parameters:
context - output context object
Throws:
MapFwkOutputException

importModifiedObjectsToFolder

public void importModifiedObjectsToFolder(MapFwkOutputContext context,
                                          java.lang.String folderName)
                                   throws MapFwkOutputException
Save and import all folders that have been modified into the folder specified by folderName in the repository

Parameters:
context - output context object
folderName - Name of the target folder to which objects should be saved to.
Throws:
MapFwkOutputException

saveAndImportModifiedFolders

public void saveAndImportModifiedFolders(MapFwkOutputContext context)
                                  throws MapFwkOutputException
Save and import all modified folders into the repository. The folder name is used to deciede which target folder should be used while importing. For e.g, if two folders, folder_1 and folder_2 have been modified, then the changes in folder_1 would be saved to the folder "folder_1" and changes in folder_2 would be saved to the folder "folder_2"

Parameters:
context - output context object
Throws:
MapFwkOutputException

addFolder

public void addFolder(Folder folderObj)
Add a folder object to the repository

Parameters:
folderObj - folder object

removeFolder

public void removeFolder(Folder folderObj)
Remove a folder object from the repository

Parameters:
folderObj - folder object

getFolder

public java.util.Vector getFolder()
Returns the vector of Folder objects from the repository. This will include all folders that have been added to the repository object as well as folders retrieved from the repository.

Returns:
Vector Returns the vector of Folder objects

getFolder

public java.util.Vector getFolder(NameFilter objFilter)
                           throws com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionFailedException
Returns the vector of Folder objects from the repository. This will include all folders that have been added to the repository object as well as folders retrieved from the repository that satisfy the filter condition.

Returns:
Vector Returns the vector of Folder objects
Throws:
com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionFailedException

getModifiedFolders

public java.util.Vector getModifiedFolders()
Returns the vector of Folder objects from the repository. This included all folder objects that have been added to the repository object and all folders that have been modified in the CacheRepositoryConnectionManager(if set). The user has to explicitly set an object as modified using the Mapping.setModified(boolean), Workflow.setModified(boolean), Session.setModified(boolean) for it to be picked up.

Returns:
Vector Returns the vector of Folder objects that have been modified.

getProperties

public RepoProperties getProperties()
Return the Repository properties

Returns:
RepoProperties

setProperties

public void setProperties(RepoProperties props)
Set the Repository Properties

Parameters:
props -

runWorkflow

public void runWorkflow(java.lang.String workflowName)
Run the workflow

Parameters:
workflowName -

retrieveRepo

public void retrieveRepo(MapFwkRetrieveContext retrieveCnxt)
                  throws com.informatica.powercenter.sdk.mapfwk.exceptions.MapFwkReaderException,
                         com.informatica.powercenter.sdk.mapfwk.exceptions.UnsupportedTransformationException,
                         com.informatica.powercenter.sdk.mapfwk.exceptions.UnsupportedSourceException,
                         com.informatica.powercenter.sdk.mapfwk.exceptions.UnsupportedTargetException
method used to retrieve the objects from powercenter repository

Parameters:
retrieveCnxt -
Throws:
com.informatica.powercenter.sdk.mapfwk.exceptions.MapFwkReaderException
com.informatica.powercenter.sdk.mapfwk.exceptions.UnsupportedTransformationException
com.informatica.powercenter.sdk.mapfwk.exceptions.UnsupportedSourceException
com.informatica.powercenter.sdk.mapfwk.exceptions.UnsupportedTargetException

setRepositoryConnectionManager

public void setRepositoryConnectionManager(RepositoryConnectionManager mgr)
used to set the repository connection manager for repository this is set to a CachedRepositoryConnectionManager

Parameters:
mgr -

getConnectionObjects

public java.util.Vector getConnectionObjects()
                                      throws com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionFailedException
To retrieve ConnectionObjects in the current repository

Returns:
Vector containing ConnectionObjects
Throws:
com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionFailedException

getConnectionObjects

public java.util.Vector getConnectionObjects(NameFilter filter)
                                      throws com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionFailedException
Parameters:
filter -
Returns:
List of Connection Objects in the current repository matching the filter
Throws:
com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionFailedException

getConnectionObjects

public java.util.Vector getConnectionObjects(java.lang.String strConnType)
                                      throws com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionFailedException
Parameters:
strConnType -
Returns:
list of connection objects of particular type
Throws:
com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionFailedException

getConnectionObjects

public java.util.Vector getConnectionObjects(java.lang.String strConnType,
                                             NameFilter filter)
                                      throws com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionFailedException
Parameters:
strConnType -
filter -
Returns:
list of connection objects of particular type matching the filter
Throws:
com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionFailedException

setConnectionObjects

public void setConnectionObjects(java.util.Vector vConnObjs)
Parameters:
vConnObjs -

createConnection

public void createConnection(ConnectionObject connObj)
                      throws com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionAlreadyExistsException,
                             com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionFailedException,
                             com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionCreationFailedException
This function creates a new connection defined the ConnectionObject passed to it. The connection attributes of the ConnectionObject has to be set with the attributes required to create the specified connection This doesnot wait for the Repository.save() to be invoked before executing. A connection is created as soon as the function call is made.

Parameters:
connObj -
Throws:
com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionAlreadyExistsException
com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionFailedException
com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionCreationFailedException

deleteConnection

public void deleteConnection(java.lang.String connectionType,
                             java.lang.String connectionName)
                      throws com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionFailedException,
                             com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionDoesNotExistException,
                             com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionDeletionFailedException
This function deletes the connection with the specified name. As of now, support for deletion of only relational databases have been provided. This doesnot wait for the Repository.save() to be invoked before executing. A connection is deleted as soon as the function call is made.

Parameters:
connectionType - The type of connection to be deleted. Only relational database connections can be deleted as of now.
connectionName - The name of the connection to be deleted.
Throws:
com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionFailedException
com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionDoesNotExistException
com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionDeletionFailedException

updateConnection

public void updateConnection(ConnectionObject connObj)
                      throws com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionUpdateFailedException,
                             com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionFailedException
This function updates the connection specified by the connection object. The connection name, connection type(application, relational etc), and the connection subType(Oracle, sybase etc) are used to uniquely identify which connection to update. The connection properties in the connection object should contain only those properties that are to be updated. This doesnot wait for the Repository.save() to be invoked before executing. The connection is updated as soon as the function call is made.

Parameters:
connObj -
Throws:
com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionUpdateFailedException
com.informatica.powercenter.sdk.mapfwk.exceptions.ConnectionFailedException