org.pentaho.platform.plugin.services.metadata
Class MetadataDomainRepositoryTestWrapper

java.lang.Object
  extended by org.pentaho.metadata.repository.FileBasedMetadataDomainRepository
      extended by org.pentaho.platform.plugin.services.metadata.MetadataDomainRepository
          extended by org.pentaho.platform.plugin.services.metadata.MetadataDomainRepositoryTestWrapper
All Implemented Interfaces:
org.pentaho.metadata.repository.IMetadataDomainRepository

public class MetadataDomainRepositoryTestWrapper
extends MetadataDomainRepository

Provides a means of exposing methods needed for unit tests.


Field Summary
 
Fields inherited from class org.pentaho.platform.plugin.services.metadata.MetadataDomainRepository
ACCESS_TYPE_MAP, PROPERTIES_FILE_EXTENSION
 
Fields inherited from interface org.pentaho.metadata.repository.IMetadataDomainRepository
ACCESS_TYPE_ADMIN, ACCESS_TYPE_DELETE, ACCESS_TYPE_READ, ACCESS_TYPE_SCHEMA_ADMIN, ACCESS_TYPE_UPDATE, ACCESS_TYPE_WRITE
 
Constructor Summary
MetadataDomainRepositoryTestWrapper()
           
 
Method Summary
 String getLocaleFromPropertyFilename(String filename, String prefix)
          Returns the localization portion of the passed fileName.
 ISolutionFile[] getLocalePropertyFiles(String resourceName)
          Returns a list of ISolutionFiles.
 void importLocalizations(org.pentaho.metadata.model.Domain domain, String resourceName)
          Imports the localizations for the passed resourceName into the domain.
 
Methods inherited from class org.pentaho.platform.plugin.services.metadata.MetadataDomainRepository
getDomain, getDomainIds, getSession, reloadDomains, removeDomain, storeDomain
 
Methods inherited from class org.pentaho.metadata.repository.FileBasedMetadataDomainRepository
flushDomains, generateRowLevelSecurityConstraint, hasAccess, removeModel, setDomainFolder
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataDomainRepositoryTestWrapper

public MetadataDomainRepositoryTestWrapper()
Method Detail

getLocalePropertyFiles

public ISolutionFile[] getLocalePropertyFiles(String resourceName)
                                       throws org.pentaho.metadata.repository.DomainStorageException
Description copied from class: MetadataDomainRepository
Returns a list of ISolutionFiles. These files are the property files that are associated with the passed resource name

Parameters:
resourceName - The name of the resource that has associated property files
Returns:
SolutionFile[] Collection of associated property files.
Throws:
org.pentaho.metadata.repository.DomainStorageException

getLocaleFromPropertyFilename

public String getLocaleFromPropertyFilename(String filename,
                                            String prefix)
                                     throws org.pentaho.metadata.repository.DomainStorageException
Description copied from class: MetadataDomainRepository
Returns the localization portion of the passed fileName.

Returns:
String example: EN_US
Throws:
org.pentaho.metadata.repository.DomainStorageException

importLocalizations

public void importLocalizations(org.pentaho.metadata.model.Domain domain,
                                String resourceName)
                         throws org.pentaho.metadata.repository.DomainStorageException
Description copied from class: MetadataDomainRepository
Imports the localizations for the passed resourceName into the domain. the property files should be located in the same folder as resourceName following this naming pattern. If resourceName = "bi-developers/resources/metadata.xmi" then a United States English property file for it would be "bi-developers/resources/metadata_en_US.properties Both file names share the string "metadata".

Throws:
org.pentaho.metadata.repository.DomainStorageException