|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nih.nci.caarray.services.security.SecurityServiceObj
public class SecurityServiceObj
This class which implements SecurityServiceItf provides the authentication and authorization services and is independent of underlying security infrastructures.
Field Summary | |
---|---|
AuthenticationDAItf |
theAuthenticationDAItf
|
AuthorizationDAItf |
theAuthorizationDAItf
|
Constructor Summary | |
---|---|
SecurityServiceObj()
Constructor for a new SecurityServiceObj object. |
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)
place holders for to support interface. |
boolean |
authorizeUser(java.lang.String userName,
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. |
SecuredElementItf |
authorizeUser(java.lang.String loginName,
java.lang.String[] roles,
java.lang.String applicationName,
SecuredElementItf object)
Overloaded to support isEditable. |
SecuredElementItf[] |
authorizeUser(java.lang.String loginName,
java.lang.String[] roles,
java.lang.String applicationName,
SecuredElementItf[] objects)
Returns the given users with role's access permission to a collection of protection element. |
SecuredElementItf[] |
authorizeUser(java.lang.String loginName,
java.lang.String[] roles,
java.lang.String applicationName,
SecuredElementItf[] objects,
ProtectionGroupData[] protectionGroups)
Returns the given users with role's access permission to a collection of protection element. |
boolean |
authorizeUser(java.lang.String loginName,
java.lang.String[] roles,
java.lang.String applicationName,
java.lang.String objectId)
Returns the given users with role's access permission to a protection element. |
SecuredElementItf[] |
authorizeUserOwner(java.lang.String loginName,
java.lang.String applicationName,
SecuredElementItf[] objects)
Returns the given users with role's access permission to a collection of protection element. |
SecuredElementItf[] |
authorizeUserOwnerOnly(java.lang.String loginName,
java.lang.String applicationName,
SecuredElementItf[] objects)
Returns the given users with role's access permission to a collection of protection element. |
java.lang.String |
getEmail(java.lang.String loginName)
The email address associated with the login name. |
java.lang.String |
getEmail(java.lang.String objectId,
java.lang.String applicationName)
The email address associated with the owner of an object. |
protected SecuredElementItf[] |
getPermittedObjects(java.util.LinkedHashMap objectEntries)
|
Role[] |
getRole(java.lang.String loginName,
java.lang.String passwd)
Returns an array of Role objects associated with the loginName/passwd. |
boolean |
isUserOwner(java.lang.String loginName,
java.lang.String applicationName,
java.lang.String objectId)
Returns if the user is owner of given securedElement. |
static void |
main(java.lang.String[] args)
Used for test only. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public AuthenticationDAItf theAuthenticationDAItf
public AuthorizationDAItf theAuthorizationDAItf
Constructor Detail |
---|
public SecurityServiceObj()
SecurityServiceObj object.
Method Detail |
---|
public boolean authenticateUser(java.lang.String loginName, java.lang.String passwd)
authenticateUser
in interface SecurityServiceItf
loginName
- the login name of the userpasswd
- the password of the user
public Role[] getRole(java.lang.String loginName, java.lang.String passwd)
getRole
in interface SecurityServiceItf
loginName
- the login name of the userpasswd
- the password of the user
public java.lang.String getEmail(java.lang.String loginName)
getEmail
in interface SecurityServiceItf
loginName
- the login name of the user
public SecuredElementItf authorizeUser(java.lang.String loginName, java.lang.String[] roles, java.lang.String applicationName, SecuredElementItf object) throws DBException
loginName
- login name used to check if this is the owner of the
protection elementroles,
- an array of roles that user should have to accessapplicationName
- application nameobjectId
- object Id
DBException
public boolean authorizeUser(java.lang.String loginName, java.lang.String[] roles, java.lang.String applicationName, java.lang.String objectId) throws DBException
loginName
- login name used to check if this is the owner of the
protection elementroles,
- an array of roles that user should have to accessapplicationName
- application nameobjectId
- object Id
DBException
public SecuredElementItf[] authorizeUser(java.lang.String loginName, java.lang.String[] roles, java.lang.String applicationName, SecuredElementItf[] objects) throws DBException
loginName
- login name used to check if this is the owner of the
protection elementroles,
- an array of roles that user should have to accessapplicationName
- application nameobjectId
- collection of objects implementing SecuredElementItf
interface.
DBException
public SecuredElementItf[] authorizeUser(java.lang.String loginName, java.lang.String[] roles, java.lang.String applicationName, SecuredElementItf[] objects, ProtectionGroupData[] protectionGroups) throws DBException
loginName
- login name used to check if this is the owner of the
protection elementroles,
- an array of roles that user should have to accessapplicationName
- application nameobjectId
- collection of objects implementing SecuredElementItf
interface.protectionGroups,
- array of protectionGroupData to which the search is
restricted.
DBException
public SecuredElementItf[] authorizeUserOwnerOnly(java.lang.String loginName, java.lang.String applicationName, SecuredElementItf[] objects) throws DBException
loginName
- login name used to check if this is the owner of the
protection elementroles,
- an array of roles that user should have to accessapplicationName
- application nameobjectId
- collection of objects implementing SecuredElementItf
interface.
DBException
public SecuredElementItf[] authorizeUserOwner(java.lang.String loginName, java.lang.String applicationName, SecuredElementItf[] objects) throws DBException
loginName
- login name used to check if this is the owner of the
protection elementroles,
- an array of roles that user should have to accessapplicationName
- application nameobjectId
- collection of objects implementing SecuredElementItf
interface.
DBException
public boolean authorizeUser(Role[] roles, java.lang.String applicationName, java.lang.String objectId, java.lang.String attribute)
authorizeUser
in interface SecurityServiceItf
applicationName
- application nameobjectId
- object Idattribute
- attribute
public boolean authorizeUser(java.lang.String userName, Role[] roles, java.lang.String applicationName, java.lang.String objectId, java.lang.String attribute)
SecurityServiceItf
authorizeUser
in interface SecurityServiceItf
userName
- login name used to check if this is the owner of the protection elementapplicationName
- application nameobjectId
- object Idattribute
- attribute
public java.lang.String getEmail(java.lang.String objectId, java.lang.String applicationName)
objectid
- the objects idapplicationName
- the applications name
public boolean isUserOwner(java.lang.String loginName, java.lang.String applicationName, java.lang.String objectId) throws DBException
loginName
- login name used to check if this is the owner of the
protection elementapplicationName
- application nameobjectId
- object Id
DBException
protected SecuredElementItf[] getPermittedObjects(java.util.LinkedHashMap objectEntries)
objectEntries
- a mix of permitted and non-permitted SecuredObjectEntry objects
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |