Examples of EntrySet


Examples of org.apache.roller.webservices.adminapi.sdk.EntrySet

    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

Examples of org.apache.roller.webservices.adminapi.sdk.EntrySet

    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

Examples of org.apache.roller.webservices.adminapi.sdk.EntrySet

        try {
            List users = getRoller().getUserManager().getUsers();
            if (users == null) {
                users = Collections.EMPTY_LIST;
            }
            EntrySet c = toWeblogEntrySet((UserData[])users.toArray(new UserData[0]));
           
            return c;
        } catch (RollerException re) {
            throw new InternalException("ERROR: Could not get weblog collection", re);
        }
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.sdk.EntrySet

            WebsiteData wd = getRoller().getUserManager().getWebsiteByHandle(handle);
            if (wd == null) {
                throw new NotFoundException("ERROR: Unknown weblog handle: " + handle);
            }
            WebsiteData[] wds = new WebsiteData[] { wd };
            EntrySet c = toWeblogEntrySet(wds);
           
            return c;
        } catch (RollerException re) {
            throw new InternalException("ERROR: Could not get weblog collection", re);
        }
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.sdk.EntrySet

            throw new InternalException("ERROR: Could not get weblog collection", re);
        }
    }
   
    private EntrySet postCollection(Reader r) throws HandlerException {
        EntrySet c = getEntrySet(r);
        if (c.isEmpty()) {
            throw new BadRequestException("ERROR: No entries");
        }
        c = createWeblogs((WeblogEntrySet)c);
       
        return c;
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.sdk.EntrySet

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

Examples of org.apache.roller.webservices.adminapi.sdk.EntrySet

       
        return c;
    }
   
    private EntrySet putEntry(Reader r) throws HandlerException {
        EntrySet c = getEntrySet(r);
        if (c.isEmpty()) {
            throw new BadRequestException("ERROR: No entries");
        }
        if (c.getEntries().length > 1) {
            throw new BadRequestException("ERROR: Cannot put >1 entries per request");
        }
       
        WeblogEntry entry = (WeblogEntry)c.getEntries()[0];
        if (entry.getHandle() != null && !entry.getHandle().equals(getUri().getEntryId())) {
            throw new BadRequestException("ERROR: Content handle does not match URI handle");
        }
        entry.setHandle(getUri().getEntryId());
        c = updateWeblogs((WeblogEntrySet)c);
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.sdk.EntrySet

            if (wd == null) {
                throw new NotFoundException("ERROR: Unknown weblog handle: " + handle);
            }
           
            WebsiteData[] wds = new WebsiteData[] { wd };
            EntrySet es = toWeblogEntrySet(wds);
           
            mgr.removeWebsite(wd);
           
            CacheManager.invalidate(wd);
            getRoller().flush();
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.sdk.EntrySet

        try {
            List users = getRoller().getUserManager().getUsers();
            if (users == null) {
                users = java.util.Collections.EMPTY_LIST;
            }
            EntrySet es = toUserEntrySet((UserData[])users.toArray(new UserData[0]));
           
            return es;
        } catch (RollerException re) {
            throw new InternalException("ERROR: Could not get user collection", re);
        }
View Full Code Here

Examples of org.apache.roller.webservices.adminapi.sdk.EntrySet

            if (ud == null) {
                throw new NotFoundException("ERROR: Unknown user: " + getUri().getEntryId());
            }
            UserData[] uds = new UserData[] { ud };
           
            EntrySet c = toUserEntrySet(uds);
            return c;
        } catch (RollerException re) {
            throw new InternalException("ERROR: Could not get user collection", re);
        }
    }
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.