Examples of DBUser


Examples of com.appspot.gaeforum309.db.DBUser

       
       
        if(lcomments.size() > 0)
        {
          DBComment c = lcomments.get(0);
          DBUser a = c.getAuthor();
          author=a.getEmail();
        }
       
        // TODO: Counter of view in DBConversation
        // TODO: Search last post
        // TODO: Replace all id by real GAEForum id, or remove it !
        // TODO: Add the "em closed" only if topic is closed
        // TODO: Add a possibility to close a topic
        response.append("<div id=\"topic24927\" class=\"main-item odd main-first-item sticky closed\">"+
            "<span class=\"icon sticky closed\"><!-- --></span>"+
            "<div class=\"item-subject\">"+
            "<h3 class=\"hn\"><span class=\"item-num\">1</span> <span class=\"item-status\"><em class=\"closed\">Closed</em>:</span> <a href=\""+ Page.getUrl(conversation) +"\">"+ conversation.getTitle() +"</a></h3>"+
            "<p><span class=\"item-starter\">by <cite>"+ author  +"</cite></span> <span class=\"item-nav\">( <span>Pages&nbsp;</span><a class=\"first-item\" href=\""+ Page.getUrl(conversation) +"\">1</a>&nbsp;<a href=\""+ Page.getUrl(conversation) +"\">2</a> )</span></p>"+
            "</div>" +
            "<ul class=\"item-info\">" +
            "<li class=\"info-replies\"><strong>"+ conversation.getChilds().size() +"</strong> <span class=\"label\">replies</span></li>"+
            "<li class=\"info-views\"><strong>X</strong> <span class=\"label\">views</span></li>"+
            "<li class=\"info-lastpost\"><span class=\"label\">Last post</span> <strong><a href=\"/\">X</a></strong> <cite>by X</cite></li>"+
            "</ul>"+
            "</div>");
      }
    });
    addSection(DBComment.tagName, new Template.ITemplateSection() {

      @Override
      public void head(StringBuilder response, Path path, IPathable object) {
       
      }

      @Override
      public void foot(StringBuilder response, Path path, IPathable object) {

      }

      @Override
      public void body(StringBuilder response, Path path, IPathable object) {
        DBComment comment = (DBComment) object;
        DBUser author = comment.getAuthor();
        DBConversation conversation = (DBConversation) path.getObjectByTagName(DBConversation.tagName);
       
        // TODO: ajouter firstpost, lastpost, ou rien, pour la class du premier div
        // TODO: Add a class of user (Admin, and personalized class ?)
        // TODO: User can be online or not.
        // TODO: Determiner le nombre de posts d'un author
        // TODO: Ajouter une methode de formatage des messages(directement HTML ? ATTENTION au risque d'injection de JavaScript)
        // TODO: Add a signature on comments, and on profile.
        response.append("<div class=\"post odd topicpost\">"+
            "<div id=\"p146029\" class=\"posthead\">"+
            "<h3 class=\"hn post-ident\"><span class=\"post-num\">1</span> <span class=\"post-byline\"><span>Topic by </span><em class=\"group_color_7\"><a title=\"Go to "+ author.getEmail() +"'s profile\" href=\"/\">"+ author.getEmail() +"</a></em></span> <span class=\"post-link\"><a class=\"permalink\" rel=\"bookmark\" title=\"Permanent link to this post\" href=\""+ Page.getUrl(comment) +"\">"+ comment.getDateDiscription().toLocaleString() +"</a></span></h3>"+
            "</div>"+
            "<div class=\"postbody\">"+
            "<div class=\"post-author\">"+
            "<ul class=\"author-ident\">"+
            "<li class=\"username\"><a title=\"Go to "+ author.getEmail() +"'s profile\" href=\"/\">"+ author.getEmail() +"</a></li>"+
            "<li class=\"usertitle\"><span>Standard user</span></li>"+
            "<li class=\"userstatus\"><span>Offline</span></li>"+
            "</ul>"+
            "<ul class=\"author-info\">"+
            "<li><span>Registered: <strong>"+ author.getDateInscription() +"</strong></span></li>"+
            "<li><span>Posts: <strong>X</strong></span></li>"+
            "</ul>"+
            "</div>"+
            "<div class=\"post-entry\">"+
            "<h4 id=\"pc146029\" class=\"entry-title hn\">"+ conversation.getTitle()  +"</h4>"+
View Full Code Here

Examples of com.appspot.gaeforum309.db.DBUser

      response.append("<span>You are not logged in.</span> <span>Please <a href='"+ ForumAPI.userLoginLogoutUrl(Page.getUrl(path.object())) +"'>login</a> with your Google Account.</span></p>");
      //response.append("<p id=\"visit-links\" class=\"options\"><span id=\"visit-recent\" class=\"first-item\"><a href=\"http://punbb.informer.com/forums/search/recent/\" title=\"Find topics which contain recent posts.\">Active topics</a></span> <span id=\"visit-unanswered\"><a href=\"http://punbb.informer.com/forums/search/unanswered/\" title=\"Find topics which have not been replied to.\">Unanswered topics</a></span>");
    }
    else
    {
      DBUser user = ForumAPI.userLogin();
     
      response.append("<p><span>Welcome "+ user.getEmail() +". </span>");
      if(user.isFirstLogin())
      {
        // TODO: Add an API to get first login form URI.
        response.append("<span>This is your first login, please fill our <a href='/firstLogin'>first login form</a>. </span>");
      }
     
View Full Code Here

Examples of com.appspot.gaeforum309.db.DBUser

    {
      // TODO: Catch this error
      return;
    }
   
    DBUser user = ForumAPI.userLogin();
    if(user == null)
    {
      // TODO: Catch this error
      return;
    }
View Full Code Here

Examples of com.appspot.gaeforum309.db.DBUser

   
    response.append("<H1>Forum " + ForumAPI.Config.getForumName() + "</H1>");
   
    if(ForumAPI.loggedUser())
    {
      DBUser dbuser = ForumAPI.userLogin();
      response.append("<p>Welcome Mr " + dbuser.getEmail() + "</p>");
      if(ForumAPI.loggedUserAsAdmin())
      {
        response.append("<p>You are an administrator.</p>");
      }
    }
View Full Code Here

Examples of com.appspot.gaeforum309.db.DBUser

    if(!userServ.isUserLoggedIn())
      return null;
   
    User user =userServ.getCurrentUser();
   
    DBUser dbuser = DBUser.createOrUpdateUser(user);
   
    return dbuser;
  }
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBUser

        return null;
    }

    @Override
    protected List<DBObjectNavigationList> createNavigationLists() {
        DBUser user = getOwner();
        if (user != null) {
            List<DBObjectNavigationList> objectNavigationLists = new ArrayList<DBObjectNavigationList>();
            objectNavigationLists.add(new DBObjectNavigationListImpl("User", user));
            return objectNavigationLists;
        }
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBUser

        return compileList;
    }

    public List<String> getMissingDebugPrivileges(ConnectionHandler connectionHandler) {
        String userName = connectionHandler.getUserName();
        DBUser user = connectionHandler.getObjectBundle().getUser(userName);
        String[] privilegeNames = connectionHandler.getInterfaceProvider().getDebuggerInterface().getRequiredPrivilegeNames();
        List<String> missingPrivileges = new ArrayList<String>();
        for (String privilegeName : privilegeNames) {
            DBPrivilege privilege = connectionHandler.getObjectBundle().getPrivilege(privilegeName);
            if (privilege == null || !user.hasPrivilege(privilege))  {
                missingPrivileges.add(privilegeName);
            }
        }

        return missingPrivileges;
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.