gov.nih.nci.caarray.services.util
Class SecurityUtils

java.lang.Object
  extended by gov.nih.nci.caarray.services.util.SecurityUtils

public final class SecurityUtils
extends java.lang.Object

Author:
dickersc

Field Summary
static int PROTECTION_GROUP_PRIVATE
           
static int PROTECTION_GROUP_PUBLIC
           
 
Constructor Summary
SecurityUtils()
           
 
Method Summary
static SecuredElementData buildSecuredElement(javax.ejb.SessionContext sessionCtx_, java.lang.String packageName, long id)
          Creates a SecuredElementData with PROTECTION_GROUP_PRIVATE as a default group.
static SecuredElementData buildSecuredElement(java.lang.String owner, java.lang.String packageName, long id)
          Creates a SecuredElementData with PROTECTION_GROUP_PRIVATE as a default group.
static SecuredElementItf[] searchOwner(SecuredElementItf[] results)
           
static SecuredElementItf[] searchOwnerOnly(SecuredElementItf[] results)
           
static SecuredElementItf[] searchVisibility(ProtectionGroupData visibility, SecuredElementItf[] results, java.lang.String[] requiredRoles)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROTECTION_GROUP_PUBLIC

public static final int PROTECTION_GROUP_PUBLIC
See Also:
Constant Field Values

PROTECTION_GROUP_PRIVATE

public static final int PROTECTION_GROUP_PRIVATE
See Also:
Constant Field Values
Constructor Detail

SecurityUtils

public SecurityUtils()
Method Detail

buildSecuredElement

public static SecuredElementData buildSecuredElement(javax.ejb.SessionContext sessionCtx_,
                                                     java.lang.String packageName,
                                                     long id)
Creates a SecuredElementData with PROTECTION_GROUP_PRIVATE as a default group.

Parameters:
sessionCtx_ -
Returns:

buildSecuredElement

public static SecuredElementData buildSecuredElement(java.lang.String owner,
                                                     java.lang.String packageName,
                                                     long id)
Creates a SecuredElementData with PROTECTION_GROUP_PRIVATE as a default group.

Parameters:
owner -
packageName -
id -
Returns:

searchVisibility

public static SecuredElementItf[] searchVisibility(ProtectionGroupData visibility,
                                                   SecuredElementItf[] results,
                                                   java.lang.String[] requiredRoles)
                                            throws GeneralException
Throws:
GeneralException

searchOwnerOnly

public static SecuredElementItf[] searchOwnerOnly(SecuredElementItf[] results)
                                           throws GeneralException
Throws:
GeneralException

searchOwner

public static SecuredElementItf[] searchOwner(SecuredElementItf[] results)
                                       throws GeneralException
Throws:
GeneralException