org.edg.security.voms.operation
Class CreateUserAction

java.lang.Object
  |
  +--org.edg.security.voms.operation.ActionHelper
        |
        +--org.edg.security.voms.operation.CreateUserAction
All Implemented Interfaces:
Action, java.io.Serializable

public final class CreateUserAction
extends ActionHelper

An action for creating a new user in the database.

Version:
$Name: v0_7_0 $
Author:
Karoly Lorentey
See Also:
Serialized Form

Field Summary
private static org.apache.log4j.Logger log
          Logger.
private  User user
          Parameter: The user to be created.
 
Fields inherited from class org.edg.security.voms.operation.ActionHelper
cns
 
Constructor Summary
CreateUserAction(User user)
           
 
Method Summary
 void checkPermission()
          Check that the current client (as specified by the current security context) has the right to perform this action.
 java.util.List getAdminUsers()
          Return the list of User objects, who are allowed to perform the action.
 java.lang.String getContainerName()
          Return the FQCN of the container that this action changes.
 java.lang.String getDescription()
          Return a human-readable description of this action.
 User getUser()
           
 void perform()
          Do the operation that this action represents, without ACL checks.
 
Methods inherited from class org.edg.security.voms.operation.ActionHelper
getParameters, performWithResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.log4j.Logger log
Logger.


user

private User user
Parameter: The user to be created.

Constructor Detail

CreateUserAction

public CreateUserAction(User user)
Method Detail

getUser

public User getUser()

getDescription

public java.lang.String getDescription()
Description copied from class: ActionHelper
Return a human-readable description of this action. By default, this just returns the class name.

Specified by:
getDescription in interface Action
Overrides:
getDescription in class ActionHelper

getContainerName

public java.lang.String getContainerName()
Description copied from class: ActionHelper
Return the FQCN of the container that this action changes. Only used by the request interface.

Specified by:
getContainerName in interface Action
Overrides:
getContainerName in class ActionHelper

checkPermission

public void checkPermission()
                     throws VOMSException
Description copied from interface: Action
Check that the current client (as specified by the current security context) has the right to perform this action. The method returns normally when the access is granted. Otherwise, it throws a VOMSSecurityException.

Specified by:
checkPermission in interface Action
Overrides:
checkPermission in class ActionHelper
VOMSException
See Also:
SecurityContext

getAdminUsers

public java.util.List getAdminUsers()
                             throws VOMSException
Description copied from interface: Action
Return the list of User objects, who are allowed to perform the action. The method only returns the users, who are also members of the Virtual Organization, thus there is a user object associated with them.

Actions that are not part of a requests need not implement this method.

Specified by:
getAdminUsers in interface Action
Overrides:
getAdminUsers in class ActionHelper
VOMSException
See Also:
DBACL

perform

public void perform()
             throws VOMSException
Description copied from interface: Action
Do the operation that this action represents, without ACL checks. Any errors must be signalled by throwing an exception. This is essentially a shorthand for Action.performWithResult(), for actions that do not need a return value. Most actions are like this, so the elimination of the extra return statement seems worthwhile.

Specified by:
perform in interface Action
Overrides:
perform in class ActionHelper
VOMSException