guicing up

This commit is contained in:
Athou
2014-08-17 14:16:30 +02:00
parent f63695bdc7
commit 8e262a1e10
48 changed files with 298 additions and 180 deletions

View File

@@ -3,7 +3,10 @@ package com.commafeed.backend.opml;
import java.util.Date;
import java.util.List;
import lombok.AllArgsConstructor;
import javax.inject.Inject;
import javax.inject.Singleton;
import lombok.RequiredArgsConstructor;
import com.commafeed.backend.dao.FeedCategoryDAO;
import com.commafeed.backend.dao.FeedSubscriptionDAO;
@@ -14,7 +17,8 @@ import com.rometools.opml.feed.opml.Attribute;
import com.rometools.opml.feed.opml.Opml;
import com.rometools.opml.feed.opml.Outline;
@AllArgsConstructor
@RequiredArgsConstructor(onConstructor = @__({ @Inject }))
@Singleton
public class OPMLExporter {
private final FeedCategoryDAO feedCategoryDAO;

View File

@@ -3,6 +3,10 @@ package com.commafeed.backend.opml;
import java.io.StringReader;
import java.util.List;
import javax.inject.Inject;
import javax.inject.Singleton;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
@@ -20,18 +24,13 @@ import com.rometools.opml.feed.opml.Outline;
import com.rometools.rome.io.WireFeedInput;
@Slf4j
@RequiredArgsConstructor(onConstructor = @__({ @Inject }))
@Singleton
public class OPMLImporter {
private FeedCategoryDAO feedCategoryDAO;
private FeedSubscriptionService feedSubscriptionService;
private CacheService cache;
public OPMLImporter(FeedCategoryDAO feedCategoryDAO, FeedSubscriptionService feedSubscriptionService, CacheService cache) {
super();
this.feedCategoryDAO = feedCategoryDAO;
this.feedSubscriptionService = feedSubscriptionService;
this.cache = cache;
}
private final FeedCategoryDAO feedCategoryDAO;
private final FeedSubscriptionService feedSubscriptionService;
private final CacheService cache;
public void importOpml(User user, String xml) {
xml = xml.substring(xml.indexOf('<'));