Class CachingPentahoMetadataDomainRepository
java.lang.Object
org.pentaho.platform.plugin.services.metadata.PentahoMetadataDomainRepository
org.pentaho.platform.plugin.services.metadata.CachingPentahoMetadataDomainRepository
- All Implemented Interfaces:
org.pentaho.metadata.repository.IMetadataDomainRepository
,IAclAwarePentahoMetadataDomainRepositoryImporter
,IDataSourceAwareMetadataDomainRepository
,IModelAnnotationsAwareMetadataDomainRepositoryImporter
,IPentahoMetadataDomainRepositoryExporter
,IPentahoMetadataDomainRepositoryImporter
Class Description
- Author:
- David M. Kincade
-
Field Summary
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
Fields inherited from interface org.pentaho.platform.plugin.services.metadata.IModelAnnotationsAwareMetadataDomainRepositoryImporter
ANNOTATIONS_FILE_ID_POSTFIX, PROPERTY_NAME_ANNOTATIONS
-
Constructor Summary
ConstructorDescriptionCachingPentahoMetadataDomainRepository
(org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository) CachingPentahoMetadataDomainRepository
(org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository, org.pentaho.platform.repository2.unified.RepositoryUtils repositoryUtils, org.pentaho.metadata.util.XmiParser xmiParser, org.pentaho.metadata.util.LocalizationUtil localizationUtil) -
Method Summary
Modifier and TypeMethodDescriptionvoid
flush the domains from memoryorg.pentaho.metadata.model.Domain
retrieve a domain from the repo.Returns a list of all the domain ids in the repository.void
reload domains from diskvoid
storeDomain
(org.pentaho.metadata.model.Domain domain, boolean overwrite) Store a domain to the repository.Methods inherited from class org.pentaho.platform.plugin.services.metadata.PentahoMetadataDomainRepository
addDataSourceType, addLocalizationFile, addLocalizationFile, createOrUpdateAnnotationsXml, createUniqueFile, createUniqueFile, endsWithXmi, generateRowLevelSecurityConstraint, getAclFor, getAclHelper, getAnnotationsXmlFile, getDataSourceWizardDomainIds, getDomainFilesData, getDomainIdFromXmi, getFileMetadataHelper, getLocalizationUtil, getLogger, getMetadataDir, getMetadataDomainIds, getMetadataRepositoryFile, getRepository, getRepositoryUtils, getXmiParser, hasAccess, hasAccessFor, isDomainIdXmiEqualsOrNotPresent, loadAnnotationsXml, loadLocaleStrings, loadProperties, noXmi, removeDomain, removeModel, replaceDomainId, resolveAnnotationsFilePath, setAclFor, setLocalizationUtil, setRepository, setRepositoryUtils, setXmiParser, storeAnnotationsXml, storeDomain, storeDomain, toString, updateFile
-
Constructor Details
-
CachingPentahoMetadataDomainRepository
public CachingPentahoMetadataDomainRepository(org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository) - Parameters:
repository
-
-
CachingPentahoMetadataDomainRepository
public CachingPentahoMetadataDomainRepository(org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository, org.pentaho.platform.repository2.unified.RepositoryUtils repositoryUtils, org.pentaho.metadata.util.XmiParser xmiParser, org.pentaho.metadata.util.LocalizationUtil localizationUtil) - Parameters:
repository
-repositoryUtils
-xmiParser
-localizationUtil
-
-
-
Method Details
-
storeDomain
public void storeDomain(org.pentaho.metadata.model.Domain domain, boolean overwrite) throws org.pentaho.metadata.repository.DomainIdNullException, org.pentaho.metadata.repository.DomainAlreadyExistsException, org.pentaho.metadata.repository.DomainStorageException Store a domain to the repository. The domain should persist between JVM restarts.- Specified by:
storeDomain
in interfaceorg.pentaho.metadata.repository.IMetadataDomainRepository
- Overrides:
storeDomain
in classPentahoMetadataDomainRepository
- Parameters:
domain
- domain object to storeoverwrite
- if true, overwrite existing domain- Throws:
org.pentaho.metadata.repository.DomainIdNullException
- if domain id is nullorg.pentaho.metadata.repository.DomainAlreadyExistsException
- if domain exists and overwrite = falseorg.pentaho.metadata.repository.DomainStorageException
- if there is a problem storing the domain
-
getDomain
retrieve a domain from the repo. This does lazy loading of the repo, so it calls reloadDomains() if not already loaded.- Specified by:
getDomain
in interfaceorg.pentaho.metadata.repository.IMetadataDomainRepository
- Overrides:
getDomain
in classPentahoMetadataDomainRepository
- Parameters:
domainId
- domain to get from the repository- Returns:
- domain object
-
getDomainIds
Returns a list of all the domain ids in the repository.- Specified by:
getDomainIds
in interfaceorg.pentaho.metadata.repository.IMetadataDomainRepository
- Overrides:
getDomainIds
in classPentahoMetadataDomainRepository
- Returns:
- the domain Ids.
-
reloadDomains
public void reloadDomains()reload domains from disk- Specified by:
reloadDomains
in interfaceorg.pentaho.metadata.repository.IMetadataDomainRepository
- Overrides:
reloadDomains
in classPentahoMetadataDomainRepository
-
flushDomains
public void flushDomains()flush the domains from memory- Specified by:
flushDomains
in interfaceorg.pentaho.metadata.repository.IMetadataDomainRepository
- Overrides:
flushDomains
in classPentahoMetadataDomainRepository
-