org.edg.security.voms.operation
Class QuestionHelper

java.lang.Object
  |
  +--org.edg.security.voms.operation.QuestionHelper
All Implemented Interfaces:
Question, java.io.Serializable
Direct Known Subclasses:
GetACLQuestion, GetDefaultACLQuestion, GetGroupPathQuestion, GetUserQuestion, GetVONameQuestion, ListCapabilitiesForUserQuestion, ListCapabilitiesQuestion, ListCapabilityMembersQuestion, ListCAsQuestion, ListGroupMembersQuestion, ListGroupsForUserQuestion, ListRoleMembersQuestion, ListRolesForUserQuestion, ListRolesQuestion, ListSubgroupsQuestion

public abstract class QuestionHelper
extends java.lang.Object
implements Question

A helper class for writing classes implementing the Question interface. This is the place to store static attributes and methods which are shared between a lot of action types.

At the moment, QuestionHelper contains only a reference to the current container naming scheme, which would otherwise have to be included in most of the individual questions. 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 question types should be derived from QuestionHelper in order to work without source code changes when the Question interface is extended with new methods.

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

Field Summary
protected static ContainerNamingScheme cns
          The container naming scheme for this instance of VOMS.
private static org.apache.log4j.Logger log
          Logger.
 
Constructor Summary
QuestionHelper()
           
 
Method Summary
abstract  java.lang.Object ask()
          Do the query that this question represents, without ACL checks, and return the result as an Object.
 void checkPermission()
          Check that the current client (as specified by the current security context) has the right to ask this question.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cns

protected static final ContainerNamingScheme cns
The container naming scheme for this instance of VOMS.


log

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

Constructor Detail

QuestionHelper

public QuestionHelper()
Method Detail

checkPermission

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

Specified by:
checkPermission in interface Question
VOMSException
See Also:
SecurityContext

ask

public abstract java.lang.Object ask()
                              throws VOMSException
Description copied from interface: Question
Do the query that this question represents, without ACL checks, and return the result as an Object.

Errors must be signalled by throwing an exception.

Specified by:
ask in interface Question
VOMSException