gov.nih.nci.caarray.services.security.intf
Interface AuthorizationDAItf

All Known Implementing Classes:
RdbmsAuthorizationDAObj

public interface AuthorizationDAItf

An interface defines the generic properties of an authorization data service object.

Version:
1.0
Author:
Q. Pan

Method Summary
 java.lang.String getOwnerEmail(java.lang.String applicationName, java.lang.String objectId)
          Returns email address of the owner of a given object.
 Role[] getPermission(java.lang.String applicationName, java.lang.String objectId, java.lang.String attribute)
          Returns an array of Roles which has the permission to access the protection element defined by its application name, object ID and attribute.
 boolean hasPermission(java.lang.String userName, java.lang.String[] roles, java.lang.String applicationName, java.lang.String objectId)
          Returns the given role's access permission to a protection element defined by its application name, object ID and attribute.
 java.lang.String[] hasPermission(java.lang.String userName, java.lang.String[] roles, java.lang.String applicationName, java.lang.String[] objectId)
          Returns the given user/roles' access permission to a collection of protection elements defined by its application name, object ID and attribute.
 java.lang.String[] hasPermission(java.lang.String userName, java.lang.String[] roles, java.lang.String applicationName, java.lang.String[] objectId, long[] protectionGroups)
          Returns the given user/role's access permission to a collection of protection elements defined by its application name, object ID and attribute.
 boolean hasPermission(java.lang.String userName, java.lang.String roleName, java.lang.String applicationName, java.lang.String objectId)
          Returns the given role's access permission to a protection element defined by its application name, object ID and attribute.
 java.lang.String[] hasPermission(java.lang.String userName, java.lang.String role, java.lang.String applicationName, java.lang.String[] objectId)
          Returns the given user/role's access permission to a collection of protection elements defined by its application name, object ID and attribute.
 java.lang.String[] hasPermission(java.lang.String userName, java.lang.String role, java.lang.String applicationName, java.lang.String[] objectId, long[] protectionGroups)
          Returns the given user/role's access permission to a collection of protection elements defined by its application name, object ID and attribute.
 boolean isOwner(java.lang.String loginName, java.lang.String applicationName, java.lang.String objectId)
          Returns an item's ownership for the given user.
 java.lang.String[] isOwner(java.lang.String loginName, java.lang.String applicationName, java.lang.String[] objectId)
          Returns an users ownership for a collection of items.
 java.lang.String[] isOwner(java.lang.String loginName, java.lang.String applicationName, java.lang.String[] objectId, long[] protectionGroupId)
          Returns an users ownership for a collection of items.
 java.lang.String[] isOwnerOnly(java.lang.String loginName, java.lang.String applicationName, java.lang.String[] objectId)
          Returns an item's ownership for the given user.
 

Method Detail

hasPermission

boolean hasPermission(java.lang.String userName,
                      java.lang.String roleName,
                      java.lang.String applicationName,
                      java.lang.String objectId)
                      throws DBException
Returns the given role's access permission to a protection element defined by its application name, object ID and attribute.

Parameters:
userName - login name
roleName - role name
applicationName - application name
objectId - object ID
Returns:
true for having the access permission false for having no access permission
Throws:
DBException

hasPermission

boolean hasPermission(java.lang.String userName,
                      java.lang.String[] roles,
                      java.lang.String applicationName,
                      java.lang.String objectId)
                      throws DBException
Returns the given role's access permission to a protection element defined by its application name, object ID and attribute.

Parameters:
userName - login name
roleName - role name
applicationName - application name
objectId - object ID
Returns:
true for having the access permission false for having no access permission
Throws:
DBException

hasPermission

java.lang.String[] hasPermission(java.lang.String userName,
                                 java.lang.String role,
                                 java.lang.String applicationName,
                                 java.lang.String[] objectId)
                                 throws DBException
Returns the given user/role's access permission to a collection of protection elements defined by its application name, object ID and attribute. - Overloaded method.

Parameters:
role - role
applicationName - application name
objectId - object ID
attribute - attribute
Returns:
true for having the access permission false for having no access permission
Throws:
DBException

hasPermission

java.lang.String[] hasPermission(java.lang.String userName,
                                 java.lang.String[] roles,
                                 java.lang.String applicationName,
                                 java.lang.String[] objectId)
                                 throws DBException
Returns the given user/roles' access permission to a collection of protection elements defined by its application name, object ID and attribute. - Overloaded method.

Parameters:
roles - role names
applicationName - application name
objectId - object ID
attribute - attribute
Returns:
true for having the access permission false for having no access permission
Throws:
DBException

hasPermission

java.lang.String[] hasPermission(java.lang.String userName,
                                 java.lang.String role,
                                 java.lang.String applicationName,
                                 java.lang.String[] objectId,
                                 long[] protectionGroups)
                                 throws DBException
Returns the given user/role's access permission to a collection of protection elements defined by its application name, object ID and attribute. - Overloaded method.

Parameters:
role - role name
applicationName - application name
objectId - object ID
attribute - attribute
Returns:
true for having the access permission false for having no access permission
Throws:
DBException

hasPermission

java.lang.String[] hasPermission(java.lang.String userName,
                                 java.lang.String[] roles,
                                 java.lang.String applicationName,
                                 java.lang.String[] objectId,
                                 long[] protectionGroups)
                                 throws DBException
Returns the given user/role's access permission to a collection of protection elements defined by its application name, object ID and attribute. - Overloaded method.

Parameters:
roles - role names
applicationName - application name
objectId - object ID
attribute - attribute
Returns:
true for having the access permission false for having no access permission
Throws:
DBException

isOwner

boolean isOwner(java.lang.String loginName,
                java.lang.String applicationName,
                java.lang.String objectId)
                throws DBException
Returns an item's ownership for the given user.

Parameters:
loginName - login name
applicationName - application name
objectId - object ID
Returns:
true if the user is the owner false if the user is not the owner
Throws:
DBException

isOwner

java.lang.String[] isOwner(java.lang.String loginName,
                           java.lang.String applicationName,
                           java.lang.String[] objectId,
                           long[] protectionGroupId)
                           throws DBException
Returns an users ownership for a collection of items. Overloaded method.

Parameters:
loginName - login name
applicationName - application name
objectId - object ID
Returns:
true if the user is the owner false if the user is not the owner
Throws:
DBException

isOwnerOnly

java.lang.String[] isOwnerOnly(java.lang.String loginName,
                               java.lang.String applicationName,
                               java.lang.String[] objectId)
                               throws DBException
Returns an item's ownership for the given user. Returned items not part of any protection Group

Parameters:
loginName - login name
applicationName - application name
objectId - object ID
Returns:
true if the user is the owner false if the user is not the owner
Throws:
DBException

isOwner

java.lang.String[] isOwner(java.lang.String loginName,
                           java.lang.String applicationName,
                           java.lang.String[] objectId)
                           throws DBException
Returns an users ownership for a collection of items. Overloaded method.

Parameters:
loginName - login name
applicationName - application name
objectId - object ID
Returns:
true if the user is the owner false if the user is not the owner
Throws:
DBException

getPermission

Role[] getPermission(java.lang.String applicationName,
                     java.lang.String objectId,
                     java.lang.String attribute)
                     throws DBException
Returns an array of Roles which has the permission to access the protection element defined by its application name, object ID and attribute.

Parameters:
applicationName - application name
objectId - object ID
attribute - attribute
Returns:
an array of Roles which has the permission to access the protection element
Throws:
DBException

getOwnerEmail

java.lang.String getOwnerEmail(java.lang.String applicationName,
                               java.lang.String objectId)
Returns email address of the owner of a given object.

Parameters:
applicationName - application name
objectId - object ID
Returns:
email address of the owner