it.eng.spagobi.utilities
Class ObjectsAccessVerifier

java.lang.Object
  extended by it.eng.spagobi.utilities.ObjectsAccessVerifier

public class ObjectsAccessVerifier
extends java.lang.Object

Contains some methods to control user exec/dev/test rights.

Author:
sulis

Constructor Summary
ObjectsAccessVerifier()
           
 
Method Summary
static boolean canDev(java.lang.Integer folderId, it.eng.spago.security.IEngUserProfile profile)
          Control if the current user can develop new object into the functionality identified by its id
static boolean canDev(java.lang.String state, java.lang.Integer folderId, it.eng.spago.security.IEngUserProfile profile)
          Controls if the current user can develop the object relative to the input folder id
static boolean canExec(java.lang.Integer folderId, it.eng.spago.security.IEngUserProfile profile)
          Control if the current user can execute new object into the functionality identified by its id
static boolean canExec(LowFunctionality folder, it.eng.spago.security.IEngUserProfile profile)
          Control if the current user can execute objects into the input functionality
static boolean canExec(java.lang.String state, java.lang.Integer folderId, it.eng.spago.security.IEngUserProfile profile)
          Controls if current user can exec the object relative to the input folder id
static boolean canSee(BIObject obj, it.eng.spago.security.IEngUserProfile profile)
          Controls if the current user can see the document: - if the document is in DEV state the user must have the development permission in a folder containing it; - if the document is in TEST state the user must have the test permission in a folder containing it; - if the document is in REL state the user must have the execution permission in a folder containing it.
static boolean canTest(java.lang.Integer folderId, it.eng.spago.security.IEngUserProfile profile)
          Control if the current user can test new object into the functionality identified by its id
static boolean canTest(java.lang.String state, java.lang.Integer folderId, it.eng.spago.security.IEngUserProfile profile)
          Control if current user can test the object relative to the folder id
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectsAccessVerifier

public ObjectsAccessVerifier()
Method Detail

canDev

public static boolean canDev(java.lang.String state,
                             java.lang.Integer folderId,
                             it.eng.spago.security.IEngUserProfile profile)
Controls if the current user can develop the object relative to the input folder id

Parameters:
state - state of the object
folderId - The id of the folder containing te object
profile - user profile
Returns:
A boolean control value

canExec

public static boolean canExec(java.lang.String state,
                              java.lang.Integer folderId,
                              it.eng.spago.security.IEngUserProfile profile)
Controls if current user can exec the object relative to the input folder id

Parameters:
state - state of the object
folderId - The id of the folder containing te object
profile - user profile
Returns:
A boolean control value

canTest

public static boolean canTest(java.lang.String state,
                              java.lang.Integer folderId,
                              it.eng.spago.security.IEngUserProfile profile)
Control if current user can test the object relative to the folder id

Parameters:
state - state of the object
folderId - The id of the folder containing the object
profile - user profile
Returns:
A boolean control value

canDev

public static boolean canDev(java.lang.Integer folderId,
                             it.eng.spago.security.IEngUserProfile profile)
Control if the current user can develop new object into the functionality identified by its id

Parameters:
folderId - The id of the lowFunctionality
profile - user profile
Returns:
A boolean control value

canTest

public static boolean canTest(java.lang.Integer folderId,
                              it.eng.spago.security.IEngUserProfile profile)
Control if the current user can test new object into the functionality identified by its id

Parameters:
folderId - The id of the lowFunctionality
profile - user profile
Returns:
A boolean control value

canExec

public static boolean canExec(LowFunctionality folder,
                              it.eng.spago.security.IEngUserProfile profile)
Control if the current user can execute objects into the input functionality

Parameters:
folder - The lowFunctionality
profile - user profile
Returns:
A boolean control value

canExec

public static boolean canExec(java.lang.Integer folderId,
                              it.eng.spago.security.IEngUserProfile profile)
Control if the current user can execute new object into the functionality identified by its id

Parameters:
folderId - The id of the lowFunctionality
profile - user profile
Returns:
A boolean control value

canSee

public static boolean canSee(BIObject obj,
                             it.eng.spago.security.IEngUserProfile profile)
                      throws it.eng.spago.error.EMFInternalError
Controls if the current user can see the document: - if the document is in DEV state the user must have the development permission in a folder containing it; - if the document is in TEST state the user must have the test permission in a folder containing it; - if the document is in REL state the user must have the execution permission in a folder containing it.

Parameters:
obj - The BIObject
profile - user profile
Returns:
A boolean control value
Throws:
it.eng.spago.error.EMFInternalError