Package org.davinci.server.user

Examples of org.davinci.server.user.IPerson


    if (ServerManager.LOCAL_INSTALL && IDavinciServerConstants.LOCAL_INSTALL_USER.equals(userName)) {
      return this.getSingleUser();
    }

    if (this.checkUserExists(userName)) {
      IPerson person = this.personManager.getPerson(userName);
      return newUser(person, null);
    }
    return null;
  }
View Full Code Here


    return null;
  }

    public IUser getUserByEmail(String email) throws UserException {
         if (checkUserExistsByEmail(email)) {
             IPerson person = this.personManager.getPersonByEmail(email);
             return newUser(person, null);
         }
         return null;
    }
View Full Code Here

        }

        if (this.maxUsers > 0 && this.usersCount >= this.maxUsers) {
            throw new UserException(UserException.MAX_USERS);
        }
        IPerson person = this.personManager.addPerson(userName, password, email);
        if (person != null) {
            IUser user = newUser(person,null);
         
            //File userDir = user.getUserDirectory();
            //userDir.mkdir();
View Full Code Here

  }

  public IPerson addPerson(String userName, String password, String email) throws UserException {
    assertValidUserId(userName);

    IPerson person = (IPerson) persons.get(userName);
    if (person != null) {
      return person;
    }

    person = new OrionPersonImpl(userName, password, email);
View Full Code Here

  }

  public IPerson login(String userName, String password) {
    assertValidUserId(userName);

    IPerson person = (IPerson) persons.get(userName);
    if (person != null) {
      return person;
    }
    try {
      return addPerson(userName, null, null);
View Full Code Here

  }

  public IPerson getPerson(String userName) {
    assertValidUserId(userName);

    IPerson person = (IPerson) persons.get(userName);
    if (person != null)
      return person;

    try {
      return addPerson(userName, null, null);
View Full Code Here

    if(user == null){
      return returnObject;
    }
    try{
      // Filter the list of templates
      IPerson person = user.getPerson();
      String userEmail = person.getEmail();     
      JSONArray allTemplates = returnObject.getJSONArray("templates");
      JSONArray userTemplates = new JSONArray();
      int count = allTemplates.length();
      for(int i=0 ; i< count; i++){
        JSONObject template = allTemplates.getJSONObject(i);
View Full Code Here

      return "Invalid project name to clone - project does not exist";
    }
    try{
      IStorage projectTemplatesDirectory = getProjectTemplatesDirectory();
     
      IPerson person = user.getPerson();
      String email = person.getEmail();
      String templateFolderName = makeProjectTemplateFolderName(projectTemplateName, email);
      IStorage templateDir = projectTemplatesDirectory.newInstance(projectTemplatesDirectory, templateFolderName);
      if(templateDir.exists()) {
        // If template directory already exists,
        // remove all of the current contents
View Full Code Here

 
  // Deletes a set of project templates
  // User must be the owner of all the templates he is trying to delete, else operation fails
  public String deleteProjectTemplates(IUser user, JSONArray templatesToDelete){
    String errorString = null;
    IPerson person = user.getPerson();
    String email = person.getEmail();

    JSONObject projectTemplatesObject;
    JSONArray existingTemplates;
    try{
      IStorage projectTemplatesDirectory = getProjectTemplatesDirectory();
View Full Code Here

  // Modify settings on a set of project templates
  // User must be the owner of all the templates he is trying to modify, else operation fails
  public String modifyProjectTemplates(IUser user, JSONArray templatesToModify){
    String errorString = null;

    IPerson person = user.getPerson();
    String userEmail = person.getEmail();

    JSONObject projectTemplatesObject;
    JSONArray existingTemplates;
    try{
      projectTemplatesObject = _getProjectTemplatesIndex();
View Full Code Here

TOP

Related Classes of org.davinci.server.user.IPerson

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.