Examples of RepositoryManager


Examples of org.olat.repository.RepositoryManager

    }
    String cmd = event.getCommand();
    if (source == groupEditController) {
      if(event instanceof IdentitiesAddEvent ) { //FIXME:chg: Move into seperate RepositoryOwnerGroupController like BusinessGroupEditController ?
        IdentitiesAddEvent identitiesAddedEvent = (IdentitiesAddEvent) event;
        RepositoryManager rm = RepositoryManager.getInstance();
        //add to group and also adds identities really added to the event.
        //this is then later used by the GroupController to determine if the
        //model should be updated or not.
        rm.addOwners(ureq.getIdentity(),identitiesAddedEvent,repositoryEntry);
      } else if (event instanceof IdentitiesRemoveEvent) {
        IdentitiesRemoveEvent identitiesRemoveEvent = (IdentitiesRemoveEvent) event;
        RepositoryManager rm = RepositoryManager.getInstance();
        rm.removeOwners(ureq.getIdentity(),identitiesRemoveEvent.getRemovedIdentities(), repositoryEntry);
      }
      updateView(ureq);
    } else if (source == detailsToolC) {
      if (cmd.equals(ACTION_DOWNLOAD)) { // download
        doDownload(ureq);
View Full Code Here

Examples of org.olat.repository.RepositoryManager

   * Implementation normal search: find repo entries that are public
   * using the values from the form
   * @param ureq
   */
  private void doSearch(UserRequest ureq) {
    RepositoryManager rm = RepositoryManager.getInstance();
    Set s = searchForm.getRestrictedTypes();
    List restrictedTypes = (s == null) ? null : new ArrayList(s);
    List entries = rm.genericANDQueryWithRolesRestriction(searchForm.getDisplayName(), searchForm.getAuthor(),
      searchForm.getDescription(), restrictedTypes, ureq.getUserSession().getRoles(), ureq.getIdentity().getUser().getProperty(UserConstants.INSTITUTIONALNAME, null));
    repoTableModel.setEntries(entries);
    tableCtr.modelChanged();
    displaySearchResults(ureq);
  }
View Full Code Here

Examples of org.olat.repository.RepositoryManager

   * Implementation of referencable search: find repo entries that are
   * owned by the uer or set to referencable and have at lease BA settings
   * @param ureq
   */
  private void doSearchAllReferencables(UserRequest ureq) {
    RepositoryManager rm = RepositoryManager.getInstance();
    Set s = searchForm.getRestrictedTypes();
    List restrictedTypes = (s == null) ? null : new ArrayList(s);
    Roles roles = ureq.getUserSession().getRoles();
    Identity ident = ureq.getIdentity();
    String name = searchForm.getDisplayName();
    String author = searchForm.getAuthor();
    String desc = searchForm.getDescription();
   
    List entries = rm.queryReferencableResourcesLimitType(ident, roles, restrictedTypes, name, author, desc);
    repoTableModel.setEntries(entries);
    tableCtr.modelChanged();
    displaySearchResults(ureq);
  }
View Full Code Here

Examples of org.olat.repository.RepositoryManager

  public void doSearchForReferencableResourcesLimitType(Identity owner, String limitType, Roles roles) {
    doSearchForReferencableResourcesLimitType(owner, limitType.equals("")?null:new String[] {limitType}, roles);
  }

  public void doSearchForReferencableResourcesLimitType(Identity owner, String[] limitTypes, Roles roles) {
    RepositoryManager rm = RepositoryManager.getInstance();
    List<String> restrictedTypes = new ArrayList<String>();
    if(limitTypes == null) {
      restrictedTypes = null;
    }
    else {
      restrictedTypes.addAll(Arrays.asList(limitTypes));
    }
    List entries = rm.queryReferencableResourcesLimitType(owner, roles, restrictedTypes, null, null, null);
   
    repoTableModel.setEntries(entries);
    tableCtr.modelChanged();
    displaySearchResults(null);
  }
View Full Code Here

Examples of org.olat.repository.RepositoryManager

  public void doSearchByOwnerLimitType(Identity owner, String limitType) {
    doSearchByOwnerLimitType(owner,new String[]{limitType});
  }
 
  public void doSearchByOwnerLimitType(Identity owner, String[] limitTypes) {
    RepositoryManager rm = RepositoryManager.getInstance();
    List entries = rm.queryByOwner(owner, limitTypes);
    repoTableModel.setEntries(entries);
    tableCtr.modelChanged();
    displaySearchResults(null);
  }
View Full Code Here

Examples of org.olat.repository.RepositoryManager

   * Do search for all resources of a given type where identity is owner.
   * @param owner
   * @param access
   */
  public void doSearchByOwnerLimitAccess(Identity owner, int access) {
    RepositoryManager rm = RepositoryManager.getInstance();
    List entries = rm.queryByOwnerLimitAccess(owner, access);
   
    repoTableModel.setEntries(entries);
    tableCtr.modelChanged();
    displaySearchResults(null);
  }
View Full Code Here

Examples of org.olat.repository.RepositoryManager

   *
   * @param type
   * @param ureq
   */
  void doSearchByTypeLimitAccess(String type, UserRequest ureq) {
    RepositoryManager rm = RepositoryManager.getInstance();
    List entries = rm.queryByTypeLimitAccess(type, ureq);
    repoTableModel.setEntries(entries);
    tableCtr.modelChanged();
    displaySearchResults(ureq);
  }
View Full Code Here

Examples of org.olat.repository.RepositoryManager

    tableCtr.modelChanged();
    displaySearchResults(ureq);
  }

  private void doSearchById(int id) {
    RepositoryManager rm = RepositoryManager.getInstance();
    RepositoryEntry entry = rm.lookupRepositoryEntry(new Long(id));
    List<RepositoryEntry> entries = new ArrayList<RepositoryEntry>(1);
    if (entry != null) entries.add(entry);
    repoTableModel.setEntries(entries);
    tableCtr.modelChanged();
    displaySearchResults(null);
View Full Code Here

Examples of org.olat.repository.RepositoryManager

    tableCtr.modelChanged();
    displaySearchResults(null);
  }

  protected void doSearchMyCoursesStudent(UserRequest ureq){
    RepositoryManager rm = RepositoryManager.getInstance();
    List<RepositoryEntry> entries = rm.getLearningResourcesAsStudent(ureq.getIdentity());
    repoTableModel.setEntries(entries);
    tableCtr.modelChanged();
    displaySearchResults(ureq);
  }
View Full Code Here

Examples of org.olat.repository.RepositoryManager

    tableCtr.modelChanged();
    displaySearchResults(ureq);
  }
 
  protected void doSearchMyCoursesTeacher(UserRequest ureq){
    RepositoryManager rm = RepositoryManager.getInstance();
    List<RepositoryEntry> entries = rm.getLearningResourcesAsTeacher(ureq.getIdentity());
    repoTableModel.setEntries(entries);
    tableCtr.modelChanged();
    displaySearchResults(ureq);
  }
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.