Package net.sourceforge.pebble.domain

Examples of net.sourceforge.pebble.domain.Blog.info()


            }
          }
        }
      }

      blog.info("Files uploaded.");
    } catch (Exception e) {
      throw new ServletException(e);
    }

    FileMetaData directory = fileManager.getFileMetaData(path);
View Full Code Here


      if (type.equals(FileMetaData.THEME_FILE)) {
        fileManager = new FileManager(blog, FileMetaData.BLOG_DATA);
        fileManager.saveFile("/theme" + path, name, content);
      }

      blog.info("File \"" + StringUtils.transformHTML(name) + "\" saved.");
    } catch (IllegalFileAccessException e) {
      return new ForbiddenView();
    } catch (IOException ioe) {
      throw new ServletException(ioe);
    }
View Full Code Here

    if (id != null) {
      try {
        StaticPage staticPage = service.getStaticPageById(blog, id);
        if (staticPage != null) {
          service.unlock(staticPage);
          blog.info("Static page <a href=\"" + staticPage.getLocalPermalink() + "\">" + staticPage.getTitle() + "</a> unlocked.");
        }
      } catch (StaticPageServiceException e) {
        blog.warn(e.getClass().getName() + " Error while unlocking static page - " + StringUtils.transformHTML(e.getMessage()));
        log.warn("Error while unlocking static page", e);
      }
View Full Code Here

      if (type.equals(FileMetaData.THEME_FILE)) {
        fileManager = new FileManager(blog, FileMetaData.BLOG_DATA);
        fileManager.createDirectory("/theme" + path, name);
      }

      blog.info("Directory \"" + name + "\" created.");
    } catch (IllegalFileAccessException e) {
      return new ForbiddenView();
    }

    return new RedirectView(blog.getUrl() + directory.getUrl());
View Full Code Here

        if (type.equals(FileMetaData.THEME_FILE)) {
          fileManager = new FileManager(blog, FileMetaData.BLOG_DATA);
          fileManager.renameFile("/theme" + path, name, newName);
        }

        blog.info("File \"" + oldName + "\" renamed to \"" + newName + "\".");
      } else {
        if (FileManager.hasEnoughSpace(blog, fileManager.getFileMetaData(path, name).getSizeInKB())) {
          fileManager.copyFile(path, name, newName);

          // if it's a theme file, also create a copy in blog.dir/theme
View Full Code Here

          if (type.equals(FileMetaData.THEME_FILE)) {
            fileManager = new FileManager(blog, FileMetaData.BLOG_DATA);
            fileManager.copyFile("/theme" + path, name, newName);
          }

          blog.info("File \"" + oldName + "\" copied to \"" + newName + "\".");
        } else {
          return new NotEnoughSpaceView();
        }
      }
    } catch (IllegalFileAccessException e) {
View Full Code Here

    Blog blog = (Blog)getModel().get(Constants.BLOG_KEY);
    String email = request.getParameter("email");
    email = StringUtils.filterHTML(email);
    if (email != null && email.length() > 0) {
      blog.getEmailSubscriptionList().addEmailAddress(email);
      blog.info(email + " has subscribed to this blog.");

      getModel().put("email", email);
      return new SubscribedView();
    }
View Full Code Here

        if (blogEntry != null) {
          if (submit.equalsIgnoreCase("Remove")) {
            try {
              service.removeBlogEntry(blogEntry);
              blog.info("Blog entry \"" + StringUtils.transformHTML(blogEntry.getTitle()) + "\" removed.");
            } catch (BlogServiceException be) {
              throw new ServletException(be);
            }
          } else if (submit.equals("Publish")) {
            // this publishes the entry as-is (i.e. with the same
View Full Code Here

            // this publishes the entry as-is (i.e. with the same
            // date/time it already has)
            try {
              blogEntry.setPublished(true);
              service.putBlogEntry(blogEntry);
              blog.info("Blog entry <a href=\"" + blogEntry.getLocalPermalink() + "\">" + blogEntry.getTitle() + "</a> published.");
            } catch (BlogServiceException be) {
              throw new ServletException(be);
            }
          }
        }
View Full Code Here

        blog.setProperty(name, "false");
      }

      try {
        blog.storeProperties();
        blog.info("Blog properties saved.");
      } catch (BlogServiceException e) {
        throw new ServletException(e);
      }

      // if the following properties have changed, reload the blog
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.