Examples of PermalinkException


Examples of org.b3log.solo.jsonrpc.PermalinkException

                if (permalinks.invalidPagePermalinkFormat(permalink)) {
                    ret.put(Keys.STATUS_CODE,
                            StatusCodes.UPDATE_PAGE_FAIL_INVALID_PERMALINK_FORMAT);

                    throw new PermalinkException("Update page fail, caused by invalid permalink format["
                                                 + ret + "]");
                }

                if (!oldPermalink.equals(permalink)
                    && permalinks.exist(permalink)) {
                    ret.put(Keys.STATUS_CODE,
                            StatusCodes.UPDATE_PAGE_FAIL_DUPLICATED_PERMALINK);

                    throw new PermalinkException("Update page fail, caused by duplicated permalink["
                                                 + permalink + "]");
                }
            }
            newPage.put(Page.PAGE_PERMALINK, permalink);
View Full Code Here

Examples of org.b3log.solo.jsonrpc.PermalinkException

            if (permalinks.invalidPagePermalinkFormat(permalink)) {
                ret.put(Keys.STATUS_CODE,
                        StatusCodes.ADD_PAGE_FAIL_INVALID_PERMALINK_FORMAT);

                throw new PermalinkException("Add page fail, caused by invalid permalink format["
                                             + ret + "]");
            }

            if (permalinks.exist(permalink)) {
                ret.put(Keys.STATUS_CODE,
                        StatusCodes.ADD_PAGE_FAIL_DUPLICATED_PERMALINK);

                throw new PermalinkException("Add page fail, caused by duplicated permalink["
                                             + permalink + "]");
            }
            page.put(Page.PAGE_PERMALINK, permalink);

            pageRepository.update(pageId, page);
View Full Code Here

Examples of org.b3log.solo.jsonrpc.PermalinkException

            if (permalinks.invalidArticlePermalinkFormat(permalink)) {
                status.put(Keys.CODE,
                           StatusCodes.ADD_ARTICLE_FAIL_INVALID_PERMALINK_FORMAT);

                throw new PermalinkException("Add article fail, caused by invalid permalink format["
                                             + permalink + "]");
            }

            if (permalinks.exist(permalink)) {
                status.put(Keys.CODE,
                           StatusCodes.ADD_ARTICLE_FAIL_DUPLICATED_PERMALINK);

                throw new PermalinkException("Add article fail, caused by duplicated permalink["
                                             + permalink + "]");
            }
            article.put(ARTICLE_PERMALINK, permalink);
            // Step 10: Add article-sign relation
            final String signId =
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.