org.edg.security.voms.operation
Interface Question

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
QuestionHelper

public interface Question
extends java.io.Serializable

An interface for representing high-level queries in the VO database. Classes implementing this interface usually have attributes representing all the parameters that are necessary for the query. VOMS calls ask() when it is time to carry out the query. The Database class provides methods for executing (asking) questions.

Note that it is expected that this interface will be extended with new methods when the notification mechanism is implemented. To prevent changing all the questions when this happens, it is recommended that action types are derived from QuestionHelper, which also provides some useful attributes and methods common to most questions.

Version:
$Name: v0_7_0 $
Author:
Karoly Lorentey

Method Summary
 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.
 

Method Detail

checkPermission

public void checkPermission()
                     throws VOMSException
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.

Throws:
VOMSSecurityException - when the access is denied.
DatabaseError - if an SQL error occurs.
InconsistentDatabase - if a database inconsistency is detected.
VOMSException
See Also:
SecurityContext

ask

public java.lang.Object ask()
                     throws VOMSException
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.

VOMSException