mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-9153 Stub out the new (lucene free) discussions interfaces, for review
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29638 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -0,0 +1,124 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2005-2011 Alfresco Software Limited.
|
||||||
|
*
|
||||||
|
* This file is part of Alfresco
|
||||||
|
*
|
||||||
|
* Alfresco is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Alfresco is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.alfresco.service.cmr.discussion;
|
||||||
|
|
||||||
|
import org.alfresco.query.PagingRequest;
|
||||||
|
import org.alfresco.query.PagingResults;
|
||||||
|
import org.alfresco.service.NotAuditable;
|
||||||
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Discussions service.
|
||||||
|
*
|
||||||
|
* @author Nick Burch
|
||||||
|
* @since 4.0
|
||||||
|
*/
|
||||||
|
public interface DiscussionService {
|
||||||
|
/**
|
||||||
|
* Creates a new {@link ForumPostInfo} in the given topic,
|
||||||
|
* specified settings
|
||||||
|
*
|
||||||
|
* @return The newly created {@link ForumPostInfo}
|
||||||
|
*/
|
||||||
|
@NotAuditable
|
||||||
|
ForumPostInfo createForumPost(ForumTopicInfo topic, String title,
|
||||||
|
String contents);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new {@link ForumTopicInfo} in the given site
|
||||||
|
*/
|
||||||
|
@NotAuditable
|
||||||
|
ForumTopicInfo createForumTopic(String siteShortName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new {@link ForumTopicInfo} attached to the
|
||||||
|
* specified Node
|
||||||
|
*/
|
||||||
|
@NotAuditable
|
||||||
|
ForumTopicInfo createForumTopic(NodeRef nodeRef);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates an existing {@link ForumPostInfo} in the repository.
|
||||||
|
*
|
||||||
|
* @return The updated {@link ForumPostInfo}
|
||||||
|
*/
|
||||||
|
@NotAuditable
|
||||||
|
ForumPostInfo updateForumPost(ForumPostInfo post);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes an existing {@link ForumPostInfo} from the repository
|
||||||
|
*/
|
||||||
|
@NotAuditable
|
||||||
|
void deleteForumPost(ForumPostInfo post);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes an existing {@link ForumTopicInfo} from the repository
|
||||||
|
*/
|
||||||
|
@NotAuditable
|
||||||
|
void deleteForumTopic(ForumTopicInfo topic);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves an existing {@link ForumPostInfo} from the repository
|
||||||
|
*/
|
||||||
|
@NotAuditable
|
||||||
|
ForumPostInfo getForumPost(ForumTopicInfo topic, String linkName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves an existing {@link ForumTopicInfo} from the repository,
|
||||||
|
* which is within a site
|
||||||
|
*/
|
||||||
|
@NotAuditable
|
||||||
|
ForumTopicInfo getForumTopic(String siteShortName, String linkName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves an existing {@link ForumTopicInfo} from the repository,
|
||||||
|
* which is attached to the specified Node
|
||||||
|
*/
|
||||||
|
@NotAuditable
|
||||||
|
ForumTopicInfo getForumTopic(NodeRef nodeRef, String linkName);
|
||||||
|
|
||||||
|
// TODO Decide about the primary post on a topic
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves all replies on a Topic
|
||||||
|
*/
|
||||||
|
@NotAuditable
|
||||||
|
PagingResults<ForumPostInfo> listForumPostReplies(ForumTopicInfo forum, int levels, PagingRequest paging);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves all replies to a Post
|
||||||
|
*/
|
||||||
|
@NotAuditable
|
||||||
|
PagingResults<ForumPostInfo> listForumPostReplies(ForumPostInfo primaryPost, int levels, PagingRequest paging);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves all posts in a site
|
||||||
|
*/
|
||||||
|
@NotAuditable
|
||||||
|
PagingResults<ForumPostInfo> listForumPosts(String siteShortName, PagingRequest paging);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves all posts attached to the specified Node
|
||||||
|
*/
|
||||||
|
@NotAuditable
|
||||||
|
PagingResults<ForumPostInfo> listForumPosts(NodeRef nodeRef, PagingRequest paging);
|
||||||
|
|
||||||
|
// TODO Hot, New and Mine listing support
|
||||||
|
}
|
@@ -0,0 +1,94 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||||
|
*
|
||||||
|
* This file is part of Alfresco
|
||||||
|
*
|
||||||
|
* Alfresco is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Alfresco is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.alfresco.service.cmr.discussion;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.alfresco.repo.security.permissions.PermissionCheckValue;
|
||||||
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class represents a Post in a Forum Topic
|
||||||
|
*
|
||||||
|
* @author Nick Burch
|
||||||
|
* @since 4.0
|
||||||
|
*/
|
||||||
|
public interface ForumPostInfo extends Serializable, PermissionCheckValue {
|
||||||
|
/**
|
||||||
|
* @return the NodeRef of the underlying post
|
||||||
|
*/
|
||||||
|
NodeRef getNodeRef();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the NodeRef of the topic this belongs to
|
||||||
|
*/
|
||||||
|
NodeRef getTopicNodeRef();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the System generated name for the post
|
||||||
|
*/
|
||||||
|
String getSystemName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the Title of the post
|
||||||
|
*/
|
||||||
|
String getTitle();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the Title of the post
|
||||||
|
*/
|
||||||
|
void setTitle(String title);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the HTML Content of the post
|
||||||
|
*/
|
||||||
|
String getContents();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the (HTML) Content of the post
|
||||||
|
*/
|
||||||
|
void setContents(String contentHTML);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the creator of the post
|
||||||
|
*/
|
||||||
|
String getCreator();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the modifier of the post
|
||||||
|
*/
|
||||||
|
String getModifier();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the creation date and time
|
||||||
|
*/
|
||||||
|
Date getCreatedAt();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the modification date and time
|
||||||
|
*/
|
||||||
|
Date getModifiedAt();
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * @return the Tags associated with the post
|
||||||
|
// * TODO Are posts ever tagged, or only ever topics?
|
||||||
|
// */
|
||||||
|
// List<String> getTags();
|
||||||
|
}
|
@@ -0,0 +1,71 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||||
|
*
|
||||||
|
* This file is part of Alfresco
|
||||||
|
*
|
||||||
|
* Alfresco is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Alfresco is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.alfresco.service.cmr.discussion;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.alfresco.repo.security.permissions.PermissionCheckValue;
|
||||||
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class represents a Topic in a forum
|
||||||
|
*
|
||||||
|
* TODO Decide about the primary post on a topic
|
||||||
|
*
|
||||||
|
* @author Nick Burch
|
||||||
|
* @since 4.0
|
||||||
|
*/
|
||||||
|
public interface ForumTopicInfo extends Serializable, PermissionCheckValue {
|
||||||
|
/**
|
||||||
|
* @return the NodeRef of the underlying topic
|
||||||
|
*/
|
||||||
|
NodeRef getNodeRef();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the NodeRef of the container this belongs to (Site or Otherwise)
|
||||||
|
*/
|
||||||
|
NodeRef getContainerNodeRef();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the System generated name for the topic
|
||||||
|
*/
|
||||||
|
String getSystemName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the creator of the topic
|
||||||
|
*/
|
||||||
|
String getCreator();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the creation date and time
|
||||||
|
*/
|
||||||
|
Date getCreatedAt();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the modification date and time
|
||||||
|
*/
|
||||||
|
Date getModifiedAt();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the Tags associated with the topic
|
||||||
|
*/
|
||||||
|
List<String> getTags();
|
||||||
|
}
|
Reference in New Issue
Block a user