Package org.apache.roller.pojos

Examples of org.apache.roller.pojos.UserData


                umgr.removeWebsite(site);
            }
        }
       
        for (Iterator userIter = mUsersCreated.iterator(); userIter.hasNext();) {
            UserData user = (UserData) userIter.next();
            user = umgr.getUser(user.getId());
            if (user != null) umgr.removeUser(user);
        }
    }
View Full Code Here


     */
    private void deleteWebsite(String deleteMe) throws RollerException {
        mLogger.debug("try to delete " + deleteMe);
        UserManager umgr = getRoller().getUserManager();
       
        UserData user = umgr.getUserByUsername(deleteMe);
       
        WebsiteData website = (WebsiteData)umgr.getWebsites(user, null, null).get(0);
        umgr.removeWebsite(website);
       
        umgr.removeUser(user);
View Full Code Here

     * Is session's authenticated user authorized to work in current website?
     */
    public boolean isUserAuthorized(WebsiteData website)
        throws RollerException
    {
        UserData user = getAuthenticatedUser();
        if (user != null && user.getEnabled().booleanValue())
            return hasPermissions(website, PermissionsData.LIMITED);
        return false;
    }
View Full Code Here

     * Is session's authenticated user authorized to post in current weblog?
     */
    public boolean isUserAuthorizedToAuthor(WebsiteData website)
        throws RollerException
    {
        UserData user = getAuthenticatedUser();
        if (user != null && user.getEnabled().booleanValue())
            return hasPermissions(website, PermissionsData.AUTHOR);
        return false;
    }
View Full Code Here

     * Is session's authenticated user authorized to admin current weblog?
     */
    public boolean isUserAuthorizedToAdmin(WebsiteData website)
        throws RollerException
    {
        UserData user = getAuthenticatedUser();
        if (user != null && user.getEnabled().booleanValue())
            return hasPermissions(website, PermissionsData.ADMIN);
        return false;
    }
View Full Code Here

        return false;
    }
   
    private boolean hasPermissions(WebsiteData website, short mask)
    {
        UserData user = getAuthenticatedUser();
        if (user != null)
        {
            return website.hasUserPermissions(user, mask);
        }
        return false;
View Full Code Here

            HashMap pages = null; //getRollerContext().readThemeMacros(form.getTheme());
           
            List websiteDatas = new ArrayList();
            for (int i = 0; i < c.getEntries().length; i++) {
                WeblogEntry entry = (WeblogEntry)c.getEntries()[i];
                UserData user = mgr.getUserByUsername(entry.getCreatingUser());
                WebsiteData wd = new WebsiteData(
                        entry.getHandle(),
                        user,
                        entry.getName(),
                        entry.getDescription(),
View Full Code Here

        }
       
        WeblogEntrySet wes = new WeblogEntrySet(getUrlPrefix());
        List entries = new ArrayList();
        for (int i = 0; i < uds.length; i++) {
            UserData ud = uds[i];
            List permissions = ud.getPermissions();
            for (Iterator j = permissions.iterator(); j.hasNext(); ) {
                PermissionsData pd = (PermissionsData)j.next();
                WebsiteData wd = pd.getWebsite();
                WeblogEntry we = toWeblogEntry(wd);
                entries.add(we);
View Full Code Here

            UserManager umgr = roller.getUserManager();
            List users =
             umgr.getUsersStartingWith(startsWith, offset, length, enabledOnly);
            Iterator userIter = users.iterator();
            while (userIter.hasNext()) {
                UserData user = (UserData)userIter.next();
                response.getWriter().print(user.getUserName());  
                response.getWriter().print(",");  
                response.getWriter().println(user.getEmailAddress());
            }
            response.flushBuffer();
        } catch (RollerException e) {
            throw new ServletException(e.getMessage());
        }
View Full Code Here

        }
       
        // finally make sure that user has required website permissions
        if (ret && mPerms != null && mPerms.size() > 0)
        {
            UserData user = null;
            if (rses != null) user = rses.getAuthenticatedUser();
           
            WebsiteData website = rreq.getWebsite();
            BasePageModel pageModel = (BasePageModel)req.getAttribute("model");
            if (pageModel != null)
View Full Code Here

TOP

Related Classes of org.apache.roller.pojos.UserData

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.