|
Clearspace API (2.5.29) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ModerationStrategy
Class to represent a moderation strategy.
| Method Summary | |
|---|---|
void |
approvalCallback(Long workflowID,
JiveObject jiveObject,
User user,
String responseMessage)
Handles the approval callback. |
void |
approve(Long workflowID,
JiveObject jiveObject,
User user,
String responseMessage)
Approves the workflow for the given workflow ID and JiveObject. |
JiveObject |
finishCallback(Long workflowID,
JiveObject jiveObject)
Handles the finish call back. |
List<JiveObjectType> |
getModeratedTypes()
Specifies a list of JiveObjectType that the strategy supports. |
Set<Long> |
getModerators(JiveObject jiveObject)
Retrieves a list of unique User IDs representing the available moderators for a given JiveObject. |
void |
newCallback(User user,
long entryID,
JiveObject jiveObject,
Set<Long> moderators,
String requestMessage)
Handles the new callback. |
void |
notificationCallback(Long workflowID,
JiveObject jiveObject,
User user,
String responseMessage)
Handles the notification callback. |
void |
reject(Long workflowID,
JiveObject jiveObject,
User user,
String responseMessage)
Rejects the workflow for the given workflow ID and JiveObject. |
void |
rejectionCallback(Long workflowID,
JiveObject jiveObject,
User user,
String responseMessage)
Handles the rejection callback. |
boolean |
shouldModerate(JiveContainer jiveContainer,
int objectType,
User user)
Determines if moderation is enabled for the given JiveContainer and object Type. |
boolean |
shouldModerate(JiveObject jiveObject,
User user)
Determines if moderation for the given JiveObject is enabled. |
void |
startWorkflow(JiveObject jiveObject,
User user,
String requestMessage)
Puts the JiveObject into the moderation queue. |
void |
stateChangeCallback(JiveObject jiveObject,
JiveContentObject.Status status)
Handles any state changes for a given object. |
| Method Detail |
|---|
boolean shouldModerate(JiveObject jiveObject,
User user)
JiveObject is enabled. Moderation is enabled for an object
if the space/community it is created in has moderation enabled for jiveObject's type.
jiveObject - the jiveObject for which moderation might be enabled.user - the user that owns the jiveObject.
boolean shouldModerate(JiveContainer jiveContainer,
int objectType,
User user)
JiveContainer and object Type. Moderation is enabled
if the moderation enabled property is set for the given object type on the container.
jiveContainer - the jiveContainer.objectType - the object type for which moderation might be enabled.user - the user that owns the jiveObject.
void startWorkflow(JiveObject jiveObject,
User user,
String requestMessage)
JiveObject into the moderation queue.
jiveObject - the jiveObject to send into moderation.user - the user that owns the jiveObject.requestMessage - an optional message stating why the message is in moderation.Set<Long> getModerators(JiveObject jiveObject)
User IDs representing the available moderators for a given JiveObject.
jiveObject - the jiveObject.
void approve(Long workflowID,
JiveObject jiveObject,
User user,
String responseMessage)
JiveObject. This method is responsible for advancing the
workflow into the "Approved" step and toggling the status of the JiveObject to "APPROVED".
workflowID - the unique ID of the workflow.jiveObject - the jiveObject.user - the user approving the workflow item.responseMessage - an optional message stating why the jiveObject was approved.
void reject(Long workflowID,
JiveObject jiveObject,
User user,
String responseMessage)
JiveObject. This method is responsible for advancing the
workflow into the "Rejected" step and toggling the status of the JiveObject to "REJECTED".
workflowID - the unique ID of the workflow.jiveObject - the jiveObject.user - the user who rejected the workflow item.responseMessage - an optional message stating why the jiveObject was rejected.
void approvalCallback(Long workflowID,
JiveObject jiveObject,
User user,
String responseMessage)
JiveObject.
workflowID - the unique ID of the workflow.jiveObject - the jiveObject.user - the user who approved the workflow item.responseMessage - an optional message stating why the jiveObject was approved.
void rejectionCallback(Long workflowID,
JiveObject jiveObject,
User user,
String responseMessage)
JiveObject.
workflowID - the unique ID of the workflow.jiveObject - the jiveObject.user - the user who rejected the workflow item.responseMessage - an optional message stating why the jiveObject was rejected.
void newCallback(User user,
long entryID,
JiveObject jiveObject,
Set<Long> moderators,
String requestMessage)
user - the user who owns the jiveObject.entryID - the unique ID that will be used for the workflow ID.jiveObject - the jiveObject.moderators - a set of long values representing moderators user IDs.requestMessage - an option message stating why the message was sent into moderation.
void notificationCallback(Long workflowID,
JiveObject jiveObject,
User user,
String responseMessage)
workflowID - the unique ID of the workflow.jiveObject - the jiveObject.user - the user who approved or rejected the workflow item.responseMessage - an optional message why the jiveObject was approved/rejected.
JiveObject finishCallback(Long workflowID,
JiveObject jiveObject)
JiveObject. A workflow entry is
considered to be empty if it's neither approved nor rejected and its request/response message field is empty.
workflowID - the unique ID of the workflow.jiveObject - the jiveObject.
void stateChangeCallback(JiveObject jiveObject,
JiveContentObject.Status status)
jiveObject - the jiveObject to change.status - the new status.List<JiveObjectType> getModeratedTypes()
JiveObjectType that the strategy supports.
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||