Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
Add class-level Javadoc for sagan.blog.*
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeams committed May 30, 2014
1 parent f6193b4 commit cba334d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
3 changes: 3 additions & 0 deletions sagan-common/src/main/java/sagan/blog/Post.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@

import org.springframework.util.StringUtils;

/**
* JPA Entity representing an individual blog post.
*/
@Entity
@SuppressWarnings("serial")
public class Post implements Serializable {
Expand Down
4 changes: 3 additions & 1 deletion sagan-common/src/main/java/sagan/blog/PostCategory.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package sagan.blog;

/**
* Available categories for blog posts.
*/
public enum PostCategory {

ENGINEERING("Engineering", "engineering"),
Expand Down Expand Up @@ -30,5 +33,4 @@ public String getId() {
public String toString() {
return getDisplayName();
}

}
7 changes: 7 additions & 0 deletions sagan-common/src/main/java/sagan/blog/PostMovedException.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
package sagan.blog;

/**
* Exception thrown when requesting a blog post whose slug has changed. See
* {@code BlogController} for handling logic.
*
* @see sagan.blog.support.BlogService#getPublishedPost(String)
*/
@SuppressWarnings("serial")
public class PostMovedException extends RuntimeException {

private String publicSlug;

public PostMovedException(String publicSlug) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

import sagan.support.ResourceNotFoundException;

/**
* Exception thrown when requesting a non existent (or no-longer existent) blog post. See
* sagan-site's {@code MvcConfig#handleException} for handling logic.
*
* @see sagan.blog.support.BlogService#getPost(Long)
* @see sagan.blog.support.BlogService#getPublishedPost(String)
*/
@SuppressWarnings("serial")
public class PostNotFoundException extends ResourceNotFoundException {

Expand Down

0 comments on commit cba334d

Please sign in to comment.