it.eng.spagobi.tools.importexport
Class UserAssociationsKeeper

java.lang.Object
  extended by it.eng.spagobi.tools.importexport.UserAssociationsKeeper

public class UserAssociationsKeeper
extends java.lang.Object

Implements methods for recording the association of roles, engines, and data sources setted by the user. The association recorder can be exported into xml format


Constructor Summary
UserAssociationsKeeper()
          Defines the internal structure for recording associations.
 
Method Summary
 void fillFromXml(java.lang.String xmlStr)
          Fill the associations reading an xml string.
 java.lang.String getAssociatedDataSource(java.lang.String expDataSourceName)
          Gets the associated data source.
 java.lang.String getAssociatedEngine(java.lang.String expEngineLabel)
          Gets the associated engine.
 java.lang.String getAssociatedRole(java.lang.String expRoleName)
          Gets the associated role.
 void recordDataSourceAssociation(java.lang.String exportedDataSourceName, java.lang.String existingDataSourceName)
          Records an association between an exported data source and an existing one.
 void recordEngineAssociation(java.lang.String exportedEngineLabel, java.lang.String existingEngineLabel)
          Records an association between an exported engine and an existing one.
 void recordRoleAssociation(java.lang.String exportedRoleName, java.lang.String existingRolename)
          Records an association between an exported role and an existing one.
 java.lang.String toXml()
          Exports the associations as xml.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserAssociationsKeeper

public UserAssociationsKeeper()
Defines the internal structure for recording associations.

Method Detail

recordRoleAssociation

public void recordRoleAssociation(java.lang.String exportedRoleName,
                                  java.lang.String existingRolename)
Records an association between an exported role and an existing one.

Parameters:
exportedRoleName - the name of the exported role
existingRolename - the name of the existing role

recordEngineAssociation

public void recordEngineAssociation(java.lang.String exportedEngineLabel,
                                    java.lang.String existingEngineLabel)
Records an association between an exported engine and an existing one.

Parameters:
exportedEngineLabel - the label of the exported engine
existingEngineLabel - the label of the existing engine

recordDataSourceAssociation

public void recordDataSourceAssociation(java.lang.String exportedDataSourceName,
                                        java.lang.String existingDataSourceName)
Records an association between an exported data source and an existing one.

Parameters:
exportedDataSourceName - the name of the exported data source
existingDataSourceName - the name of the existing data source

toXml

public java.lang.String toXml()
Exports the associations as xml.

Returns:
the xml representation of the associations

fillFromXml

public void fillFromXml(java.lang.String xmlStr)
Fill the associations reading an xml string.

Parameters:
xmlStr - the xml string which defines the associations

getAssociatedRole

public java.lang.String getAssociatedRole(java.lang.String expRoleName)
Gets the associated role.

Parameters:
expRoleName - the exp role name
Returns:
the associated role

getAssociatedEngine

public java.lang.String getAssociatedEngine(java.lang.String expEngineLabel)
Gets the associated engine.

Parameters:
expEngineLabel - the exp engine label
Returns:
the associated engine

getAssociatedDataSource

public java.lang.String getAssociatedDataSource(java.lang.String expDataSourceName)
Gets the associated data source.

Parameters:
expDataSourceName - the exp data source name
Returns:
the associated data source