Package org.apache.roller.pojos

Examples of org.apache.roller.pojos.UserData


       
        //
        // if any of the entry fields are null, the set below amounts
        // to a no-op.
        //
        UserData ud = new UserData();
        ud.setUserName(ue.getName());
        ud.setFullName(ue.getFullName());
        ud.setPassword(ue.getPassword());
        ud.setEmailAddress(ue.getEmailAddress());
        ud.setLocale(ue.getLocale().toString());
        ud.setTimeZone(ue.getTimezone().getID());
        ud.setDateCreated(ue.getDateCreated());
       
        return ud;
    }
View Full Code Here


            UserManager userMgr = RollerFactory.getRoller().getUserManager();
           
            WebsiteData website = null;
            if (request.getAttribute(RollerRequest.OWNING_WEBSITE) != null)
            {
                UserData user = (UserData)
                    request.getAttribute(RollerRequest.OWNING_WEBSITE);
            }
            else
            {
                website = rreq.getWebsite();
View Full Code Here

        Authenticator auth = rctx.getAuthenticator();
        String userName = auth.getAuthenticatedUserName(mRequest);
        if (userName != null)
        {
            UserManager userMgr = RollerFactory.getRoller().getUserManager();
            UserData currentUser = userMgr.getUserByUsername(userName);
            // TODO: possible fix for backend refactoryings
            //RollerFactory.getRoller().setUser(currentUser);
        }
       
        // path info may be null, (e.g. on JSP error page)
View Full Code Here

                }
            }
        }
        String digest = null;
        try {
            UserData user = mRoller.getUserManager().getUserByUsername(userName);
            digest = WSSEUtilities.generateDigest(
                    WSSEUtilities.base64Decode(nonce),
                    created.getBytes("UTF-8"),
                    user.getPassword().getBytes("UTF-8"));
            if (digest.equals(passwordDigest)) {
                ret = userName;
            }
        } catch (Exception e) {
            mLogger.error("ERROR in wsseAuthenticataion: " + e.getMessage(), e);
View Full Code Here

                        String credentials = st.nextToken();
                        String userPass = new String(Base64.decodeBase64(credentials.getBytes()));
                        int p = userPass.indexOf(":");
                        if (p != -1) {
                            userID = userPass.substring(0, p);
                            UserData user = mRoller.getUserManager().getUserByUsername(userID);                                                       
                            boolean enabled = user.getEnabled().booleanValue();
                            if (enabled) {   
                                // are passwords encrypted?
                                RollerContext rollerContext =
                                    RollerContext.getRollerContext();
                                String encrypted =
                                    RollerConfig.getProperty("passwds.encryption.enabled");
                                password = userPass.substring(p+1);
                                if ("true".equalsIgnoreCase(encrypted)) {
                                    password = Utilities.encodePassword(password,
                                        RollerConfig.getProperty("passwds.encryption.algorithm"));
                                }
                                valid = user.getPassword().equals(password);
                            }
                        }
                    }
                }
            }
View Full Code Here

        atomEntry.setTitle(     entry.getTitle());
        atomEntry.setContentscontents);
        atomEntry.setPublished( entry.getPubTime());
        atomEntry.setUpdated(   entry.getUpdateTime());       

        UserData creator = entry.getCreator();       
        Person author = new Person();
        author.setName(         creator.getUserName());  
        author.setEmail(        creator.getEmailAddress());                       
        atomEntry.setAuthors(   Collections.singletonList(author));
       
        List categories = new ArrayList();
        Category atomCat = new Category();
        atomCat.setTerm(entry.getCategory().getPath());
View Full Code Here

        // get all permissions: for all users, for all websites
        try {
            List users = getRoller().getUserManager().getUsers();
            List perms = new ArrayList();
            for (Iterator i = users.iterator(); i.hasNext(); ) {
                UserData user = (UserData)i.next();
                List permissions = getRoller().getUserManager().getAllPermissions(user);
                for (Iterator j = permissions.iterator(); j.hasNext(); ) {
                    PermissionsData pd = (PermissionsData)j.next();
                    perms.add(pd);
                }
View Full Code Here

                //get all entries for the given website handle & username
                WebsiteData wd = getRoller().getUserManager().getWebsiteByHandle(handle);
                if (wd == null) {
                    throw new NotFoundException("ERROR: Unknown weblog handle: " + handle);
                }
                UserData ud = getRoller().getUserManager().getUserByUsername(username);
                if (ud == null) {
                    throw new NotFoundException("ERROR: Unknown user name: " + username);
                }
                PermissionsData pd = getRoller().getUserManager().getPermissions(wd, ud);
                if (pd == null) {
View Full Code Here

    }
   
    private PermissionsData toPermissionsData(MemberEntry entry) throws HandlerException {
        try {
            UserManager mgr = getRoller().getUserManager();
            UserData ud = mgr.getUserByUsername(entry.getName());
            WebsiteData wd = mgr.getWebsiteByHandle(entry.getHandle());
            PermissionsData pd = new PermissionsData();
            pd.setUser(ud);
            pd.setWebsite(wd);
            pd.setPermissionMask(stringToMask(entry.getPermission()));
View Full Code Here

    }
   
    private PermissionsData getPermissionsData(String handle, String username) throws HandlerException {
        try {
            UserManager mgr = getRoller().getUserManager();
            UserData ud = mgr.getUserByUsername(username);
            WebsiteData wd = mgr.getWebsiteByHandle(handle);
            PermissionsData pd = mgr.getPermissions(wd, ud);
           
            return pd;
        } catch (RollerException re) {
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.