org.sakaiproject.tool.assessment.facade.authz.integrated
Class AuthzQueriesFacade

java.lang.Object
  extended byorg.springframework.dao.support.DaoSupport
      extended byorg.springframework.orm.hibernate.support.HibernateDaoSupport
          extended byorg.sakaiproject.tool.assessment.facade.authz.integrated.AuthzQueriesFacade
All Implemented Interfaces:
AuthzQueriesFacadeAPI, InitializingBean

public class AuthzQueriesFacade
extends HibernateDaoSupport
implements AuthzQueriesFacadeAPI

Description: Facade for AuthZ queries, standalone version.

Sakai Project Copyright (c) 2005

@todo use resources in AuthzResource.

Author:
cwen, Rachel Gollub , Ed Smiley split integrated, standlaone.

Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
AuthzQueriesFacade()
           
 
Method Summary
 boolean checkAuthorization(String agentId, String functionId, String qualifierId)
           
 boolean checkMembership(String siteId)
           
 AuthorizationData createAuthorization(String agentId, String functionId, String qualifierId)
           
 ArrayList getAssessments(String agentId, String functionId)
           
 ArrayList getAssessmentsByAgentAndFunction(String agentId, String functionId)
           
 List getAuthorizationByAgentAndFunction(String agentId, String functionId)
           
 List getAuthorizationByFunctionAndQualifier(String functionId, String qualifierId)
           
 HashMap getAuthorizationToViewAssessments(String agentId)
          This returns a HashMap containing (String a.qualiferId, AuthorizationData a) agentId is a site for now but can be a user
 boolean hasPrivilege(String functionName)
           
 boolean isAuthorized(String agentId, String functionId, String qualifierId)
           
 void removeAuthorizationByQualifier(String qualifierId, boolean isPublishedAssessment)
           
 
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
checkDaoConfig, closeSessionIfNecessary, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthzQueriesFacade

public AuthzQueriesFacade()
Method Detail

hasPrivilege

public boolean hasPrivilege(String functionName)
Specified by:
hasPrivilege in interface AuthzQueriesFacadeAPI

isAuthorized

public boolean isAuthorized(String agentId,
                            String functionId,
                            String qualifierId)
Specified by:
isAuthorized in interface AuthzQueriesFacadeAPI

checkAuthorization

public boolean checkAuthorization(String agentId,
                                  String functionId,
                                  String qualifierId)

createAuthorization

public AuthorizationData createAuthorization(String agentId,
                                             String functionId,
                                             String qualifierId)
Specified by:
createAuthorization in interface AuthzQueriesFacadeAPI

getAssessments

public ArrayList getAssessments(String agentId,
                                String functionId)

getAssessmentsByAgentAndFunction

public ArrayList getAssessmentsByAgentAndFunction(String agentId,
                                                  String functionId)

removeAuthorizationByQualifier

public void removeAuthorizationByQualifier(String qualifierId,
                                           boolean isPublishedAssessment)
Specified by:
removeAuthorizationByQualifier in interface AuthzQueriesFacadeAPI

getAuthorizationToViewAssessments

public HashMap getAuthorizationToViewAssessments(String agentId)
This returns a HashMap containing (String a.qualiferId, AuthorizationData a) agentId is a site for now but can be a user

Specified by:
getAuthorizationToViewAssessments in interface AuthzQueriesFacadeAPI

getAuthorizationByAgentAndFunction

public List getAuthorizationByAgentAndFunction(String agentId,
                                               String functionId)
Specified by:
getAuthorizationByAgentAndFunction in interface AuthzQueriesFacadeAPI

getAuthorizationByFunctionAndQualifier

public List getAuthorizationByFunctionAndQualifier(String functionId,
                                                   String qualifierId)
Specified by:
getAuthorizationByFunctionAndQualifier in interface AuthzQueriesFacadeAPI

checkMembership

public boolean checkMembership(String siteId)
Specified by:
checkMembership in interface AuthzQueriesFacadeAPI