Examples of RepositoryManager


Examples of org.apache.jackrabbit.api.management.RepositoryManager

        JackrabbitRepositoryFactory rf = new RepositoryFactoryImpl();
        Properties prop = new Properties();
        prop.setProperty("org.apache.jackrabbit.repository.home", TEST_DIR);
        prop.setProperty("org.apache.jackrabbit.repository.conf", TEST_DIR + "/repository.xml");
        JackrabbitRepository rep = (JackrabbitRepository) rf.getRepository(prop);
        RepositoryManager rm = rf.getRepositoryManager(rep);

        // need to login to start the repository
        Session session = rep.login(new SimpleCredentials("", "".toCharArray()));

        DataStoreGarbageCollector gc = rm.createDataStoreGarbageCollector();
        try {
            gc.mark();
            gc.sweep();
        } finally {
            gc.close();
        }

        session.logout();
        rm.stop();
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.management.RepositoryManager

        // Register observer last to prevent sending events while initialising
        for (Observer observer : observers) {
            registerObserver(whiteboard, observer);
        }

        RepositoryManager repositoryManager = new RepositoryManager(whiteboard);
        registerMBean(whiteboard, RepositoryManagementMBean.class, repositoryManager,
                RepositoryManagementMBean.TYPE, repositoryManager.getName());

        return new ContentRepositoryImpl(
                store,
                CompositeHook.compose(commitHooks),
                defaultWorkspaceName,
View Full Code Here

Examples of org.apache.oodt.cas.filemgr.repository.RepositoryManager

                .getDataTransferServiceFromFactory(dataTransferServiceFactory);
        assertNotNull(transferer);
    }

    public void testGetRepositoryManagerServiceFromFactory() {
        RepositoryManager repMgr = GenericFileManagerObjectFactory
                .getRepositoryManagerServiceFromFactory(repositoryServiceFactory);
        assertNotNull(repMgr);

    }
View Full Code Here

Examples of org.lilyproject.repository.api.RepositoryManager

    private AvroLilyImpl avroLilyImpl;
    private final static String repositoryName = "default";

    @Before
    public void setUp() throws IOException, InterruptedException, RepositoryException {
        RepositoryManager repositoryManager = mock(RepositoryManager.class);
        table = mock(LTable.class);
        Repository repository = mock(Repository.class);
        this.repository = repository;
        when(repository.getTable(Table.RECORD.name)).thenReturn(table);
        when(repositoryManager.getRepository(repositoryName)).thenReturn(repository);
        TypeManager typeManager = mock(TypeManager.class);
        avroConverter = mock(AvroConverter.class);
        avroLilyImpl = new AvroLilyImpl(repositoryManager, typeManager);
        avroLilyImpl.setAvroConverter(avroConverter);
    }
View Full Code Here

Examples of org.modeshape.jcr.api.RepositoryManager

        }
        final File backupDirectory = new File(path);

        Repository repository = (Repository)getRepositoryFromJndi("java:/jcr/sample");
        org.modeshape.jcr.api.Session session = repository.login();
        final RepositoryManager repoMgr = session.getWorkspace().getRepositoryManager();
        Problems problems = repoMgr.backupRepository(backupDirectory);
        if (problems.hasProblems()) {
            throw new IllegalStateException("Errors while backing up repository:" + problems.toString());
        }

        problems = session.getWorkspace().getRepositoryManager().restoreRepository(backupDirectory);
View Full Code Here

Examples of org.olat.repository.RepositoryManager

  private boolean hasAccess(Identity identity, String token, OLATResourceable feed) {
    boolean hasAccess = false;
    if (allowsGuestAccess(feed)) {
      hasAccess = true;
    } else if (identity != null) {
      RepositoryManager resMgr = RepositoryManager.getInstance();
      RepositoryEntry repoEntry = resMgr.lookupRepositoryEntry(feed, false);
      Roles roles = ManagerFactory.getManager().getRoles(identity);
      boolean isAllowedToLaunch = resMgr.isAllowedToLaunch(identity, roles, repoEntry);
      if (isAllowedToLaunch && validAuthentication(identity, token)) {
        hasAccess = true;
      }
    }
    return hasAccess;
View Full Code Here

Examples of org.olat.repository.RepositoryManager

   * @param feed
   * @return true if the feed allows guest access.
   */
  private boolean allowsGuestAccess(OLATResourceable res) {
    boolean guestsAllowed = false;
    RepositoryManager resMgr = RepositoryManager.getInstance();
    RepositoryEntry repoEntry = resMgr.lookupRepositoryEntry(res, false);
    if (repoEntry.getAccess() == RepositoryEntry.ACC_USERS_GUESTS) {
      guestsAllowed = true;
    }
    return guestsAllowed;
  }
View Full Code Here

Examples of org.olat.repository.RepositoryManager

   */
  public static RepositoryEntry getScormCPReference(ModuleConfiguration config, boolean strict) {
    if (config == null) throw new AssertException("missing config in CP");
    String repoSoftkey = (String) config.get(ScormEditController.CONFIG_KEY_REPOSITORY_SOFTKEY);
    if (repoSoftkey == null) throw new AssertException("invalid config when being asked for references");
    RepositoryManager rm = RepositoryManager.getInstance();
    RepositoryEntry entry = rm.lookupRepositoryEntryBySoftkey(repoSoftkey, strict);
    // entry can be null only if !strict
    return entry;
  }
View Full Code Here

Examples of org.olat.repository.RepositoryManager

   
    // grab any shared folder that is configured
    OlatRootFolderImpl sharedFolder = null;
    String sfSoftkey = getCourseConfig().getSharedFolderSoftkey();
    if (sfSoftkey != null) {
      RepositoryManager rm = RepositoryManager.getInstance();
      RepositoryEntry re = rm.lookupRepositoryEntryBySoftkey(sfSoftkey, false);
      if (re != null) {
        sharedFolder = SharedFolderManager.getInstance().getSharedFolder(re.getOlatResource());
        if (sharedFolder != null){
          sharedFolder.setLocalSecurityCallback(new ReadOnlyCallback());
          //add local course folder's children as read/write source and any sharedfolder as subfolder
View Full Code Here

Examples of org.olat.repository.RepositoryManager

    // export learning groups
    PersistingCourseGroupManager.getInstance(this).exportCourseLeaningGroups(fExportedDataDir);
    // export right groups
    PersistingCourseGroupManager.getInstance(this).exportCourseRightGroups(fExportedDataDir);
    // export repo metadata
    RepositoryManager rm = RepositoryManager.getInstance();
    RepositoryEntry myRE = rm.lookupRepositoryEntry(this, true);
    RepositoryEntryImportExport importExport = new RepositoryEntryImportExport(myRE, fExportedDataDir);
    importExport.exportDoExportProperties();
   
    //OLAT-5368: do intermediate commit to avoid transaction timeout
    // discussion intermediatecommit vs increased transaction timeout:
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.