Exemplo n.º 1
0
 public MicroPlatform.RepositoryModule getRepositoryModule() {
   if (repositoryModule != null) {
     return repositoryModule;
   }
   define(
       "RepositoryModule",
       "org.pentaho.platform.repository2.unified.JcrRepositoryModule",
       Scope.GLOBAL);
   RepositoryModule module = PentahoSystem.get(RepositoryModule.class);
   if (module == null) {
     throw new IllegalStateException(
         "In order to use the RepositoryModule, you must include pentaho-bi-platform-repository.jar in your classpath");
   }
   module.setOwner(this);
   this.repositoryModule = module;
   return module;
 }
 @Override
 public String getSiteClassName(List<ContextEntry> ces, UserRequest ureq) {
   if (repositoryModule.isCatalogSiteEnabled()) {
     return CatalogSite.class.getName();
   } else {
     return RepositorySite.class.getName();
   }
 }
 @Override
 public boolean validateContextEntryAndShowError(
     ContextEntry ce, UserRequest ureq, WindowControl wControl) {
   return repositoryModule.isCatalogEnabled();
 }