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

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


            File tempFile = null;
            String handle = pathInfo[0];
            MediaFileManager fileMgr = roller.getMediaFileManager();
            Weblog website = WebloggerFactory.getWeblogger().getWeblogManager().getWeblogByHandle(handle);
            if (!RollerAtomHandler.canEdit(user, website)) {
                throw new AtomNotAuthorizedException("Not authorized to edit weblog: " + handle);
            }
            if (pathInfo.length > 1) {
                // Save to temp file
                String fileName = createFileName(website,
                    (slug != null) ? slug : Utilities.replaceNonAlphanumeric(title,' '), contentType);
View Full Code Here


            File tempFile = null;
            String handle = pathInfo[0];
            MediaFileManager fmgr = roller.getMediaFileManager();
            Weblog website = WebloggerFactory.getWeblogger().getWeblogManager().getWeblogByHandle(handle);
            if (!RollerAtomHandler.canEdit(user, website)) {
                throw new AtomNotAuthorizedException("Not authorized to edit weblog: " + handle);
            }
            if (pathInfo.length > 1) {
                try {                                       
                    // Parse pathinfo to determine file path
                    String filePath = filePathFromPathInfo(pathInfo);
View Full Code Here

            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");
            }

            Feed feed = new Feed();
            feed.setId(atomURL
                +"/"+website.getHandle() + "/resources/" + path + start);               
View Full Code Here

            String handle = pathInfo[0];
            MediaFileManager fmgr = roller.getMediaFileManager();
            WeblogManager wmgr = roller.getWeblogManager();
            Weblog website = wmgr.getWeblogByHandle(handle);
            if (!RollerAtomHandler.canEdit(user, website)) {
                throw new AtomNotAuthorizedException("Not authorized to edit weblog: " + handle);
            }
            if (pathInfo.length > 1) {
                // Save to temp file
                try {
                    tempFile = File.createTempFile(UUID.randomUUID().toString(), "tmp");
View Full Code Here

            log.debug("Exiting via exception");

        } catch (WebloggerException ex) {
            throw new AtomException("ERROR deleting media entry",ex);
        }
        throw new AtomNotAuthorizedException("Not authorized to delete entry");
    }
View Full Code Here

                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);
            }
           
            RollerAtomHandler.oneSecondThrottle();
           
            // Save it and commit it
View Full Code Here

            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);
            }
        } catch (WebloggerException ex) {
            throw new AtomException("ERROR fetching entry", ex);
View Full Code Here

            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(
                    website,           // website
                    null,              // user
                    null,              // startDate
View Full Code Here

                        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

            log.debug("Exiting via exception");
           
        } catch (WebloggerException ex) {
            throw new AtomException("ERROR deleting entry",ex);
        }
        throw new AtomNotAuthorizedException("Not authorized to delete entry");
    }
View Full Code Here

TOP

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

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.