public class PentahoMetadataDomainRepository extends Object implements org.pentaho.metadata.repository.IMetadataDomainRepository, IModelAnnotationsAwareMetadataDomainRepositoryImporter, IAclAwarePentahoMetadataDomainRepositoryImporter, IPentahoMetadataDomainRepositoryExporter
PentahoMetadataDomainRepositoryInfo) as the storage location for the
Domain files and associated locale files. Since Domain IDs are the unique identifier for Pentaho Metadata
domains and may contain any character (including repository folder separator character(s) like '/', a UUID
will be created to store each file. The metadata for the file will be used to store the information (such as the
Domain ID). ACCESS_TYPE_ADMIN, ACCESS_TYPE_DELETE, ACCESS_TYPE_READ, ACCESS_TYPE_SCHEMA_ADMIN, ACCESS_TYPE_UPDATE, ACCESS_TYPE_WRITEANNOTATIONS_FILE_ID_POSTFIX, PROPERTY_NAME_ANNOTATIONS| Constructor and Description |
|---|
PentahoMetadataDomainRepository(org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository)
Creates an instance of this class providing the
IUnifiedRepository repository backend. |
| Modifier and Type | Method and Description |
|---|---|
void |
addLocalizationFile(String domainId,
String locale,
InputStream inputStream,
boolean overwrite) |
void |
addLocalizationFile(String domainId,
String locale,
Properties properties)
Adds a set of properties as a locale properties file for the specified Domain ID
|
void |
createOrUpdateAnnotationsXml(org.pentaho.platform.api.repository2.unified.RepositoryFile domainFile,
org.pentaho.platform.api.repository2.unified.RepositoryFile annotationsFile,
String annotationsXml) |
void |
flushDomains()
flush the domains from memory
|
String |
generateRowLevelSecurityConstraint(org.pentaho.metadata.model.LogicalModel model) |
org.pentaho.platform.api.repository2.unified.RepositoryFileAcl |
getAclFor(String domainId) |
org.pentaho.platform.api.repository2.unified.RepositoryFile |
getAnnotationsXmlFile(org.pentaho.platform.api.repository2.unified.RepositoryFile domainFile) |
org.pentaho.metadata.model.Domain |
getDomain(String domainId)
retrieve a domain from the repo.
|
Map<String,InputStream> |
getDomainFilesData(String domainId) |
Set<String> |
getDomainIds()
return a list of all the domain ids in the repository.
|
boolean |
hasAccess(int accessType,
org.pentaho.metadata.model.concept.IConcept aclHolder)
The aclHolder cannot be null unless the access type requested is ACCESS_TYPE_SCHEMA_ADMIN.
|
boolean |
hasAccessFor(String domainId) |
String |
loadAnnotationsXml(String domainId) |
void |
reloadDomains()
reload domains from disk
|
void |
removeDomain(String domainId)
remove a domain from disk and memory.
|
void |
removeModel(String domainId,
String modelId)
remove a model from a domain which is stored either on a disk or memory.
|
void |
setAclFor(String domainId,
org.pentaho.platform.api.repository2.unified.RepositoryFileAcl acl) |
void |
storeAnnotationsXml(String domainId,
String annotationsXml) |
void |
storeDomain(org.pentaho.metadata.model.Domain domain,
boolean overwrite)
Store a domain to the repository.
|
void |
storeDomain(InputStream inputStream,
String domainId,
boolean overwrite)
Stores a domain to the repository directly as an Input Stream
|
void |
storeDomain(InputStream inputStream,
String domainId,
boolean overwrite,
org.pentaho.platform.api.repository2.unified.RepositoryFileAcl acl) |
public PentahoMetadataDomainRepository(org.pentaho.platform.api.repository2.unified.IUnifiedRepository repository)
IUnifiedRepository repository backend.repository - the IUnifiedRepository in which data will be stored / retrievedpublic 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
storeDomain in interface org.pentaho.metadata.repository.IMetadataDomainRepositorydomain - domain object to storeoverwrite - if true, overwrite existing domainorg.pentaho.metadata.repository.DomainIdNullException - if domain id is null or emptyorg.pentaho.metadata.repository.DomainAlreadyExistsException - if a domain with the same Domain ID already exists in the repository and
overwrite == falseorg.pentaho.metadata.repository.DomainStorageException - if there is a problem storing the domainpublic void storeDomain(InputStream inputStream, String domainId, boolean overwrite) throws org.pentaho.metadata.repository.DomainIdNullException, org.pentaho.metadata.repository.DomainAlreadyExistsException, org.pentaho.metadata.repository.DomainStorageException
storeDomain in interface IPentahoMetadataDomainRepositoryImporterinputStream - domainId - overwrite - org.pentaho.metadata.repository.DomainIdNullExceptionorg.pentaho.metadata.repository.DomainAlreadyExistsExceptionorg.pentaho.metadata.repository.DomainStorageExceptionpublic void storeDomain(InputStream inputStream, String domainId, boolean overwrite, org.pentaho.platform.api.repository2.unified.RepositoryFileAcl acl) throws org.pentaho.metadata.repository.DomainIdNullException, org.pentaho.metadata.repository.DomainAlreadyExistsException, org.pentaho.metadata.repository.DomainStorageException
storeDomain in interface IAclAwarePentahoMetadataDomainRepositoryImporterorg.pentaho.metadata.repository.DomainIdNullExceptionorg.pentaho.metadata.repository.DomainAlreadyExistsExceptionorg.pentaho.metadata.repository.DomainStorageExceptionpublic void setAclFor(String domainId, org.pentaho.platform.api.repository2.unified.RepositoryFileAcl acl)
setAclFor in interface IAclAwarePentahoMetadataDomainRepositoryImporterpublic org.pentaho.platform.api.repository2.unified.RepositoryFileAcl getAclFor(String domainId)
getAclFor in interface IAclAwarePentahoMetadataDomainRepositoryImporterpublic boolean hasAccessFor(String domainId)
hasAccessFor in interface IAclAwarePentahoMetadataDomainRepositoryImporterpublic Map<String,InputStream> getDomainFilesData(String domainId)
getDomainFilesData in interface IPentahoMetadataDomainRepositoryExporterpublic org.pentaho.metadata.model.Domain getDomain(String domainId)
getDomain in interface org.pentaho.metadata.repository.IMetadataDomainRepositorydomainId - domain to get from the repositorypublic Set<String> getDomainIds()
getDomainIds in interface org.pentaho.metadata.repository.IMetadataDomainRepositorypublic void removeDomain(String domainId)
removeDomain in interface org.pentaho.metadata.repository.IMetadataDomainRepositoryremoveDomain in interface IPentahoMetadataDomainRepositoryImporterdomainId - public void removeModel(String domainId, String modelId) throws org.pentaho.metadata.repository.DomainIdNullException, org.pentaho.metadata.repository.DomainStorageException
removeModel in interface org.pentaho.metadata.repository.IMetadataDomainRepositorydomainId - modelId - org.pentaho.metadata.repository.DomainIdNullExceptionorg.pentaho.metadata.repository.DomainStorageExceptionpublic void reloadDomains()
reloadDomains in interface org.pentaho.metadata.repository.IMetadataDomainRepositorypublic void flushDomains()
flushDomains in interface org.pentaho.metadata.repository.IMetadataDomainRepositorypublic String generateRowLevelSecurityConstraint(org.pentaho.metadata.model.LogicalModel model)
generateRowLevelSecurityConstraint in interface org.pentaho.metadata.repository.IMetadataDomainRepositorypublic boolean hasAccess(int accessType,
org.pentaho.metadata.model.concept.IConcept aclHolder)
hasAccess in interface org.pentaho.metadata.repository.IMetadataDomainRepositorypublic void addLocalizationFile(String domainId, String locale, Properties properties) throws org.pentaho.metadata.repository.DomainStorageException
domainId - the domain ID for which this properties file will be addedlocale - the locale for which this properties file will be addedproperties - the properties to be addedorg.pentaho.metadata.repository.DomainStorageExceptionpublic void addLocalizationFile(String domainId, String locale, InputStream inputStream, boolean overwrite) throws org.pentaho.metadata.repository.DomainStorageException
addLocalizationFile in interface IPentahoMetadataDomainRepositoryImporterorg.pentaho.metadata.repository.DomainStorageExceptionpublic String loadAnnotationsXml(String domainId)
loadAnnotationsXml in interface IModelAnnotationsAwareMetadataDomainRepositoryImporterpublic void storeAnnotationsXml(String domainId, String annotationsXml)
storeAnnotationsXml in interface IModelAnnotationsAwareMetadataDomainRepositoryImporterpublic org.pentaho.platform.api.repository2.unified.RepositoryFile getAnnotationsXmlFile(org.pentaho.platform.api.repository2.unified.RepositoryFile domainFile)
public void createOrUpdateAnnotationsXml(org.pentaho.platform.api.repository2.unified.RepositoryFile domainFile,
org.pentaho.platform.api.repository2.unified.RepositoryFile annotationsFile,
String annotationsXml)