Implementation of databookstore using social client REST API
This commit is contained in:
parent
5d6bdc94af
commit
c02408cc90
|
@ -170,19 +170,7 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
|
|||
*/
|
||||
@Override
|
||||
public boolean saveUserPost(Post post, List<Attachment> attachments) {
|
||||
if (attachments != null && !attachments.isEmpty())
|
||||
post.setMultiFileUpload(true);
|
||||
boolean savePostResult = saveUserPost(post);
|
||||
if (savePostResult) {
|
||||
String postkey = post.getKey();
|
||||
for (Attachment attachment : attachments) {
|
||||
boolean attachSaveResult = postClient.saveAttachmentEntryLib(postkey, attachment);
|
||||
if (!attachSaveResult)
|
||||
_log.warn("Some of the attachments failed to be saved: " + attachment.getName());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
return postClient.saveUserPostLib(post, attachments);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -213,19 +201,7 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
|
|||
*/
|
||||
@Override
|
||||
public boolean saveAppPost(Post post, List<Attachment> attachments) {
|
||||
if (attachments != null && !attachments.isEmpty())
|
||||
post.setMultiFileUpload(true);
|
||||
boolean saveFeedResult = saveAppPost(post);
|
||||
if (saveFeedResult) {
|
||||
String feedKey = post.getKey();
|
||||
for (Attachment attachment : attachments) {
|
||||
boolean attachSaveResult = postClient.saveAttachmentEntryLib(feedKey, attachment);
|
||||
if (!attachSaveResult)
|
||||
_log.warn("Some of the attachments failed to be saved: " + attachment.getName());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
return postClient.saveAppPostLib(post, attachments);
|
||||
}
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
|
@ -826,7 +802,7 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
|
|||
*/
|
||||
@Override
|
||||
public List<Feed> getVREFeedsByHashtag(String vreid, String hashtag) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, FeedIDNotFoundException, ColumnNameNotFoundException {
|
||||
return hashTagClient.getVREFeedsByHashtagLib(vreid, hashtag);
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
|
|
Loading…
Reference in New Issue