Package com.sun.syndication.propono.atom.server

Examples of com.sun.syndication.propono.atom.server.AtomNotFoundException


            }
           
        } catch (WebloggerException ex) {
            throw new AtomException("ERROR fetching entry",ex);
        }
        throw new AtomNotFoundException("ERROR resource not found");
    }
View Full Code Here


           
            String handle = pathInfo[0];
            String absUrl = WebloggerRuntimeConfig.getAbsoluteContextURL();
            Weblog website = roller.getWeblogManager().getWeblogByHandle(handle);
            if (website == null) {
                throw new AtomNotFoundException("Cannot find weblog: " + handle);
            }
            if (!RollerAtomHandler.canView(user, website)) {
                throw new AtomNotAuthorizedException("Not authorized to access website");
            }
View Full Code Here

        try {
            String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/");
            String handle = pathInfo[0];
            Weblog website = roller.getWeblogManager().getWeblogByHandle(handle);
            if (website == null) {
                throw new AtomNotFoundException("cannot find specified weblog");
            }
            if (RollerAtomHandler.canEdit(user, website) && pathInfo.length > 1) {
                try {
                    String path = filePathFromPathInfo(pathInfo);
                    String fileName = path.substring(0, path.length() - ".media-link".length());
View Full Code Here

            // authenticated client posted a weblog entry
            String handle = pathInfo[0];
            Weblog website =
                roller.getWeblogManager().getWeblogByHandle(handle);
            if (website == null) {
                throw new AtomNotFoundException("Cannot find weblog: " + handle);
            }
            if (!RollerAtomHandler.canEdit(user, website)) {
                throw new AtomNotAuthorizedException("Not authorized to access website: " + handle);
            }
           
View Full Code Here

    public Entry getEntry(AtomRequest areq) throws AtomException {
        try {
            String entryid = Utilities.stringToStringArray(areq.getPathInfo(),"/")[2];
            WeblogEntry entry = roller.getWeblogEntryManager().getWeblogEntry(entryid);
            if (entry == null) {
                throw new AtomNotFoundException("Cannot find specified entry/resource");
            }
            if (!RollerAtomHandler.canView(user, entry)) {
                throw new AtomNotAuthorizedException("Not authorized to view entry");
            } else {
                return createAtomEntry(entry);
View Full Code Here

            }       
            String handle = pathInfo[0];
            String absUrl = WebloggerRuntimeConfig.getAbsoluteContextURL();
            Weblog website = roller.getWeblogManager().getWeblogByHandle(handle);
            if (website == null) {
                throw new AtomNotFoundException("Cannot find specified weblog");
            }
            if (!RollerAtomHandler.canView(user, website)) {
                throw new AtomNotAuthorizedException("Not authorized to access website: " + handle);
            }
            List entries = roller.getWeblogEntryManager().getWeblogEntries(
View Full Code Here

            if (pathInfo.length == 3) // URI is /blogname/entries/entryid
            {
                WeblogEntry rollerEntry =
                    roller.getWeblogEntryManager().getWeblogEntry(pathInfo[2]);
                if (rollerEntry == null) {
                    throw new AtomNotFoundException(
                        "Cannot find specified entry/resource")
                }
                if (RollerAtomHandler.canEdit(user, rollerEntry)) {
           
                    RollerAtomHandler.oneSecondThrottle();
                   
                    WeblogEntryManager mgr = roller.getWeblogEntryManager();
                    copyToRollerEntry(entry, rollerEntry);
                    rollerEntry.setUpdateTime(new Timestamp(new Date().getTime()));
                    mgr.saveWeblogEntry(rollerEntry);
                    roller.flush();
                   
                    CacheManager.invalidate(rollerEntry.getWebsite());
                    if (rollerEntry.isPublished()) {
                        roller.getIndexManager().addEntryReIndexOperation(rollerEntry);
                    }
                    log.debug("Exiting");
                    return;
                }
                throw new AtomNotAuthorizedException("ERROR not authorized to update entry");
            }
            throw new AtomNotFoundException("Cannot find specified entry/resource");
           
        } catch (WebloggerException re) {
            throw new AtomException("Updating entry");
        }
    }
View Full Code Here

    public void deleteEntry(AtomRequest areq) throws AtomException {
        try {
            String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/");
            WeblogEntry rollerEntry = roller.getWeblogEntryManager().getWeblogEntry(pathInfo[2]);
            if (rollerEntry == null) {
                throw new AtomNotFoundException("cannot find specified entry/resource");
            }
            if (RollerAtomHandler.canEdit(user, rollerEntry)) {
                WeblogEntryManager mgr = roller.getWeblogEntryManager();
                CacheManager.invalidate(rollerEntry.getWebsite());
                reindexEntry(rollerEntry);
View Full Code Here

           
        } else if (pathInfo.length > 0 && pathInfo[1].equals("resources")) {
            MediaCollection mcol = new MediaCollection(user, atomURL);
            return mcol.getCollection(areq);
        }
        throw new AtomNotFoundException("Cannot find collection specified");
    }
View Full Code Here

            } else if (pathInfo[1].equals("resource") && pathInfo[pathInfo.length - 1].endsWith(".media-link")) {
                MediaCollection mcol = new MediaCollection(user, atomURL);
                return mcol.getEntry(areq);                   
            }
        }
        throw new AtomNotFoundException("Cannot find specified entry/resource");
    }
View Full Code Here

TOP

Related Classes of com.sun.syndication.propono.atom.server.AtomNotFoundException

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.