Commit 7f89e4ba authored by Liang Ding's avatar Liang Ding

🎨 Cleanup code

parent 2f075639
...@@ -22,8 +22,8 @@ import org.b3log.latke.ioc.Inject; ...@@ -22,8 +22,8 @@ import org.b3log.latke.ioc.Inject;
import org.b3log.latke.logging.Level; import org.b3log.latke.logging.Level;
import org.b3log.latke.logging.Logger; import org.b3log.latke.logging.Logger;
import org.b3log.latke.service.ServiceException; import org.b3log.latke.service.ServiceException;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.HttpMethod; import org.b3log.latke.servlet.HttpMethod;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.annotation.RequestProcessing; import org.b3log.latke.servlet.annotation.RequestProcessing;
import org.b3log.latke.servlet.annotation.RequestProcessor; import org.b3log.latke.servlet.annotation.RequestProcessor;
import org.b3log.latke.servlet.renderer.JsonRenderer; import org.b3log.latke.servlet.renderer.JsonRenderer;
......
...@@ -26,8 +26,8 @@ import org.b3log.latke.ioc.Inject; ...@@ -26,8 +26,8 @@ import org.b3log.latke.ioc.Inject;
import org.b3log.latke.logging.Level; import org.b3log.latke.logging.Level;
import org.b3log.latke.logging.Logger; import org.b3log.latke.logging.Logger;
import org.b3log.latke.repository.Transaction; import org.b3log.latke.repository.Transaction;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.HttpMethod; import org.b3log.latke.servlet.HttpMethod;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.annotation.RequestProcessing; import org.b3log.latke.servlet.annotation.RequestProcessing;
import org.b3log.latke.servlet.annotation.RequestProcessor; import org.b3log.latke.servlet.annotation.RequestProcessor;
import org.b3log.latke.servlet.renderer.JsonRenderer; import org.b3log.latke.servlet.renderer.JsonRenderer;
......
...@@ -63,5 +63,6 @@ public final class ArchiveDate { ...@@ -63,5 +63,6 @@ public final class ArchiveDate {
/** /**
* Private constructor. * Private constructor.
*/ */
private ArchiveDate() {} private ArchiveDate() {
}
} }
...@@ -22,7 +22,7 @@ package org.b3log.solo.model; ...@@ -22,7 +22,7 @@ package org.b3log.solo.model;
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.2, Oct 31, 2011 * @version 1.0.0.2, Oct 31, 2011
* @since 0.3.1 * @since 0.3.1
*/ */
public final class Link { public final class Link {
...@@ -59,5 +59,6 @@ public final class Link { ...@@ -59,5 +59,6 @@ public final class Link {
/** /**
* Private constructor. * Private constructor.
*/ */
private Link() {} private Link() {
}
} }
...@@ -43,5 +43,6 @@ public final class Sign { ...@@ -43,5 +43,6 @@ public final class Sign {
/** /**
* Private constructor. * Private constructor.
*/ */
private Sign() {} private Sign() {
}
} }
...@@ -48,5 +48,6 @@ public final class Skin { ...@@ -48,5 +48,6 @@ public final class Skin {
/** /**
* Private constructor. * Private constructor.
*/ */
private Skin() {} private Skin() {
}
} }
...@@ -26,7 +26,7 @@ import java.util.List; ...@@ -26,7 +26,7 @@ import java.util.List;
* Sitemap. * Sitemap.
* *
* <p> * <p>
* See <a href="http://www.sitemaps.org/protocol.php">Sitemap XML format</a> * See <a href="http://www.sitemaps.org/protocol.php">Sitemap XML format</a>
* for more details. * for more details.
* </p> * </p>
* *
...@@ -59,7 +59,7 @@ public final class Sitemap { ...@@ -59,7 +59,7 @@ public final class Sitemap {
/** /**
* Adds the specified url. * Adds the specified url.
* *
* @param url the specified url * @param url the specified url
*/ */
public void addURL(final URL url) { public void addURL(final URL url) {
......
...@@ -24,8 +24,8 @@ import org.b3log.latke.Latkes; ...@@ -24,8 +24,8 @@ import org.b3log.latke.Latkes;
import org.b3log.latke.ioc.Inject; import org.b3log.latke.ioc.Inject;
import org.b3log.latke.model.Pagination; import org.b3log.latke.model.Pagination;
import org.b3log.latke.model.User; import org.b3log.latke.model.User;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.HttpMethod; import org.b3log.latke.servlet.HttpMethod;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.annotation.RequestProcessing; import org.b3log.latke.servlet.annotation.RequestProcessing;
import org.b3log.latke.servlet.annotation.RequestProcessor; import org.b3log.latke.servlet.annotation.RequestProcessor;
import org.b3log.latke.servlet.renderer.JsonRenderer; import org.b3log.latke.servlet.renderer.JsonRenderer;
......
...@@ -20,8 +20,8 @@ package org.b3log.solo.processor; ...@@ -20,8 +20,8 @@ package org.b3log.solo.processor;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.b3log.latke.logging.Level; import org.b3log.latke.logging.Level;
import org.b3log.latke.logging.Logger; import org.b3log.latke.logging.Logger;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.HttpMethod; import org.b3log.latke.servlet.HttpMethod;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.annotation.RequestProcessing; import org.b3log.latke.servlet.annotation.RequestProcessing;
import org.b3log.latke.servlet.annotation.RequestProcessor; import org.b3log.latke.servlet.annotation.RequestProcessor;
import org.b3log.latke.servlet.renderer.PngRenderer; import org.b3log.latke.servlet.renderer.PngRenderer;
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
*/ */
package org.b3log.solo.processor; package org.b3log.solo.processor;
import org.apache.commons.lang.StringUtils;
import org.b3log.latke.Keys; import org.b3log.latke.Keys;
import org.b3log.latke.Latkes; import org.b3log.latke.Latkes;
import org.b3log.latke.ioc.Inject; import org.b3log.latke.ioc.Inject;
...@@ -32,7 +31,6 @@ import org.b3log.latke.servlet.annotation.RequestProcessing; ...@@ -32,7 +31,6 @@ import org.b3log.latke.servlet.annotation.RequestProcessing;
import org.b3log.latke.servlet.annotation.RequestProcessor; import org.b3log.latke.servlet.annotation.RequestProcessor;
import org.b3log.latke.servlet.renderer.AbstractFreeMarkerRenderer; import org.b3log.latke.servlet.renderer.AbstractFreeMarkerRenderer;
import org.b3log.latke.util.Paginator; import org.b3log.latke.util.Paginator;
import org.b3log.latke.util.Requests;
import org.b3log.latke.util.URLs; import org.b3log.latke.util.URLs;
import org.b3log.solo.model.Article; import org.b3log.solo.model.Article;
import org.b3log.solo.model.Category; import org.b3log.solo.model.Category;
......
...@@ -24,8 +24,8 @@ import org.b3log.latke.logging.Level; ...@@ -24,8 +24,8 @@ import org.b3log.latke.logging.Level;
import org.b3log.latke.logging.Logger; import org.b3log.latke.logging.Logger;
import org.b3log.latke.model.User; import org.b3log.latke.model.User;
import org.b3log.latke.service.LangPropsService; import org.b3log.latke.service.LangPropsService;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.HttpMethod; import org.b3log.latke.servlet.HttpMethod;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.annotation.RequestProcessing; import org.b3log.latke.servlet.annotation.RequestProcessing;
import org.b3log.latke.servlet.annotation.RequestProcessor; import org.b3log.latke.servlet.annotation.RequestProcessor;
import org.b3log.latke.servlet.renderer.JsonRenderer; import org.b3log.latke.servlet.renderer.JsonRenderer;
......
...@@ -22,8 +22,8 @@ import org.b3log.latke.ioc.Inject; ...@@ -22,8 +22,8 @@ import org.b3log.latke.ioc.Inject;
import org.b3log.latke.logging.Level; import org.b3log.latke.logging.Level;
import org.b3log.latke.logging.Logger; import org.b3log.latke.logging.Logger;
import org.b3log.latke.service.LangPropsService; import org.b3log.latke.service.LangPropsService;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.HttpMethod; import org.b3log.latke.servlet.HttpMethod;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.annotation.RequestProcessing; import org.b3log.latke.servlet.annotation.RequestProcessing;
import org.b3log.latke.servlet.annotation.RequestProcessor; import org.b3log.latke.servlet.annotation.RequestProcessor;
import org.b3log.latke.servlet.renderer.AbstractFreeMarkerRenderer; import org.b3log.latke.servlet.renderer.AbstractFreeMarkerRenderer;
......
...@@ -25,8 +25,8 @@ import org.b3log.latke.logging.Logger; ...@@ -25,8 +25,8 @@ import org.b3log.latke.logging.Logger;
import org.b3log.latke.model.User; import org.b3log.latke.model.User;
import org.b3log.latke.repository.*; import org.b3log.latke.repository.*;
import org.b3log.latke.service.ServiceException; import org.b3log.latke.service.ServiceException;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.HttpMethod; import org.b3log.latke.servlet.HttpMethod;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.annotation.RequestProcessing; import org.b3log.latke.servlet.annotation.RequestProcessing;
import org.b3log.latke.servlet.annotation.RequestProcessor; import org.b3log.latke.servlet.annotation.RequestProcessor;
import org.b3log.latke.servlet.renderer.AtomRenderer; import org.b3log.latke.servlet.renderer.AtomRenderer;
......
...@@ -25,8 +25,8 @@ import org.b3log.latke.logging.Level; ...@@ -25,8 +25,8 @@ import org.b3log.latke.logging.Level;
import org.b3log.latke.logging.Logger; import org.b3log.latke.logging.Logger;
import org.b3log.latke.model.User; import org.b3log.latke.model.User;
import org.b3log.latke.service.LangPropsService; import org.b3log.latke.service.LangPropsService;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.HttpMethod; import org.b3log.latke.servlet.HttpMethod;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.annotation.RequestProcessing; import org.b3log.latke.servlet.annotation.RequestProcessing;
import org.b3log.latke.servlet.annotation.RequestProcessor; import org.b3log.latke.servlet.annotation.RequestProcessor;
import org.b3log.latke.servlet.renderer.AbstractFreeMarkerRenderer; import org.b3log.latke.servlet.renderer.AbstractFreeMarkerRenderer;
......
...@@ -21,8 +21,8 @@ import org.apache.commons.io.IOUtils; ...@@ -21,8 +21,8 @@ import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.math.RandomUtils; import org.apache.commons.lang.math.RandomUtils;
import org.b3log.latke.logging.Level; import org.b3log.latke.logging.Level;
import org.b3log.latke.logging.Logger; import org.b3log.latke.logging.Logger;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.HttpMethod; import org.b3log.latke.servlet.HttpMethod;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.annotation.RequestProcessing; import org.b3log.latke.servlet.annotation.RequestProcessing;
import org.b3log.latke.servlet.annotation.RequestProcessor; import org.b3log.latke.servlet.annotation.RequestProcessor;
import org.b3log.latke.servlet.renderer.JsonRenderer; import org.b3log.latke.servlet.renderer.JsonRenderer;
......
...@@ -31,8 +31,8 @@ import org.b3log.latke.repository.RepositoryException; ...@@ -31,8 +31,8 @@ import org.b3log.latke.repository.RepositoryException;
import org.b3log.latke.repository.Transaction; import org.b3log.latke.repository.Transaction;
import org.b3log.latke.service.LangPropsService; import org.b3log.latke.service.LangPropsService;
import org.b3log.latke.service.ServiceException; import org.b3log.latke.service.ServiceException;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.HttpMethod; import org.b3log.latke.servlet.HttpMethod;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.annotation.RequestProcessing; import org.b3log.latke.servlet.annotation.RequestProcessing;
import org.b3log.latke.servlet.annotation.RequestProcessor; import org.b3log.latke.servlet.annotation.RequestProcessor;
import org.b3log.latke.servlet.renderer.AbstractFreeMarkerRenderer; import org.b3log.latke.servlet.renderer.AbstractFreeMarkerRenderer;
......
...@@ -28,8 +28,8 @@ import org.b3log.latke.logging.Level; ...@@ -28,8 +28,8 @@ import org.b3log.latke.logging.Level;
import org.b3log.latke.logging.Logger; import org.b3log.latke.logging.Logger;
import org.b3log.latke.model.Role; import org.b3log.latke.model.Role;
import org.b3log.latke.model.User; import org.b3log.latke.model.User;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.HttpMethod; import org.b3log.latke.servlet.HttpMethod;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.annotation.RequestProcessing; import org.b3log.latke.servlet.annotation.RequestProcessing;
import org.b3log.latke.servlet.annotation.RequestProcessor; import org.b3log.latke.servlet.annotation.RequestProcessor;
import org.b3log.latke.util.CollectionUtils; import org.b3log.latke.util.CollectionUtils;
......
...@@ -22,8 +22,8 @@ import org.b3log.latke.ioc.Inject; ...@@ -22,8 +22,8 @@ import org.b3log.latke.ioc.Inject;
import org.b3log.latke.logging.Level; import org.b3log.latke.logging.Level;
import org.b3log.latke.logging.Logger; import org.b3log.latke.logging.Logger;
import org.b3log.latke.service.LangPropsService; import org.b3log.latke.service.LangPropsService;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.HttpMethod; import org.b3log.latke.servlet.HttpMethod;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.annotation.RequestProcessing; import org.b3log.latke.servlet.annotation.RequestProcessing;
import org.b3log.latke.servlet.annotation.RequestProcessor; import org.b3log.latke.servlet.annotation.RequestProcessor;
import org.b3log.latke.servlet.renderer.AbstractFreeMarkerRenderer; import org.b3log.latke.servlet.renderer.AbstractFreeMarkerRenderer;
......
...@@ -25,8 +25,8 @@ import org.b3log.latke.logging.Level; ...@@ -25,8 +25,8 @@ import org.b3log.latke.logging.Level;
import org.b3log.latke.logging.Logger; import org.b3log.latke.logging.Logger;
import org.b3log.latke.model.Pagination; import org.b3log.latke.model.Pagination;
import org.b3log.latke.service.LangPropsService; import org.b3log.latke.service.LangPropsService;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.HttpMethod; import org.b3log.latke.servlet.HttpMethod;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.annotation.RequestProcessing; import org.b3log.latke.servlet.annotation.RequestProcessing;
import org.b3log.latke.servlet.annotation.RequestProcessor; import org.b3log.latke.servlet.annotation.RequestProcessor;
import org.b3log.latke.servlet.renderer.AbstractFreeMarkerRenderer; import org.b3log.latke.servlet.renderer.AbstractFreeMarkerRenderer;
......
...@@ -28,8 +28,8 @@ import org.b3log.latke.repository.FilterOperator; ...@@ -28,8 +28,8 @@ import org.b3log.latke.repository.FilterOperator;
import org.b3log.latke.repository.PropertyFilter; import org.b3log.latke.repository.PropertyFilter;
import org.b3log.latke.repository.Query; import org.b3log.latke.repository.Query;
import org.b3log.latke.repository.SortDirection; import org.b3log.latke.repository.SortDirection;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.HttpMethod; import org.b3log.latke.servlet.HttpMethod;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.annotation.RequestProcessing; import org.b3log.latke.servlet.annotation.RequestProcessing;
import org.b3log.latke.servlet.annotation.RequestProcessor; import org.b3log.latke.servlet.annotation.RequestProcessor;
import org.b3log.latke.servlet.renderer.TextXmlRenderer; import org.b3log.latke.servlet.renderer.TextXmlRenderer;
......
...@@ -69,7 +69,7 @@ import java.util.*; ...@@ -69,7 +69,7 @@ import java.util.*;
* @since 0.4.1 * @since 0.4.1
*/ */
@Singleton @Singleton
@Before( ConsoleAuthAdvice.class) @Before(ConsoleAuthAdvice.class)
public class AdminConsole { public class AdminConsole {
/** /**
...@@ -130,7 +130,7 @@ public class AdminConsole { ...@@ -130,7 +130,7 @@ public class AdminConsole {
* *
* @param context the specified context * @param context the specified context
*/ */
@Before( ConsoleAuthAdvice.class) @Before(ConsoleAuthAdvice.class)
public void showAdminIndex(final RequestContext context) { public void showAdminIndex(final RequestContext context) {
final HttpServletRequest request = context.getRequest(); final HttpServletRequest request = context.getRequest();
final HttpServletResponse response = context.getResponse(); final HttpServletResponse response = context.getResponse();
......
...@@ -56,7 +56,7 @@ import java.util.stream.Collectors; ...@@ -56,7 +56,7 @@ import java.util.stream.Collectors;
* @since 0.4.0 * @since 0.4.0
*/ */
@Singleton @Singleton
@Before( ConsoleAuthAdvice.class) @Before(ConsoleAuthAdvice.class)
public class ArticleConsole { public class ArticleConsole {
/** /**
......
...@@ -47,7 +47,7 @@ import java.util.Map; ...@@ -47,7 +47,7 @@ import java.util.Map;
* @since 0.4.0 * @since 0.4.0
*/ */
@RequestProcessor @RequestProcessor
@Before( ConsoleAdminAuthAdvice.class) @Before(ConsoleAdminAuthAdvice.class)
public class PluginConsole { public class PluginConsole {
/** /**
......
...@@ -24,8 +24,8 @@ import org.b3log.latke.logging.Level; ...@@ -24,8 +24,8 @@ import org.b3log.latke.logging.Level;
import org.b3log.latke.logging.Logger; import org.b3log.latke.logging.Logger;
import org.b3log.latke.service.LangPropsService; import org.b3log.latke.service.LangPropsService;
import org.b3log.latke.service.ServiceException; import org.b3log.latke.service.ServiceException;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.HttpMethod; import org.b3log.latke.servlet.HttpMethod;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.annotation.Before; import org.b3log.latke.servlet.annotation.Before;
import org.b3log.latke.servlet.annotation.RequestProcessing; import org.b3log.latke.servlet.annotation.RequestProcessing;
import org.b3log.latke.servlet.annotation.RequestProcessor; import org.b3log.latke.servlet.annotation.RequestProcessor;
...@@ -52,7 +52,7 @@ import java.util.Arrays; ...@@ -52,7 +52,7 @@ import java.util.Arrays;
* @since 0.4.0 * @since 0.4.0
*/ */
@RequestProcessor @RequestProcessor
@Before( ConsoleAdminAuthAdvice.class) @Before(ConsoleAdminAuthAdvice.class)
public class PreferenceConsole { public class PreferenceConsole {
/** /**
......
...@@ -23,8 +23,8 @@ import org.b3log.latke.logging.Level; ...@@ -23,8 +23,8 @@ import org.b3log.latke.logging.Level;
import org.b3log.latke.logging.Logger; import org.b3log.latke.logging.Logger;
import org.b3log.latke.repository.Query; import org.b3log.latke.repository.Query;
import org.b3log.latke.repository.annotation.Transactional; import org.b3log.latke.repository.annotation.Transactional;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.HttpMethod; import org.b3log.latke.servlet.HttpMethod;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.annotation.Before; import org.b3log.latke.servlet.annotation.Before;
import org.b3log.latke.servlet.annotation.RequestProcessing; import org.b3log.latke.servlet.annotation.RequestProcessing;
import org.b3log.latke.servlet.annotation.RequestProcessor; import org.b3log.latke.servlet.annotation.RequestProcessor;
...@@ -55,7 +55,7 @@ import java.util.List; ...@@ -55,7 +55,7 @@ import java.util.List;
* @since 0.3.1 * @since 0.3.1
*/ */
@RequestProcessor @RequestProcessor
@Before( ConsoleAuthAdvice.class) @Before(ConsoleAuthAdvice.class)
public class RepairConsole { public class RepairConsole {
/** /**
......
...@@ -22,8 +22,8 @@ import org.b3log.latke.ioc.Inject; ...@@ -22,8 +22,8 @@ import org.b3log.latke.ioc.Inject;
import org.b3log.latke.logging.Level; import org.b3log.latke.logging.Level;
import org.b3log.latke.logging.Logger; import org.b3log.latke.logging.Logger;
import org.b3log.latke.service.LangPropsService; import org.b3log.latke.service.LangPropsService;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.HttpMethod; import org.b3log.latke.servlet.HttpMethod;
import org.b3log.latke.servlet.RequestContext;
import org.b3log.latke.servlet.annotation.Before; import org.b3log.latke.servlet.annotation.Before;
import org.b3log.latke.servlet.annotation.RequestProcessing; import org.b3log.latke.servlet.annotation.RequestProcessing;
import org.b3log.latke.servlet.annotation.RequestProcessor; import org.b3log.latke.servlet.annotation.RequestProcessor;
...@@ -34,8 +34,6 @@ import org.b3log.solo.service.TagMgmtService; ...@@ -34,8 +34,6 @@ import org.b3log.solo.service.TagMgmtService;
import org.b3log.solo.service.TagQueryService; import org.b3log.solo.service.TagQueryService;
import org.json.JSONObject; import org.json.JSONObject;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -90,7 +88,7 @@ public class TagConsole { ...@@ -90,7 +88,7 @@ public class TagConsole {
* @param context the specified http request context * @param context the specified http request context
*/ */
@RequestProcessing(value = "/console/tags", method = HttpMethod.GET) @RequestProcessing(value = "/console/tags", method = HttpMethod.GET)
@Before( ConsoleAuthAdvice.class) @Before(ConsoleAuthAdvice.class)
public void getTags(final RequestContext context) { public void getTags(final RequestContext context) {
final JsonRenderer renderer = new JsonRenderer(); final JsonRenderer renderer = new JsonRenderer();
context.setRenderer(renderer); context.setRenderer(renderer);
...@@ -125,7 +123,7 @@ public class TagConsole { ...@@ -125,7 +123,7 @@ public class TagConsole {
* @param context the specified http request context * @param context the specified http request context
*/ */
@RequestProcessing(value = "/console/tag/unused", method = HttpMethod.GET) @RequestProcessing(value = "/console/tag/unused", method = HttpMethod.GET)
@Before( ConsoleAdminAuthAdvice.class) @Before(ConsoleAdminAuthAdvice.class)
public void getUnusedTags(final RequestContext context) { public void getUnusedTags(final RequestContext context) {
final JsonRenderer renderer = new JsonRenderer(); final JsonRenderer renderer = new JsonRenderer();
context.setRenderer(renderer); context.setRenderer(renderer);
...@@ -166,10 +164,10 @@ public class TagConsole { ...@@ -166,10 +164,10 @@ public class TagConsole {
* </pre> * </pre>
* </p> * </p>
* *
* @param context the specified http request context * @param context the specified http request context
*/ */
@RequestProcessing(value = "/console/tag/unused", method = HttpMethod.DELETE) @RequestProcessing(value = "/console/tag/unused", method = HttpMethod.DELETE)
@Before( ConsoleAdminAuthAdvice.class) @Before(ConsoleAdminAuthAdvice.class)
public void removeUnusedTags(final RequestContext context) { public void removeUnusedTags(final RequestContext context) {
final JsonRenderer renderer = new JsonRenderer(); final JsonRenderer renderer = new JsonRenderer();
context.setRenderer(renderer); context.setRenderer(renderer);
......
...@@ -52,7 +52,7 @@ public class ArchiveDateQueryService { ...@@ -52,7 +52,7 @@ public class ArchiveDateQueryService {
/** /**
* Gets all archive dates. * Gets all archive dates.
* *
* @return a list of archive dates, returns an empty list if not found * @return a list of archive dates, returns an empty list if not found
* @throws ServiceException service exception * @throws ServiceException service exception
*/ */
...@@ -67,7 +67,7 @@ public class ArchiveDateQueryService { ...@@ -67,7 +67,7 @@ public class ArchiveDateQueryService {
/** /**
* Gets an archive date by the specified archive date string. * Gets an archive date by the specified archive date string.
* *
* @param archiveDateString the specified archive date string (yyyy/MM) * @param archiveDateString the specified archive date string (yyyy/MM)
* @return for example, * @return for example,
* <pre> * <pre>
...@@ -102,7 +102,7 @@ public class ArchiveDateQueryService { ...@@ -102,7 +102,7 @@ public class ArchiveDateQueryService {
/** /**
* Sets archive date repository with the specified archive date repository. * Sets archive date repository with the specified archive date repository.
* *
* @param archiveDateRepository the specified archive date repository * @param archiveDateRepository the specified archive date repository
*/ */
public void setArchiveDateRepository(final ArchiveDateRepository archiveDateRepository) { public void setArchiveDateRepository(final ArchiveDateRepository archiveDateRepository) {
......
...@@ -56,7 +56,7 @@ public class LinkMgmtService { ...@@ -56,7 +56,7 @@ public class LinkMgmtService {
* @throws ServiceException service exception * @throws ServiceException service exception
*/ */
public void removeLink(final String linkId) public void removeLink(final String linkId)
throws ServiceException { throws ServiceException {
final Transaction transaction = linkRepository.beginTransaction(); final Transaction transaction = linkRepository.beginTransaction();
try { try {
...@@ -77,19 +77,19 @@ public class LinkMgmtService { ...@@ -77,19 +77,19 @@ public class LinkMgmtService {
* Updates a link by the specified request json object. * Updates a link by the specified request json object.
* *
* @param requestJSONObject the specified request json object, for example, * @param requestJSONObject the specified request json object, for example,
* <pre> * <pre>
* { * {
* "link": { * "link": {
* "oId": "", * "oId": "",
* "linkTitle": "", * "linkTitle": "",
* "linkAddress": "" * "linkAddress": ""
* } * }
* }, see {@link Link} for more details * }, see {@link Link} for more details
* </pre> * </pre>
* @throws ServiceException service exception * @throws ServiceException service exception
*/ */
public void updateLink(final JSONObject requestJSONObject) public void updateLink(final JSONObject requestJSONObject)
throws ServiceException { throws ServiceException {
final Transaction transaction = linkRepository.beginTransaction(); final Transaction transaction = linkRepository.beginTransaction();
try { try {
...@@ -114,15 +114,15 @@ public class LinkMgmtService { ...@@ -114,15 +114,15 @@ public class LinkMgmtService {
} }
/** /**
* Changes the order of a link specified by the given link id with the * Changes the order of a link specified by the given link id with the
* specified direction. * specified direction.
* *
* @param linkId the given link id * @param linkId the given link id
* @param direction the specified direction, "up"/"down" * @param direction the specified direction, "up"/"down"
* @throws ServiceException service exception * @throws ServiceException service exception
*/ */
public void changeOrder(final String linkId, final String direction) public void changeOrder(final String linkId, final String direction)
throws ServiceException { throws ServiceException {
final Transaction transaction = linkRepository.beginTransaction(); final Transaction transaction = linkRepository.beginTransaction();
try { try {
...@@ -167,22 +167,22 @@ public class LinkMgmtService { ...@@ -167,22 +167,22 @@ public class LinkMgmtService {
/** /**
* Adds a link with the specified request json object. * Adds a link with the specified request json object.
* *
* @param requestJSONObject the specified request json object, for example, * @param requestJSONObject the specified request json object, for example,
* <pre> * <pre>
* { * {
* "link": { * "link": {
* "linkTitle": "", * "linkTitle": "",
* "linkAddress": "", * "linkAddress": "",
* "linkDescription": "" // optional * "linkDescription": "" // optional
* } * }
* }, see {@link Link} for more details * }, see {@link Link} for more details
* </pre> * </pre>
* @return generated link id * @return generated link id
* @throws ServiceException service exception * @throws ServiceException service exception
*/ */
public String addLink(final JSONObject requestJSONObject) public String addLink(final JSONObject requestJSONObject)
throws ServiceException { throws ServiceException {
final Transaction transaction = linkRepository.beginTransaction(); final Transaction transaction = linkRepository.beginTransaction();
try { try {
...@@ -207,7 +207,7 @@ public class LinkMgmtService { ...@@ -207,7 +207,7 @@ public class LinkMgmtService {
/** /**
* Sets the link repository with the specified link repository. * Sets the link repository with the specified link repository.
* *
* @param linkRepository the specified link repository * @param linkRepository the specified link repository
*/ */
public void setLinkRepository(final LinkRepository linkRepository) { public void setLinkRepository(final LinkRepository linkRepository) {
......
...@@ -59,13 +59,13 @@ public class LinkQueryService { ...@@ -59,13 +59,13 @@ public class LinkQueryService {
* Gets links by the specified request json object. * Gets links by the specified request json object.
* *
* @param requestJSONObject the specified request json object, for example, * @param requestJSONObject the specified request json object, for example,
* <pre> * <pre>
* { * {
* "paginationCurrentPageNum": 1, * "paginationCurrentPageNum": 1,
* "paginationPageSize": 20, * "paginationPageSize": 20,
* "paginationWindowSize": 10 * "paginationWindowSize": 10
* }, see {@link Pagination} for more details * }, see {@link Pagination} for more details
* </pre> * </pre>
* @return for example, * @return for example,
* <pre> * <pre>
* { * {
...@@ -93,7 +93,7 @@ public class LinkQueryService { ...@@ -93,7 +93,7 @@ public class LinkQueryService {
final int windowSize = requestJSONObject.getInt(Pagination.PAGINATION_WINDOW_SIZE); final int windowSize = requestJSONObject.getInt(Pagination.PAGINATION_WINDOW_SIZE);
final Query query = new Query().setCurrentPageNum(currentPageNum).setPageSize(pageSize).addSort(Link.LINK_ORDER, final Query query = new Query().setCurrentPageNum(currentPageNum).setPageSize(pageSize).addSort(Link.LINK_ORDER,
SortDirection.ASCENDING); SortDirection.ASCENDING);
final JSONObject result = linkRepository.get(query); final JSONObject result = linkRepository.get(query);
final int pageCount = result.getJSONObject(Pagination.PAGINATION).getInt(Pagination.PAGINATION_PAGE_COUNT); final int pageCount = result.getJSONObject(Pagination.PAGINATION).getInt(Pagination.PAGINATION_PAGE_COUNT);
...@@ -154,7 +154,7 @@ public class LinkQueryService { ...@@ -154,7 +154,7 @@ public class LinkQueryService {
/** /**
* Sets the link repository with the specified link repository. * Sets the link repository with the specified link repository.
* *
* @param linkRepository the specified link repository * @param linkRepository the specified link repository
*/ */
public void setLinkRepository(final LinkRepository linkRepository) { public void setLinkRepository(final LinkRepository linkRepository) {
......
...@@ -99,15 +99,15 @@ public class PageQueryService { ...@@ -99,15 +99,15 @@ public class PageQueryService {
/** /**
* Gets pages by the specified request json object. * Gets pages by the specified request json object.
* *
* @param requestJSONObject the specified request json object, for example, * @param requestJSONObject the specified request json object, for example,
* <pre> * <pre>
* { * {
* "paginationCurrentPageNum": 1, * "paginationCurrentPageNum": 1,
* "paginationPageSize": 20, * "paginationPageSize": 20,
* "paginationWindowSize": 10 * "paginationWindowSize": 10
* }, see {@link Pagination} for more details * }, see {@link Pagination} for more details
* </pre> * </pre>
* @return for example, * @return for example,
* <pre> * <pre>
* { * {
...@@ -139,7 +139,7 @@ public class PageQueryService { ...@@ -139,7 +139,7 @@ public class PageQueryService {
final int windowSize = requestJSONObject.getInt(Pagination.PAGINATION_WINDOW_SIZE); final int windowSize = requestJSONObject.getInt(Pagination.PAGINATION_WINDOW_SIZE);
final Query query = new Query().setCurrentPageNum(currentPageNum).setPageSize(pageSize).addSort(Page.PAGE_ORDER, SortDirection.ASCENDING).setPageCount( final Query query = new Query().setCurrentPageNum(currentPageNum).setPageSize(pageSize).addSort(Page.PAGE_ORDER, SortDirection.ASCENDING).setPageCount(
1); 1);
final JSONObject result = pageRepository.get(query); final JSONObject result = pageRepository.get(query);
final int pageCount = result.getJSONObject(Pagination.PAGINATION).getInt(Pagination.PAGINATION_PAGE_COUNT); final int pageCount = result.getJSONObject(Pagination.PAGINATION).getInt(Pagination.PAGINATION_PAGE_COUNT);
...@@ -170,7 +170,7 @@ public class PageQueryService { ...@@ -170,7 +170,7 @@ public class PageQueryService {
/** /**
* Set the page repository with the specified page repository. * Set the page repository with the specified page repository.
* *
* @param pageRepository the specified page repository * @param pageRepository the specified page repository
*/ */
public void setPageRepository(final PageRepository pageRepository) { public void setPageRepository(final PageRepository pageRepository) {
......
...@@ -55,7 +55,7 @@ public class PluginQueryService { ...@@ -55,7 +55,7 @@ public class PluginQueryService {
*/ */
@Inject @Inject
private PluginRepository pluginRepository; private PluginRepository pluginRepository;
/** /**
* Plugin manager. * Plugin manager.
*/ */
...@@ -66,13 +66,13 @@ public class PluginQueryService { ...@@ -66,13 +66,13 @@ public class PluginQueryService {
* Gets plugins by the specified request json object. * Gets plugins by the specified request json object.
* *
* @param requestJSONObject the specified request json object, for example, * @param requestJSONObject the specified request json object, for example,
* <pre> * <pre>
* { * {
* "paginationCurrentPageNum": 1, * "paginationCurrentPageNum": 1,
* "paginationPageSize": 20, * "paginationPageSize": 20,
* "paginationWindowSize": 10, * "paginationWindowSize": 10,
* }, see {@link Pagination} for more details * }, see {@link Pagination} for more details
* </pre> * </pre>
* @return for example, * @return for example,
* <pre> * <pre>
* { * {
...@@ -92,7 +92,7 @@ public class PluginQueryService { ...@@ -92,7 +92,7 @@ public class PluginQueryService {
* @see Pagination * @see Pagination
*/ */
public JSONObject getPlugins(final JSONObject requestJSONObject) public JSONObject getPlugins(final JSONObject requestJSONObject)
throws ServiceException { throws ServiceException {
final JSONObject ret = new JSONObject(); final JSONObject ret = new JSONObject();
try { try {
...@@ -134,11 +134,11 @@ public class PluginQueryService { ...@@ -134,11 +134,11 @@ public class PluginQueryService {
/** /**
* get the setting(json formatter) of the plugin by the specified pluginoId. * get the setting(json formatter) of the plugin by the specified pluginoId.
* *
* @param pluginId the specified pluginId * @param pluginId the specified pluginId
* @return the {@link AbstractPlugin} * @return the {@link AbstractPlugin}
* @throws ServiceException service exception * @throws ServiceException service exception
* @throws JSONException json exception * @throws JSONException json exception
*/ */
public String getPluginSetting(final String pluginId) throws ServiceException, JSONException { public String getPluginSetting(final String pluginId) throws ServiceException, JSONException {
...@@ -162,7 +162,7 @@ public class PluginQueryService { ...@@ -162,7 +162,7 @@ public class PluginQueryService {
/** /**
* Sets the plugin repository with the specified plugin repository. * Sets the plugin repository with the specified plugin repository.
* *
* @param pluginRepository the specified plugin repository * @param pluginRepository the specified plugin repository
*/ */
public void setPluginRepository(final PluginRepository pluginRepository) { public void setPluginRepository(final PluginRepository pluginRepository) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment