|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.glite.security.voms.operation.ActionHelper
A helper class for writing classes implementing the Action
interface. This is the place to store static attributes and methods which
are shared between a lot of action types.
At the moment, ActionHelper
contains only a reference to the
current container naming scheme, which would otherwise have to be included
in most of the individual actions. It is expected that new attributes and/or
methods will be later added to this class, most notably those associated
with the notification mechanism. All action types should be derived from
ActionHelper
in order to work without source code changes when
the Action
interface is extended with new methods.
Field Summary | |
protected static ContainerNamingScheme |
cns
The container naming scheme for this instance of VOMS. |
Constructor Summary | |
ActionHelper()
|
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()
|
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. |
java.util.Map |
getParameters()
Return the parameters of the requested action as an array of strings. |
void |
perform()
Do the operation that this action represents, without ACL checks. |
java.lang.Object |
performWithResult()
Do the operation that this action represents, without ACL checks, and return a value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final ContainerNamingScheme cns
Constructor Detail |
public ActionHelper()
Method Detail |
public void checkPermission() throws VOMSException
Action
VOMSSecurityException
.
checkPermission
in interface Action
VOMSException
public java.util.List getAdminUsers() throws VOMSException
getAdminUsers
in interface Action
VOMSException
public void perform() throws VOMSException
Action
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.
perform
in interface Action
VOMSException
public java.lang.Object performWithResult() throws VOMSException
Action
Action.perform()
for use when the action must return a value. A typical scenario when
this is needed is the creation of a new request: performing the action
must return the id of the newly created request.
performWithResult
in interface Action
VOMSException
public java.lang.String getDescription()
getDescription
in interface Action
public java.lang.String getContainerName()
getContainerName
in interface Action
public java.util.Map getParameters()
get*()
methods.
getParameters
in interface Action
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |