ccc.commands
Class CreateCommentCommand

java.lang.Object
  extended by ccc.commands.Command<CommentEntity>
      extended by ccc.commands.CreateCommentCommand

public class CreateCommentCommand
extends Command<CommentEntity>

Command used for creating a comment.

Author:
Civic Computing Ltd.

Constructor Summary
CreateCommentCommand(IRepositoryFactory repoFactory, Comment comment)
          Constructor.
 
Method Summary
protected  CommentEntity doExecute(UserEntity actor, java.util.Date happenedOn)
          Execute the command.
protected  CommandType getType()
          Get the type of this command.
 
Methods inherited from class ccc.commands.Command
afterExecute, authorize, beforeExecute, execute, getAudit, getComments, getData, getGroups, getRepository, getUsers, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateCommentCommand

public CreateCommentCommand(IRepositoryFactory repoFactory,
                            Comment comment)
Constructor.

Parameters:
repoFactory - The repository factory for this command.
comment - Details of the comment to create.
Method Detail

doExecute

protected CommentEntity doExecute(UserEntity actor,
                                  java.util.Date happenedOn)
Execute the command.

Specified by:
doExecute in class Command<CommentEntity>
Parameters:
actor - The user who performed the command.
happenedOn - When the command was performed.
Returns:
The result of the command, of type T.

getType

protected CommandType getType()
Get the type of this command.

Specified by:
getType in class Command<CommentEntity>
Returns:
The type as an enum.


Copyright © 2010. All Rights Reserved.