Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/2.2.x/ks 4619 #150

Open
wants to merge 6 commits into
base: stable/2.2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import javax.jcr.NodeIterator;

import org.exoplatform.commons.utils.ListAccess;
import org.exoplatform.container.component.ComponentPlugin;
import org.exoplatform.forum.service.Category;
import org.exoplatform.forum.service.Forum;
Expand All @@ -48,6 +49,7 @@
import org.exoplatform.forum.service.TopicType;
import org.exoplatform.forum.service.UserProfile;
import org.exoplatform.forum.service.Watch;
import org.exoplatform.forum.service.impl.model.PostFilter;
import org.exoplatform.services.organization.User;

/**
Expand Down Expand Up @@ -265,6 +267,13 @@ public Topic getTopic(String categoryId, String forumId, String topicId, String
public void setViewCountTopic(String path, String userRead) {

}

/* (non-Javadoc)
* @see org.exoplatform.forum.service.ForumService#writeViews()
*/
@Override
public void writeViews() {
}

/* (non-Javadoc)
* @see org.exoplatform.forum.service.ForumService#getTopicByPath(java.lang.String, boolean)
Expand Down Expand Up @@ -878,6 +887,14 @@ public void createUserProfile(User user) throws Exception {
@Override
public void updateTopicAccess(String userId, String topicId) {

}

/* (non-Javadoc)
* @see org.exoplatform.forum.service.ForumService#writeReads()
*/
@Override
public void writeReads() {

}

/* (non-Javadoc)
Expand Down Expand Up @@ -1285,4 +1302,10 @@ public void removeCacheUserProfile(String userName) throws Exception {

}

@Override
public ListAccess<Post> getPosts(PostFilter filter) throws Exception {
// TODO Auto-generated method stub
return null;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import javax.jcr.NodeIterator;

import org.exoplatform.container.component.ComponentPlugin;
import org.exoplatform.forum.service.impl.model.PostFilter;
import org.exoplatform.ks.common.conf.RoleRulesPlugin;
import org.exoplatform.ks.common.jcr.KSDataLocation;
import org.exoplatform.management.annotations.Managed;
Expand Down Expand Up @@ -153,6 +154,26 @@ public interface DataStorage {
long getLastReadIndex(String path, String isApproved, String isHidden, String userLogin) throws Exception;

JCRPageList getPosts(String categoryId, String forumId, String topicId, String isApproved, String isHidden, String strQuery, String userLogin) throws Exception;

/**
* Gets a post list by given PostFilter with offset and limit
* @param filter: specified PostFilter
* @param offset
* @param limit
* @return List of Posts
* @throws Exception
* @since 2.2.11
*/
List<Post> getPosts(PostFilter filter, int offset, int limit) throws Exception;

/**
* Gets count of post by given PostFilter
* @param filter: specified PostFilter
* @return
* @throws Exception
* @since 2.2.11
*/
int getPostsCount(PostFilter filter) throws Exception;

long getAvailablePost(String categoryId, String forumId, String topicId, String isApproved, String isHidden, String userLogin) throws Exception;

Expand Down Expand Up @@ -281,6 +302,12 @@ public interface DataStorage {
// void updateDataImported() throws Exception;

void updateTopicAccess(String userId, String topicId);

/**
* write user access a topic
* @since 2.2.11
*/
void writeReads();

void updateForumAccess(String userId, String forumId);

Expand Down Expand Up @@ -361,6 +388,12 @@ public interface DataStorage {
KSDataLocation getDataLocation();

void setViewCountTopic(String path, String userRead);

/**
* Write the number of topic viewers.
* @since 2.2.11
*/
void writeViews();

JCRPageList getPostForSplitTopic(String topicPath) throws Exception;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@

import javax.jcr.NodeIterator;

import org.exoplatform.commons.utils.ListAccess;
import org.exoplatform.container.component.ComponentPlugin;
import org.exoplatform.forum.service.impl.model.PostFilter;
import org.exoplatform.services.organization.User;

/**
Expand Down Expand Up @@ -281,6 +283,12 @@ public interface ForumService extends ForumServiceLegacy {
* @param userRead the user read
*/
void setViewCountTopic(String path, String userRead);

/**
* Write the number of topic viewers.
* @since 2.2.11
*/
void writeViews();

/**
* Gets the topic by path.
Expand Down Expand Up @@ -377,6 +385,15 @@ public interface ForumService extends ForumServiceLegacy {
* @throws Exception the exception
*/
JCRPageList getPosts(String categoryId, String forumId, String topicId, String isApproved, String isHidden, String strQuery, String userLogin) throws Exception;

/**
* Gets Posts and return ListAccess
* @param filter
* @return
* @throws Exception
* @since 2.2.11
*/
ListAccess<Post> getPosts(PostFilter filter) throws Exception;

/**
* Gets posts of topic.
Expand Down Expand Up @@ -982,6 +999,12 @@ public interface ForumService extends ForumServiceLegacy {
* @param topicId id of a topic
*/
void updateTopicAccess(String userId, String topicId);

/**
* write user access a topic
* @since 2.2.11
*/
void writeReads();

/**
* update user access a forum
Expand Down
Loading