org.infoglue.cms.controllers.kernel.impl.simple
Class AccessRightController

java.lang.Object
  extended by org.infoglue.cms.controllers.kernel.impl.simple.BaseController
      extended by org.infoglue.cms.controllers.kernel.impl.simple.AccessRightController

public class AccessRightController
extends BaseController

This class is a helper class for the use case handle Accesss

Author:
Mattias Bogeblad

Constructor Summary
AccessRightController()
           
 
Method Summary
 void addUser(java.lang.String interceptionPointCategory, java.lang.String parameters, java.lang.String userName, javax.servlet.http.HttpServletRequest request)
          Adds a user to have access
 AccessRight create(AccessRightVO accessRightVO, InterceptionPoint interceptionPoint, org.exolab.castor.jdo.Database db)
          This method creates an access note.
 AccessRightGroup createAccessRightGroup(org.exolab.castor.jdo.Database db, AccessRightGroupVO accessRightGroupVO, AccessRight accessRight)
          This method creates a AccessRightGroup-object in the database.
 AccessRightRole createAccessRightRole(org.exolab.castor.jdo.Database db, AccessRightRoleVO accessRightRoleVO, AccessRight accessRight)
          This method creates a AccessRightRole-object in the database.
 AccessRightUser createAccessRightUser(org.exolab.castor.jdo.Database db, AccessRightUserVO accessRightUserVO, AccessRight accessRight)
          This method creates a AccessRightUser-object in the database.
 void delete(java.lang.Integer interceptionPointId, java.lang.String parameters, boolean deleteUsers, org.exolab.castor.jdo.Database db)
          This method deletes all occurrencies of AccessRight which has the interceptionPointId.
 void delete(java.lang.String roleName)
          This method deletes all occurrencies of AccessRight which has the interceptionPointId.
 void deleteUser(java.lang.String interceptionPointCategory, java.lang.String parameters, java.lang.String userName, javax.servlet.http.HttpServletRequest request)
          Adds a user to have access
 java.util.List getAccessRightGroupList(java.lang.String groupName, org.exolab.castor.jdo.Database db)
           
 java.util.List getAccessRightGroupVOList(org.exolab.castor.jdo.Database db)
           
 java.util.List getAccessRightGroupVOList(java.lang.Integer accessRightId)
           
 java.util.List getAccessRightList(java.lang.Integer interceptionPointId, org.exolab.castor.jdo.Database db)
           
 java.util.List getAccessRightList(java.lang.Integer interceptionPointId, java.lang.String roleName, org.exolab.castor.jdo.Database db)
           
 java.util.List getAccessRightList(java.lang.Integer interceptionPointId, java.lang.String parameters, java.lang.String roleName, org.exolab.castor.jdo.Database db)
           
 java.util.List getAccessRightList(java.lang.String roleName, org.exolab.castor.jdo.Database db)
           
 java.util.List getAccessRightList(java.lang.String interceptionPointName, java.lang.String parameters, java.lang.String roleName, org.exolab.castor.jdo.Database db)
           
 java.util.List getAccessRightListForEntity(java.lang.Integer interceptionPointId, java.lang.String parameters, org.exolab.castor.jdo.Database db)
           
 java.util.List getAccessRightListOnly(java.lang.Integer interceptionPointId, java.lang.String parameters, org.exolab.castor.jdo.Database db)
           
 java.util.List getAccessRightListOnlyReadOnly(java.lang.Integer interceptionPointId, java.lang.String parameters, org.exolab.castor.jdo.Database db)
           
 java.util.List getAccessRightRoleList(java.lang.String roleName, org.exolab.castor.jdo.Database db, boolean readOnly)
           
 java.util.List getAccessRightRoleVOList(org.exolab.castor.jdo.Database db)
           
 java.util.Collection getAccessRightsUserRows(java.lang.String interceptionPointCategory, java.lang.String parameters)
           
 java.util.Collection getAccessRightsUserRows(java.lang.String interceptionPointCategory, java.lang.String parameters, org.exolab.castor.jdo.Database db)
           
 java.util.List getAccessRightsUsers(java.lang.String interceptionPointCategory, java.lang.String parameters, org.exolab.castor.jdo.Database db)
           
 java.util.List getAccessRightsUsers(java.lang.String interceptionPointCategory, java.lang.String parameters, java.lang.String userName, org.exolab.castor.jdo.Database db)
           
 java.util.List getAccessRightUserList(java.lang.String userName, org.exolab.castor.jdo.Database db)
           
 java.util.List getAccessRightUserVOList(org.exolab.castor.jdo.Database db)
           
 AccessRight getAccessRightWithId(java.lang.Integer accessRightId, org.exolab.castor.jdo.Database db)
           
 java.util.List getAccessRightVOList()
           
 java.util.List getAccessRightVOList(org.exolab.castor.jdo.Database db)
           
 java.util.List getAccessRightVOList(org.exolab.castor.jdo.Database db, java.lang.Integer interceptionPointId, java.lang.String parameters, java.lang.String roleName)
           
 java.util.List getAccessRightVOList(java.lang.Integer interceptionPointId, java.lang.String parameters, java.lang.String roleName)
           
 java.util.List getAccessRightVOList(java.lang.String interceptionPointName, java.lang.String parameters, org.exolab.castor.jdo.Database db)
           
 java.util.List getAccessRightVOListOnly(org.exolab.castor.jdo.Database db, java.lang.Integer interceptionPointId, java.lang.String parameters)
           
 java.util.List getAccessRightVOListOnly(java.lang.Integer interceptionPointId, java.lang.String parameters)
           
 AccessRightVO getAccessRightVOWithId(java.lang.Integer accessRightId)
           
static AccessRightController getController()
          Factory method
 boolean getIsPrincipalAuthorized(org.exolab.castor.jdo.Database db, InfoGluePrincipal infoGluePrincipal, java.lang.String interceptionPointName)
          This method checks if a role has access to an entity.
 boolean getIsPrincipalAuthorized(org.exolab.castor.jdo.Database db, InfoGluePrincipal infoGluePrincipal, java.lang.String interceptionPointName, boolean returnSuccessIfInterceptionPointNotDefined)
          This method checks if a role has access to an entity.
 boolean getIsPrincipalAuthorized(org.exolab.castor.jdo.Database db, InfoGluePrincipal infoGluePrincipal, java.lang.String interceptionPointName, java.lang.String extraParameters)
          This method checks if a role has access to an entity.
 boolean getIsPrincipalAuthorized(InfoGluePrincipal infoGluePrincipal, java.lang.String interceptionPointName)
          This method checks if a role has access to an entity.
 boolean getIsPrincipalAuthorized(InfoGluePrincipal infoGluePrincipal, java.lang.String interceptionPointName, boolean returnSuccessIfInterceptionPointNotDefined)
          This method checks if a role has access to an entity.
 boolean getIsPrincipalAuthorized(InfoGluePrincipal infoGluePrincipal, java.lang.String interceptionPointName, java.lang.String parameters)
          This method checks if a role has access to an entity.
 BaseEntityVO getNewVO()
          This is a method that gives the user back an newly initialized ValueObject for this entity that the controller is handling.
 AccessRightVO update(AccessRightVO AccessRightVO)
           
 void update(java.lang.String parameters, javax.servlet.http.HttpServletRequest request)
           
 void updateGroups(java.lang.Integer accessRightId, java.lang.String parameters, java.lang.String[] groupNames)
           
 
Methods inherited from class org.infoglue.cms.controllers.kernel.impl.simple.BaseController
beginTransaction, beginTransaction, closeDatabase, commitTransaction, createEntity, createEntity, createQuery, deleteEntity, deleteEntity, deleteEntity, deleteEntity, executeQuery, executeQuery, executeQuery, executeQuery, getAllObjects, getAllVOObjects, getAllVOObjects, getAllVOObjects, getAllVOObjects, getObjectWithId, getObjectWithId, getObjectWithIdAsReadOnly, getVOWithId, getVOWithId, getVOWithId, getVOWithId, intercept, intercept, rollbackTransaction, toModifiableVOList, toVOList, updateEntity, updateEntity, updateEntity, updateEntity, validateEntity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessRightController

public AccessRightController()
Method Detail

getController

public static AccessRightController getController()
Factory method


getAccessRightWithId

public AccessRight getAccessRightWithId(java.lang.Integer accessRightId,
                                        org.exolab.castor.jdo.Database db)
                                 throws SystemException,
                                        Bug
Throws:
SystemException
Bug

getAccessRightVOWithId

public AccessRightVO getAccessRightVOWithId(java.lang.Integer accessRightId)
                                     throws SystemException,
                                            Bug
Throws:
SystemException
Bug

getAccessRightVOList

public java.util.List getAccessRightVOList()
                                    throws SystemException,
                                           Bug
Throws:
SystemException
Bug

getAccessRightVOList

public java.util.List getAccessRightVOList(org.exolab.castor.jdo.Database db)
                                    throws SystemException,
                                           Bug
Throws:
SystemException
Bug

getAccessRightUserVOList

public java.util.List getAccessRightUserVOList(org.exolab.castor.jdo.Database db)
                                        throws SystemException,
                                               Bug
Throws:
SystemException
Bug

getAccessRightRoleVOList

public java.util.List getAccessRightRoleVOList(org.exolab.castor.jdo.Database db)
                                        throws SystemException,
                                               Bug
Throws:
SystemException
Bug

getAccessRightGroupVOList

public java.util.List getAccessRightGroupVOList(org.exolab.castor.jdo.Database db)
                                         throws SystemException,
                                                Bug
Throws:
SystemException
Bug

getAccessRightVOList

public java.util.List getAccessRightVOList(java.lang.String interceptionPointName,
                                           java.lang.String parameters,
                                           org.exolab.castor.jdo.Database db)
                                    throws SystemException,
                                           Bug
Throws:
SystemException
Bug

getAccessRightGroupVOList

public java.util.List getAccessRightGroupVOList(java.lang.Integer accessRightId)
                                         throws SystemException,
                                                Bug
Throws:
SystemException
Bug

getAccessRightVOList

public java.util.List getAccessRightVOList(java.lang.Integer interceptionPointId,
                                           java.lang.String parameters,
                                           java.lang.String roleName)
                                    throws SystemException,
                                           Bug
Throws:
SystemException
Bug

getAccessRightVOList

public java.util.List getAccessRightVOList(org.exolab.castor.jdo.Database db,
                                           java.lang.Integer interceptionPointId,
                                           java.lang.String parameters,
                                           java.lang.String roleName)
                                    throws SystemException,
                                           Bug
Throws:
SystemException
Bug

getAccessRightVOListOnly

public java.util.List getAccessRightVOListOnly(java.lang.Integer interceptionPointId,
                                               java.lang.String parameters)
                                        throws SystemException,
                                               Bug
Throws:
SystemException
Bug

getAccessRightVOListOnly

public java.util.List getAccessRightVOListOnly(org.exolab.castor.jdo.Database db,
                                               java.lang.Integer interceptionPointId,
                                               java.lang.String parameters)
                                        throws SystemException,
                                               Bug
Throws:
SystemException
Bug

getAccessRightList

public java.util.List getAccessRightList(java.lang.String interceptionPointName,
                                         java.lang.String parameters,
                                         java.lang.String roleName,
                                         org.exolab.castor.jdo.Database db)
                                  throws SystemException,
                                         Bug
Throws:
SystemException
Bug

getAccessRightList

public java.util.List getAccessRightList(java.lang.Integer interceptionPointId,
                                         java.lang.String parameters,
                                         java.lang.String roleName,
                                         org.exolab.castor.jdo.Database db)
                                  throws SystemException,
                                         Bug
Throws:
SystemException
Bug

getAccessRightListOnly

public java.util.List getAccessRightListOnly(java.lang.Integer interceptionPointId,
                                             java.lang.String parameters,
                                             org.exolab.castor.jdo.Database db)
                                      throws SystemException,
                                             Bug
Throws:
SystemException
Bug

getAccessRightListOnlyReadOnly

public java.util.List getAccessRightListOnlyReadOnly(java.lang.Integer interceptionPointId,
                                                     java.lang.String parameters,
                                                     org.exolab.castor.jdo.Database db)
                                              throws SystemException,
                                                     Bug
Throws:
SystemException
Bug

getAccessRightListForEntity

public java.util.List getAccessRightListForEntity(java.lang.Integer interceptionPointId,
                                                  java.lang.String parameters,
                                                  org.exolab.castor.jdo.Database db)
                                           throws SystemException,
                                                  Bug
Throws:
SystemException
Bug

getAccessRightList

public java.util.List getAccessRightList(java.lang.Integer interceptionPointId,
                                         org.exolab.castor.jdo.Database db)
                                  throws SystemException,
                                         Bug
Throws:
SystemException
Bug

getAccessRightList

public java.util.List getAccessRightList(java.lang.String roleName,
                                         org.exolab.castor.jdo.Database db)
                                  throws SystemException,
                                         Bug
Throws:
SystemException
Bug

getAccessRightList

public java.util.List getAccessRightList(java.lang.Integer interceptionPointId,
                                         java.lang.String roleName,
                                         org.exolab.castor.jdo.Database db)
                                  throws SystemException,
                                         Bug
Throws:
SystemException
Bug

create

public AccessRight create(AccessRightVO accessRightVO,
                          InterceptionPoint interceptionPoint,
                          org.exolab.castor.jdo.Database db)
                   throws SystemException,
                          java.lang.Exception
This method creates an access note.

Parameters:
accessRightVO -
db -
Returns:
Throws:
SystemException
java.lang.Exception

update

public AccessRightVO update(AccessRightVO AccessRightVO)
                     throws ConstraintException,
                            SystemException
Throws:
ConstraintException
SystemException

update

public void update(java.lang.String parameters,
                   javax.servlet.http.HttpServletRequest request)
            throws ConstraintException,
                   SystemException
Throws:
ConstraintException
SystemException

updateGroups

public void updateGroups(java.lang.Integer accessRightId,
                         java.lang.String parameters,
                         java.lang.String[] groupNames)
                  throws ConstraintException,
                         SystemException
Throws:
ConstraintException
SystemException

addUser

public void addUser(java.lang.String interceptionPointCategory,
                    java.lang.String parameters,
                    java.lang.String userName,
                    javax.servlet.http.HttpServletRequest request)
             throws ConstraintException,
                    SystemException
Adds a user to have access

Parameters:
accessRightId -
parameters -
userName -
Throws:
ConstraintException
SystemException

deleteUser

public void deleteUser(java.lang.String interceptionPointCategory,
                       java.lang.String parameters,
                       java.lang.String userName,
                       javax.servlet.http.HttpServletRequest request)
                throws ConstraintException,
                       SystemException
Adds a user to have access

Parameters:
accessRightId -
parameters -
userName -
Throws:
ConstraintException
SystemException

createAccessRightRole

public AccessRightRole createAccessRightRole(org.exolab.castor.jdo.Database db,
                                             AccessRightRoleVO accessRightRoleVO,
                                             AccessRight accessRight)
                                      throws SystemException,
                                             java.lang.Exception
This method creates a AccessRightRole-object in the database.

Parameters:
db -
accessRightRoleVO -
Returns:
Throws:
SystemException
java.lang.Exception

createAccessRightGroup

public AccessRightGroup createAccessRightGroup(org.exolab.castor.jdo.Database db,
                                               AccessRightGroupVO accessRightGroupVO,
                                               AccessRight accessRight)
                                        throws SystemException,
                                               java.lang.Exception
This method creates a AccessRightGroup-object in the database.

Parameters:
db -
accessRightGroupVO -
Returns:
Throws:
SystemException
java.lang.Exception

createAccessRightUser

public AccessRightUser createAccessRightUser(org.exolab.castor.jdo.Database db,
                                             AccessRightUserVO accessRightUserVO,
                                             AccessRight accessRight)
                                      throws SystemException,
                                             java.lang.Exception
This method creates a AccessRightUser-object in the database.

Parameters:
db -
accessRightUserVO -
Returns:
Throws:
SystemException
java.lang.Exception

delete

public void delete(java.lang.String roleName)
            throws SystemException,
                   java.lang.Exception
This method deletes all occurrencies of AccessRight which has the interceptionPointId.

Parameters:
roleName -
Throws:
ConstraintException
SystemException
java.lang.Exception

delete

public void delete(java.lang.Integer interceptionPointId,
                   java.lang.String parameters,
                   boolean deleteUsers,
                   org.exolab.castor.jdo.Database db)
            throws SystemException,
                   java.lang.Exception
This method deletes all occurrencies of AccessRight which has the interceptionPointId.

Parameters:
roleName -
Throws:
ConstraintException
SystemException
java.lang.Exception

getIsPrincipalAuthorized

public boolean getIsPrincipalAuthorized(InfoGluePrincipal infoGluePrincipal,
                                        java.lang.String interceptionPointName,
                                        java.lang.String parameters)
                                 throws SystemException
This method checks if a role has access to an entity. It takes name and id of the entity.

Throws:
SystemException

getIsPrincipalAuthorized

public boolean getIsPrincipalAuthorized(org.exolab.castor.jdo.Database db,
                                        InfoGluePrincipal infoGluePrincipal,
                                        java.lang.String interceptionPointName,
                                        java.lang.String extraParameters)
                                 throws SystemException
This method checks if a role has access to an entity. It takes name and id of the entity.

Throws:
SystemException

getIsPrincipalAuthorized

public boolean getIsPrincipalAuthorized(InfoGluePrincipal infoGluePrincipal,
                                        java.lang.String interceptionPointName)
                                 throws SystemException
This method checks if a role has access to an entity. It takes name and id of the entity.

Throws:
SystemException

getIsPrincipalAuthorized

public boolean getIsPrincipalAuthorized(InfoGluePrincipal infoGluePrincipal,
                                        java.lang.String interceptionPointName,
                                        boolean returnSuccessIfInterceptionPointNotDefined)
                                 throws SystemException
This method checks if a role has access to an entity. It takes name and id of the entity.

Throws:
SystemException

getIsPrincipalAuthorized

public boolean getIsPrincipalAuthorized(org.exolab.castor.jdo.Database db,
                                        InfoGluePrincipal infoGluePrincipal,
                                        java.lang.String interceptionPointName)
                                 throws SystemException
This method checks if a role has access to an entity. It takes name and id of the entity.

Throws:
SystemException

getIsPrincipalAuthorized

public boolean getIsPrincipalAuthorized(org.exolab.castor.jdo.Database db,
                                        InfoGluePrincipal infoGluePrincipal,
                                        java.lang.String interceptionPointName,
                                        boolean returnSuccessIfInterceptionPointNotDefined)
                                 throws SystemException
This method checks if a role has access to an entity. It takes name and id of the entity.

Throws:
SystemException

getAccessRightsUserRows

public java.util.Collection getAccessRightsUserRows(java.lang.String interceptionPointCategory,
                                                    java.lang.String parameters)
                                             throws SystemException,
                                                    Bug
Throws:
SystemException
Bug

getAccessRightsUserRows

public java.util.Collection getAccessRightsUserRows(java.lang.String interceptionPointCategory,
                                                    java.lang.String parameters,
                                                    org.exolab.castor.jdo.Database db)
                                             throws SystemException,
                                                    Bug
Throws:
SystemException
Bug

getAccessRightsUsers

public java.util.List getAccessRightsUsers(java.lang.String interceptionPointCategory,
                                           java.lang.String parameters,
                                           org.exolab.castor.jdo.Database db)
                                    throws SystemException,
                                           Bug
Throws:
SystemException
Bug

getAccessRightsUsers

public java.util.List getAccessRightsUsers(java.lang.String interceptionPointCategory,
                                           java.lang.String parameters,
                                           java.lang.String userName,
                                           org.exolab.castor.jdo.Database db)
                                    throws SystemException,
                                           Bug
Throws:
SystemException
Bug

getAccessRightUserList

public java.util.List getAccessRightUserList(java.lang.String userName,
                                             org.exolab.castor.jdo.Database db)
                                      throws SystemException,
                                             Bug
Throws:
SystemException
Bug

getAccessRightRoleList

public java.util.List getAccessRightRoleList(java.lang.String roleName,
                                             org.exolab.castor.jdo.Database db,
                                             boolean readOnly)
                                      throws SystemException,
                                             Bug
Throws:
SystemException
Bug

getAccessRightGroupList

public java.util.List getAccessRightGroupList(java.lang.String groupName,
                                              org.exolab.castor.jdo.Database db)
                                       throws SystemException,
                                              Bug
Throws:
SystemException
Bug

getNewVO

public BaseEntityVO getNewVO()
This is a method that gives the user back an newly initialized ValueObject for this entity that the controller is handling.

Specified by:
getNewVO in class BaseController


Copyright © 2005 InfoGlue.org All Rights Reserved.