Package org.apache.roller.weblogger.webservices.adminprotocol.sdk

Examples of org.apache.roller.weblogger.webservices.adminprotocol.sdk.EntrySet


            throw new InternalException("ERROR: could not delete user data", re);
        }
       
        // return empty set, entry was deleted
        User[] uds = new User[0];
        EntrySet es = toUserEntrySet(uds);
        return es;
    }
View Full Code Here


   
    protected EntrySet getEntrySet(Reader r) throws HandlerException {
        try {
            SAXBuilder builder = new SAXBuilder();
            Document d = builder.build(r);
            EntrySet c = getEntrySet(d);
           
            return c;
        } catch (UnexpectedRootElementException ure) {
            throw new BadRequestException("ERROR: Failed to parse content", ure);           
        } catch (JDOMException jde) {
View Full Code Here

    protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
        try {
            Handler handler = Handler.getHandler(req);
            String userName = handler.getUserName();
           
            EntrySet c = handler.processGet();
           
            res.setStatus(HttpServletResponse.SC_OK);           
            res.setContentType("application/xml; charset=utf-8");
            String s = c.toString();
            Writer writer = res.getWriter();
            writer.write(s);           
            writer.close();           
        } catch (HandlerException he) {
            res.sendError(he.getStatus(), he.getMessage());
View Full Code Here

    protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
        try {
            Handler handler = Handler.getHandler(req);
            String userName = handler.getUserName();
           
            EntrySet c = handler.processPost(new InputStreamReader(req.getInputStream()));
           
            res.setStatus(HttpServletResponse.SC_CREATED);           
            res.setContentType("application/xml; charset=utf-8");
            String s = c.toString();
            Writer writer = res.getWriter();
            writer.write(s);           
            writer.close();           
        } catch (HandlerException he) {
            res.sendError(he.getStatus(), he.getMessage());
View Full Code Here

    protected void doPut(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
        try {
            Handler handler = Handler.getHandler(req);
            String userName = handler.getUserName();
           
            EntrySet c = handler.processPut(new InputStreamReader(req.getInputStream()));
           
            res.setStatus(HttpServletResponse.SC_OK);           
            res.setContentType("application/xml; charset=utf-8");
            String s = c.toString();
            Writer writer = res.getWriter();
            writer.write(s);           
            writer.close();           
        } catch (HandlerException he) {
            res.sendError(he.getStatus(), he.getMessage());
View Full Code Here

    protected void doDelete(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
        try {
            Handler handler = Handler.getHandler(req);
            String userName = handler.getUserName();
           
            EntrySet es = handler.processDelete();
           
            res.setStatus(HttpServletResponse.SC_OK);                       
            res.setContentType("application/xml; charset=utf-8");
            String s = es.toString();
            Writer writer = res.getWriter();
            writer.write(s);           
            writer.close();                       
        } catch (HandlerException he) {
            res.sendError(he.getStatus(), he.getMessage());
View Full Code Here

                List<WeblogPermission> permissions = getRoller().getUserManager().getWeblogPermissions(user);
                for (WeblogPermission perm : permissions) {
                    perms.add(perm);
                }
            }
            EntrySet es = toMemberEntrySet(perms);
            return es;
        } catch (WebloggerException re) {
            throw new InternalException("ERROR: Could not get member collection", re);
        }
    }
View Full Code Here

                    throw new NotFoundException("ERROR: Could not get permissions for user name: " + username + ", handle: " + handle);
                }
                perms = Collections.singletonList(pd);
            }
           
            EntrySet es = toMemberEntrySet(perms);
            return es;
        } catch (WebloggerException re) {
            throw new InternalException("ERROR: Could not get entry for handle: " + handle + ", username: " + username, re);
        }
    }
View Full Code Here

            throw new InternalException("ERROR: Could not get entry for handle: " + handle + ", username: " + username, re);
        }
    }
   
    private EntrySet postCollection(Reader r) throws HandlerException {
        EntrySet c = getEntrySet(r);
        if (c.isEmpty()) {
            throw new BadRequestException("ERROR: No entries");
        }
        c = createMembers((MemberEntrySet)c);
       
        return c;
View Full Code Here

       
        return c;
    }
   
    private EntrySet putCollection(Reader r) throws HandlerException {
        EntrySet c = getEntrySet(r);
        if (c.isEmpty()) {
            throw new BadRequestException("ERROR: No entries");
        }
        c = updateMembers((MemberEntrySet)c);
       
        return c;
View Full Code Here

TOP

Related Classes of org.apache.roller.weblogger.webservices.adminprotocol.sdk.EntrySet

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.