ccc.commands
Class RenameResourceCommand

java.lang.Object
  extended by ccc.commands.Command<java.lang.Void>
      extended by ccc.commands.RenameResourceCommand

public class RenameResourceCommand
extends Command<java.lang.Void>

Command: rename a resource.

Author:
Civic Computing Ltd.

Constructor Summary
RenameResourceCommand(ResourceRepository repository, LogEntryRepository audit, java.util.UUID resourceId, java.lang.String name)
          Constructor.
 
Method Summary
 java.lang.Void 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

RenameResourceCommand

public RenameResourceCommand(ResourceRepository repository,
                             LogEntryRepository audit,
                             java.util.UUID resourceId,
                             java.lang.String name)
Constructor.

Parameters:
repository - The ResourceDao used for CRUD operations, etc.
audit - The audit logger, for logging business actions.
resourceId - The resource to rename.
name - The new name for the resource.
Method Detail

doExecute

public java.lang.Void doExecute(UserEntity actor,
                                java.util.Date happenedOn)
Execute the command.

Specified by:
doExecute in class Command<java.lang.Void>
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<java.lang.Void>
Returns:
The type as an enum.


Copyright © 2010. All Rights Reserved.