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

All Known Implementing Classes:
SecurityServiceObj

public interface SecurityServiceItf

An interface defines the generic properties of a security service object.

Version:
1.0
Author:
Q. Pan

Method Summary
 boolean authenticateUser(java.lang.String loginName, java.lang.String passwd)
          Returns the result of the user authentication.
 boolean authorizeUser(Role[] roles, java.lang.String applicationName, java.lang.String objectId, java.lang.String attribute)
          Returns the roles' access permission to a protection element.
 boolean authorizeUser(java.lang.String loginName, Role[] roles, java.lang.String applicationName, java.lang.String objectId, java.lang.String attribute)
          Returns the given user or role's access permission to a protection element.
 java.lang.String getEmail(java.lang.String loginName)
          The email address associated with the login name.
 Role[] getRole(java.lang.String loginName, java.lang.String passwd)
          Returns an array of Role objects associated with the loginName/passwd.
 

Method Detail

authenticateUser

boolean authenticateUser(java.lang.String loginName,
                         java.lang.String passwd)
Returns the result of the user authentication.

Parameters:
loginName - the login name of the user
passwd - the password of the user
Returns:
true for successful authentication
false for failed authentication

getRole

Role[] getRole(java.lang.String loginName,
               java.lang.String passwd)
Returns an array of Role objects associated with the loginName/passwd.

Parameters:
loginName - the login name of the user
passwd - the password of the user
Returns:
an array of Role objects associated with the login name

authorizeUser

boolean authorizeUser(java.lang.String loginName,
                      Role[] roles,
                      java.lang.String applicationName,
                      java.lang.String objectId,
                      java.lang.String attribute)
Returns the given user or role's access permission to a protection element.

Parameters:
loginName - login name used to check if this is the owner of the protection element
roles, - an array of Role that the user has
applicationName - application name
objectId - object Id
attribute - attribute
Returns:
true if the user is the owner of the protection element or has the permission false if the user is not the owner of the protection element or has no asscee permission

authorizeUser

boolean authorizeUser(Role[] roles,
                      java.lang.String applicationName,
                      java.lang.String objectId,
                      java.lang.String attribute)
Returns the roles' access permission to a protection element.

Parameters:
roles, - an array of Role that the user has
applicationName - application name
objectId - object Id
attribute - attribute
Returns:
true if has the permission false if has no asscee permission

getEmail

java.lang.String getEmail(java.lang.String loginName)
The email address associated with the login name.

Parameters:
loginName - the login name of the user
Returns:
an email addresss associated with the login name