Package org.olat.resource.references

Examples of org.olat.resource.references.ReferenceManager


  /**
   * @see org.olat.repository.handlers.RepositoryHandler#readyToDelete(org.olat.core.id.OLATResourceable
   *      org.olat.core.gui.UserRequest, org.olat.core.gui.control.WindowControl)
   */
  public boolean readyToDelete(OLATResourceable res, UserRequest ureq, WindowControl wControl) {
    ReferenceManager refM = ReferenceManager.getInstance();
    String referencesSummary = refM.getReferencesToSummary(res, ureq.getLocale());
    if (referencesSummary != null) {
      Translator translator = new PackageTranslator(PACKAGE, ureq.getLocale());
      wControl.setError(translator.translate("details.delete.error.references", new String[] { referencesSummary }));
      return false;
    }
View Full Code Here


  /**
   * @see org.olat.repository.handlers.RepositoryHandler#readyToDelete(org.olat.core.id.OLATResourceable
   *      org.olat.core.gui.UserRequest, org.olat.core.gui.control.WindowControl)
   */
  public boolean readyToDelete(OLATResourceable res, UserRequest ureq, WindowControl wControl) {
    ReferenceManager refM = ReferenceManager.getInstance();
    String referencesSummary = refM.getReferencesToSummary(res, ureq.getLocale());
    if (referencesSummary != null) {
      Translator translator = new PackageTranslator(PACKAGE, ureq.getLocale());
      wControl.setError(translator.translate("details.delete.error.references", new String[] { referencesSummary }));
      return false;
    }
View Full Code Here

   * @see org.olat.repository.handlers.RepositoryHandler#readyToDelete(org.olat.core.id.OLATResourceable,
   *      org.olat.core.gui.UserRequest,
   *      org.olat.core.gui.control.WindowControl)
   */
  public boolean readyToDelete(OLATResourceable res, UserRequest ureq, WindowControl wControl) {
    ReferenceManager refM = ReferenceManager.getInstance();
    String referencesSummary = refM.getReferencesToSummary(res, ureq.getLocale());
    if (referencesSummary != null) {
      Translator translator = Util.createPackageTranslator(RepositoryManager.class, ureq.getLocale());
      wControl.setError(translator.translate("details.delete.error.references", new String[] { referencesSummary }));
      return false;
    }
View Full Code Here

  public Controller getEditorController(OLATResourceable res, UserRequest ureq, WindowControl wControl) {
    TestFileResource fr = new TestFileResource();
    fr.overrideResourceableId(res.getResourceableId());
   
    //check if we can edit in restricted mode -> only typos
    ReferenceManager refM = ReferenceManager.getInstance();
    List referencees = refM.getReferencesTo(res);
    //String referencesSummary = refM.getReferencesToSummary(res, ureq.getLocale());
    //boolean restrictedEdit = referencesSummary != null;
    QTIEditorMainController editor =  new QTIEditorMainController(referencees,ureq, wControl, fr);
    if (editor.isLockedSuccessfully()) {
      return editor;
View Full Code Here

  public Controller getEditorController(OLATResourceable res, UserRequest ureq, WindowControl wControl) {
    SurveyFileResource fr = new SurveyFileResource();
    fr.overrideResourceableId(res.getResourceableId());
   
    //check if we can edit in restricted mode -> only typos
    ReferenceManager refM = ReferenceManager.getInstance();
    List referencees = refM.getReferencesTo(res);
    //String referencesSummary = refM.getReferencesToSummary(res, ureq.getLocale());
    //boolean restrictedEdit = referencesSummary != null;
    QTIEditorMainController editor =  new QTIEditorMainController(referencees,ureq, wControl, fr);
    if (editor.isLockedSuccessfully()) {
      return editor;
View Full Code Here

TOP

Related Classes of org.olat.resource.references.ReferenceManager

Copyright © 2018 www.massapicom. 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.