Examples of Manager


Examples of org.objectweb.speedo.pobjects.inheritance.prefetch.Manager

    days.add(day4);
    days.add(day5);
   
    worker1.setDays(days);
    worker3.setDays(days);
    Manager manager1 = new Manager("Jean Duverge", 57, "Tetra Pack", "Sales");
    Manager manager2 = new Manager("Eric Mento", 49, "Tetra Pack", "Marketing");
   
    worker1.setMainManager(manager1);
    worker2.setMainManager(manager1);
    worker3.setMainManager(manager2);
   
View Full Code Here

Examples of org.objectweb.speedo.tutorial.pobjects.additional.inheritance.Manager

    //create workers
    Worker worker1 = new Worker("Caroline Bret", 33, "Tetra Pack", true);
    Worker worker2 = new Worker("Evelyne Jain", 54, "Tetra Pack", false);
    Worker worker3 = new Worker("Tim Jorge", 28, "Tetra Pack", false);
    //create managers
    Manager manager1 = new Manager("Jean Duverge", 52, "Tetra Pack", "Sales");
    Manager manager2 = new Manager("Eric Mento", 49, "Tetra Pack", "Marketing");
   
    worker1.addManager(manager1);
    worker2.addManager(manager1);
    worker2.addManager(manager2);
    worker3.addManager(manager2);
View Full Code Here

Examples of org.objectweb.speedo.tutorial.pobjects.mapping.Manager

  public static void mapping() {
    System.out.println( "***************Mapping*****************");
    //create a department
    Department department = new Department("Sales");
    //create a manager
    Manager manager = new Manager("Young Emy", department);
    //link the manager to the department
    department.setManager(manager);
    //create employees
    Employee employee1 = new Employee("Truffaz Brad", manager);
    Employee employee2 = new Employee("Serio Laura", manager);
View Full Code Here

Examples of org.olat.basesecurity.Manager

  /**
   * @see org.olat.core.gui.components.form.flexible.impl.FormBasicController#formOK(org.olat.core.gui.UserRequest)
   */
  protected void formOK(UserRequest ureq) {
    UserManager um = UserManager.getInstance();
    Manager secMgr = ManagerFactory.getManager();
    // Refresh user from DB to prevent stale object issues
    tobeChangedIdentity = secMgr.loadIdentityByKey(tobeChangedIdentity.getKey());
    Preferences prefs = tobeChangedIdentity.getUser().getPreferences();
    prefs.setLanguage(language.getSelectedKey());
    prefs.setFontsize(fontsize.getSelectedKey());
    if (notificationInterval != null) {
      // only read notification interval if available, could be disabled by configuration
View Full Code Here

Examples of org.olat.basesecurity.Manager

   * @param token
   * @return True if authentication is valid
   */
  private boolean validAuthentication(Identity identity, String token) {
    boolean valid = false;
    Manager secMgr = ManagerFactory.getManager();
    Authentication authentication = secMgr.findAuthenticationByAuthusername(identity.getKey().toString(), TOKEN_PROVIDER);
    if (authentication != null && authentication.getCredential().equals(token)) {
      valid = true;
    }
    return valid;
  }
View Full Code Here

Examples of org.olat.basesecurity.Manager

   * database. It has nothing to do with accounts on the jabber server itself.
   */
  private void checkAndCreateTestUsers() {
    Identity identity;
    Authentication auth;
    Manager securityManager = ManagerFactory.getManager();
    identity = securityManager.findIdentityByName("author");
    auth = ManagerFactory.getManager().findAuthentication(identity, ClientManager.PROVIDER_INSTANT_MESSAGING);
    if (auth == null) { // create new authentication for provider
      ManagerFactory.getManager().createAndPersistAuthentication(identity, ClientManager.PROVIDER_INSTANT_MESSAGING, identity.getName(),
          "test");
      InstantMessagingModule.getAdapter().createAccount("author", "test", "Aurich Throw", "author@olat-newinstallation.org");
    }

    identity = securityManager.findIdentityByName("administrator");
    auth = ManagerFactory.getManager().findAuthentication(identity, ClientManager.PROVIDER_INSTANT_MESSAGING);
    if (auth == null) { // create new authentication for provider
      ManagerFactory.getManager().createAndPersistAuthentication(identity, ClientManager.PROVIDER_INSTANT_MESSAGING, identity.getName(),
          "olat");
      InstantMessagingModule.getAdapter().createAccount("administrator", "olat", "Administrator", "administrator@olat-newinstallation.org");
    }

    identity = securityManager.findIdentityByName("learner");
    auth = ManagerFactory.getManager().findAuthentication(identity, ClientManager.PROVIDER_INSTANT_MESSAGING);
    if (auth == null) { // create new authentication for provider
      ManagerFactory.getManager().createAndPersistAuthentication(identity, ClientManager.PROVIDER_INSTANT_MESSAGING, identity.getName(),
          "test");
      InstantMessagingModule.getAdapter().createAccount("learner", "test", "Leise Arnerich", "learner@olat-newinstallation.org");
    }

    identity = securityManager.findIdentityByName("test");
    auth = ManagerFactory.getManager().findAuthentication(identity, ClientManager.PROVIDER_INSTANT_MESSAGING);
    if (auth == null) { // create new authentication for provider
      ManagerFactory.getManager().createAndPersistAuthentication(identity, ClientManager.PROVIDER_INSTANT_MESSAGING, identity.getName(),
          "test");
      InstantMessagingModule.getAdapter().createAccount("test", "test", "Thomas Est", "test@olat-newinstallation.org");
View Full Code Here

Examples of org.olat.basesecurity.Manager

   * @param feed
   * @param identityKey
   * @return The feed base uri for the given user (identity)
   */
  public static String getFeedBaseUri(Feed feed, Identity identity, Long courseId, String nodeId) {
    Manager manager = ManagerFactory.getManager();
    boolean isCourseNode = courseId != null && nodeId != null;

    final String slash = "/";
    StringBuffer uri = new StringBuffer();
    uri.append(Settings.getServerContextPathURI());
    uri.append(slash);
    uri.append(FeedMediaDispatcher.uriPrefixes.get(feed.getResourceableTypeName()));
    uri.append(slash);

    if (isCourseNode) {
      uri.append(COURSE_NODE_INDICATOR);
      uri.append(slash);
    }

    if (identity != null) {
      // The identity can be null for guests
      String idKey = identity.getKey().toString();
      Authentication authentication = manager.findAuthenticationByAuthusername(idKey, TOKEN_PROVIDER);
      if (authentication == null) {
        // Create an authentication
        String token = RandomStringUtils.randomAlphanumeric(6);
        authentication = manager.createAndPersistAuthentication(identity, TOKEN_PROVIDER, idKey, token);
      }
      // If the repository entry allows guest access it is public, thus not
      // private.
      boolean isPrivate = true;
      RepositoryEntry entry = RepositoryManager.getInstance().lookupRepositoryEntry(feed, false);
View Full Code Here

Examples of org.olat.basesecurity.Manager

   * @param wControl
   */
  public PersonalSettingsController(UserRequest ureq, WindowControl wControl) {
    super(wControl);
      translator = new PackageTranslator(PACKAGE, ureq.getLocale());
      Manager mgr = ManagerFactory.getManager();
      if (!mgr.isIdentityPermittedOnResourceable(
          ureq.getIdentity(),
          Constants.PERMISSION_ACCESS,
          OresHelper.lookupType(this.getClass())))
        throw new OLATSecurityException("Insufficient permissions to access PersonalSettingsController");

View Full Code Here

Examples of org.olat.basesecurity.Manager

      return;
    }
   
   

    Manager mgr = ManagerFactory.getManager();
    if (!mgr.isIdentityPermittedOnResourceable(
        ureq.getIdentity(),
        Constants.PERMISSION_ACCESS,
        OresHelper.lookupType(this.getClass())))
      throw new OLATSecurityException("Insufficient permissions to access ChangePasswordController");
View Full Code Here

Examples of org.olat.basesecurity.Manager

  /**
   * @see org.olat.commons.servlets.util.WebDAVProvider#getContainer(org.olat.core.id.Identity)
   */
  public VFSContainer getContainer(Identity identity) {
    Manager secMgr = ManagerFactory.getManager();
    //FIXME: RH: check if it really should return something => why an empty container?
    if (!secMgr.isIdentityPermittedOnResourceable(identity, Constants.PERMISSION_HASROLE, Constants.ORESOURCE_ADMIN)){
      return new MergeSource(null, null);
    }   

    // mount /static/themes, filter out CVS!
    String staticAbsPath = WebappHelper.getContextRoot() + "/static/themes";
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.