package refactoring

This commit is contained in:
Athou
2013-03-23 16:17:19 +01:00
parent 7067646b2d
commit 4df1e7f722
36 changed files with 60 additions and 56 deletions

View File

@@ -12,11 +12,11 @@ import com.commafeed.backend.dao.FeedCategoryService;
import com.commafeed.backend.dao.FeedService; import com.commafeed.backend.dao.FeedService;
import com.commafeed.backend.dao.FeedSubscriptionService; import com.commafeed.backend.dao.FeedSubscriptionService;
import com.commafeed.backend.dao.UserService; import com.commafeed.backend.dao.UserService;
import com.commafeed.backend.model.Feed;
import com.commafeed.backend.model.FeedCategory;
import com.commafeed.backend.model.FeedSubscription;
import com.commafeed.backend.model.User;
import com.commafeed.backend.security.PasswordEncryptionService; import com.commafeed.backend.security.PasswordEncryptionService;
import com.commafeed.model.Feed;
import com.commafeed.model.FeedCategory;
import com.commafeed.model.FeedSubscription;
import com.commafeed.model.User;
@Startup @Startup
@Singleton @Singleton

View File

@@ -4,9 +4,9 @@ import java.util.List;
import javax.ejb.Stateless; import javax.ejb.Stateless;
import com.commafeed.backend.model.FeedCategory;
import com.commafeed.backend.model.User;
import com.commafeed.frontend.utils.ModelFactory.MF; import com.commafeed.frontend.utils.ModelFactory.MF;
import com.commafeed.model.FeedCategory;
import com.commafeed.model.User;
@Stateless @Stateless
public class FeedCategoryService extends GenericDAO<FeedCategory, Long> { public class FeedCategoryService extends GenericDAO<FeedCategory, Long> {

View File

@@ -8,10 +8,10 @@ import javax.ejb.Stateless;
import javax.inject.Inject; import javax.inject.Inject;
import javax.persistence.TypedQuery; import javax.persistence.TypedQuery;
import com.commafeed.backend.model.Feed;
import com.commafeed.backend.model.FeedEntry;
import com.commafeed.backend.model.User;
import com.commafeed.frontend.utils.ModelFactory.MF; import com.commafeed.frontend.utils.ModelFactory.MF;
import com.commafeed.model.Feed;
import com.commafeed.model.FeedEntry;
import com.commafeed.model.User;
import com.google.common.collect.Iterables; import com.google.common.collect.Iterables;
@Stateless @Stateless

View File

@@ -2,7 +2,7 @@ package com.commafeed.backend.dao;
import javax.ejb.Stateless; import javax.ejb.Stateless;
import com.commafeed.model.FeedEntryStatus; import com.commafeed.backend.model.FeedEntryStatus;
@Stateless @Stateless
public class FeedEntryStatusService extends GenericDAO<FeedEntryStatus, Long> { public class FeedEntryStatusService extends GenericDAO<FeedEntryStatus, Long> {

View File

@@ -2,7 +2,7 @@ package com.commafeed.backend.dao;
import javax.ejb.Stateless; import javax.ejb.Stateless;
import com.commafeed.model.Feed; import com.commafeed.backend.model.Feed;
@Stateless @Stateless
public class FeedService extends GenericDAO<Feed, Long> { public class FeedService extends GenericDAO<Feed, Long> {

View File

@@ -8,10 +8,10 @@ import javax.persistence.TypedQuery;
import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.ObjectUtils;
import com.commafeed.backend.model.FeedCategory;
import com.commafeed.backend.model.FeedSubscription;
import com.commafeed.backend.model.User;
import com.commafeed.frontend.utils.ModelFactory.MF; import com.commafeed.frontend.utils.ModelFactory.MF;
import com.commafeed.model.FeedCategory;
import com.commafeed.model.FeedSubscription;
import com.commafeed.model.User;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.uaihebert.factory.EasyCriteriaFactory; import com.uaihebert.factory.EasyCriteriaFactory;
import com.uaihebert.model.EasyCriteria; import com.uaihebert.model.EasyCriteria;

View File

@@ -5,9 +5,9 @@ import java.util.List;
import javax.ejb.Stateless; import javax.ejb.Stateless;
import javax.inject.Inject; import javax.inject.Inject;
import com.commafeed.backend.model.User;
import com.commafeed.backend.security.PasswordEncryptionService; import com.commafeed.backend.security.PasswordEncryptionService;
import com.commafeed.frontend.utils.ModelFactory.MF; import com.commafeed.frontend.utils.ModelFactory.MF;
import com.commafeed.model.User;
import com.google.common.collect.Iterables; import com.google.common.collect.Iterables;
@Stateless @Stateless

View File

@@ -21,7 +21,7 @@ import org.apache.http.util.EntityUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.commafeed.model.Feed; import com.commafeed.backend.model.Feed;
@Singleton @Singleton
public class FeedFetcher { public class FeedFetcher {

View File

@@ -11,8 +11,8 @@ import org.apache.commons.lang.SystemUtils;
import org.jsoup.Jsoup; import org.jsoup.Jsoup;
import org.jsoup.nodes.Document; import org.jsoup.nodes.Document;
import com.commafeed.model.Feed; import com.commafeed.backend.model.Feed;
import com.commafeed.model.FeedEntry; import com.commafeed.backend.model.FeedEntry;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.collect.Collections2; import com.google.common.collect.Collections2;
import com.sun.syndication.feed.synd.SyndContent; import com.sun.syndication.feed.synd.SyndContent;

View File

@@ -9,7 +9,7 @@ import javax.inject.Inject;
import com.commafeed.backend.dao.FeedEntryService; import com.commafeed.backend.dao.FeedEntryService;
import com.commafeed.backend.dao.FeedService; import com.commafeed.backend.dao.FeedService;
import com.commafeed.model.Feed; import com.commafeed.backend.model.Feed;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
@Singleton @Singleton

View File

@@ -1,4 +1,4 @@
package com.commafeed.model; package com.commafeed.backend.model;
import java.io.Serializable; import java.io.Serializable;

View File

@@ -1,4 +1,4 @@
package com.commafeed.model; package com.commafeed.backend.model;
import java.util.Date; import java.util.Date;
import java.util.Set; import java.util.Set;

View File

@@ -1,4 +1,4 @@
package com.commafeed.model; package com.commafeed.backend.model;
import java.util.Set; import java.util.Set;

View File

@@ -1,4 +1,4 @@
package com.commafeed.model; package com.commafeed.backend.model;
import java.util.Date; import java.util.Date;

View File

@@ -1,4 +1,4 @@
package com.commafeed.model; package com.commafeed.backend.model;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;

View File

@@ -1,4 +1,4 @@
package com.commafeed.model; package com.commafeed.backend.model;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;

View File

@@ -1,4 +1,4 @@
package com.commafeed.model; package com.commafeed.backend.model;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;

View File

@@ -1,4 +1,4 @@
package com.commafeed.model; package com.commafeed.backend.model;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;

View File

@@ -26,9 +26,9 @@ import org.apache.wicket.request.cycle.RequestCycle;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.commafeed.frontend.components.auth.LoginPage; import com.commafeed.frontend.pages.HomePage;
import com.commafeed.frontend.components.auth.LogoutPage; import com.commafeed.frontend.pages.LoginPage;
import com.commafeed.frontend.pages.home.HomePage; import com.commafeed.frontend.pages.LogoutPage;
import com.commafeed.frontend.utils.exception.DisplayExceptionPage; import com.commafeed.frontend.utils.exception.DisplayExceptionPage;
public class CommaFeedApplication extends AuthenticatedWebApplication { public class CommaFeedApplication extends AuthenticatedWebApplication {

View File

@@ -8,8 +8,8 @@ import org.apache.wicket.authroles.authorization.strategies.role.Roles;
import org.apache.wicket.request.Request; import org.apache.wicket.request.Request;
import com.commafeed.backend.dao.UserService; import com.commafeed.backend.dao.UserService;
import com.commafeed.frontend.components.auth.Role; import com.commafeed.backend.model.User;
import com.commafeed.model.User; import com.commafeed.frontend.pages.auth.Role;
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class CommaFeedSession extends AuthenticatedWebSession { public class CommaFeedSession extends AuthenticatedWebSession {

View File

@@ -1,4 +1,4 @@
package com.commafeed.frontend.rest.model; package com.commafeed.frontend.model;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;

View File

@@ -1,4 +1,4 @@
package com.commafeed.frontend.rest.model; package com.commafeed.frontend.model;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;

View File

@@ -1,4 +1,4 @@
package com.commafeed.frontend.rest.model; package com.commafeed.frontend.model;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;

View File

@@ -1,4 +1,4 @@
package com.commafeed.frontend.rest.model; package com.commafeed.frontend.model;
import java.io.Serializable; import java.io.Serializable;

View File

@@ -1,9 +1,9 @@
package com.commafeed.frontend.pages.home; package com.commafeed.frontend.pages;
import org.apache.wicket.authroles.authorization.strategies.role.annotations.AuthorizeInstantiation; import org.apache.wicket.authroles.authorization.strategies.role.annotations.AuthorizeInstantiation;
import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.WebPage;
import com.commafeed.frontend.components.auth.Role; import com.commafeed.frontend.pages.auth.Role;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@AuthorizeInstantiation(Role.USER) @AuthorizeInstantiation(Role.USER)

View File

@@ -1,7 +1,9 @@
package com.commafeed.frontend.components.auth; package com.commafeed.frontend.pages;
import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.WebPage;
import com.commafeed.frontend.pages.auth.LoginPanel;
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class LoginPage extends WebPage { public class LoginPage extends WebPage {

View File

@@ -1,4 +1,4 @@
package com.commafeed.frontend.components.auth; package com.commafeed.frontend.pages;
import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.WebPage;

View File

@@ -1,4 +1,4 @@
package com.commafeed.frontend.components.auth; package com.commafeed.frontend.pages.auth;
import org.apache.wicket.authroles.authentication.panel.SignInPanel; import org.apache.wicket.authroles.authentication.panel.SignInPanel;

View File

@@ -1,4 +1,4 @@
package com.commafeed.frontend.components.auth; package com.commafeed.frontend.pages.auth;
public class Role { public class Role {
public static final String USER = "user"; public static final String USER = "user";

View File

@@ -5,6 +5,8 @@ import java.util.Set;
import javax.ws.rs.ApplicationPath; import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application; import javax.ws.rs.core.Application;
import com.commafeed.frontend.rest.resources.EntriesREST;
import com.commafeed.frontend.rest.resources.SubscriptionsREST;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
@ApplicationPath("/rest") @ApplicationPath("/rest")

View File

@@ -1,4 +1,4 @@
package com.commafeed.frontend.rest; package com.commafeed.frontend.rest.resources;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import javax.inject.Inject; import javax.inject.Inject;
@@ -18,8 +18,8 @@ import com.commafeed.backend.dao.FeedCategoryService;
import com.commafeed.backend.dao.FeedEntryService; import com.commafeed.backend.dao.FeedEntryService;
import com.commafeed.backend.dao.FeedEntryStatusService; import com.commafeed.backend.dao.FeedEntryStatusService;
import com.commafeed.backend.dao.FeedSubscriptionService; import com.commafeed.backend.dao.FeedSubscriptionService;
import com.commafeed.backend.model.User;
import com.commafeed.frontend.CommaFeedSession; import com.commafeed.frontend.CommaFeedSession;
import com.commafeed.model.User;
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public abstract class AbstractREST { public abstract class AbstractREST {

View File

@@ -1,4 +1,4 @@
package com.commafeed.frontend.rest; package com.commafeed.frontend.rest.resources;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
@@ -11,13 +11,13 @@ import javax.ws.rs.PathParam;
import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.ObjectUtils;
import com.commafeed.frontend.rest.model.Entries; import com.commafeed.backend.model.FeedCategory;
import com.commafeed.frontend.rest.model.Entry; import com.commafeed.backend.model.FeedEntry;
import com.commafeed.backend.model.FeedEntryStatus;
import com.commafeed.backend.model.FeedSubscription;
import com.commafeed.frontend.model.Entries;
import com.commafeed.frontend.model.Entry;
import com.commafeed.frontend.utils.ModelFactory.MF; import com.commafeed.frontend.utils.ModelFactory.MF;
import com.commafeed.model.FeedCategory;
import com.commafeed.model.FeedEntry;
import com.commafeed.model.FeedEntryStatus;
import com.commafeed.model.FeedSubscription;
import com.google.common.collect.Iterables; import com.google.common.collect.Iterables;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;

View File

@@ -1,4 +1,4 @@
package com.commafeed.frontend.rest; package com.commafeed.frontend.rest.resources;
import java.util.List; import java.util.List;
@@ -7,10 +7,10 @@ import javax.ws.rs.Path;
import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.ObjectUtils;
import com.commafeed.frontend.rest.model.Category; import com.commafeed.backend.model.FeedCategory;
import com.commafeed.frontend.rest.model.Subscription; import com.commafeed.backend.model.FeedSubscription;
import com.commafeed.model.FeedCategory; import com.commafeed.frontend.model.Category;
import com.commafeed.model.FeedSubscription; import com.commafeed.frontend.model.Subscription;
@Path("subscriptions") @Path("subscriptions")
public class SubscriptionsREST extends AbstractREST { public class SubscriptionsREST extends AbstractREST {