Primavera Integration API 7.0

com.primavera.integration.util
Class SecurityHelper

java.lang.Object
  extended by com.primavera.integration.util.SecurityHelper

public final class SecurityHelper
extends java.lang.Object

Helper class providing convenience methods for determining a user's global or project security privileges


Method Summary
static java.util.Set<GlobalPrivilege> getGlobalPrivileges(Session session)
          Gets the set of global privileges for the current user
static java.util.Set<ProjectPrivilege> getProjectPrivilegesByEPS(Session session, ObjectId epsObjectId)
          Gets the set of project privileges defined for a specific EPS for the current user
static java.util.Set<ProjectPrivilege> getProjectPrivilegesByEPS(Session session, ObjectId epsObjectId, ObjectId userObjectId)
          Gets the set of project privileges defined for a specific EPS and a specific user
static java.util.Set<ProjectPrivilege> getProjectPrivilegesByProject(Session session, ObjectId projectObjectId)
          Gets the set of project privileges defined for a specific project for the current user
static java.util.Set<ProjectPrivilege> getProjectPrivilegesByProject(Session session, ObjectId projectObjectId, ObjectId userObjectId)
          Gets the set of project privileges defined for a specific project and a specific user
static boolean hasAllResourceAccess(Session session)
          Checks if the current user has all resource access
static boolean hasAllResourceAccess(Session session, ObjectId userObjectId)
          Checks if the current user has all resource access
static boolean isSuperUser(Session session)
          Checks if the current user is an Admin Superuser
static boolean isSuperUser(Session session, ObjectId userObjectId)
          Checks if the a specific user is an Admin Superuser
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isSuperUser

public static boolean isSuperUser(Session session)
                           throws ServerException,
                                  NetworkException
Checks if the current user is an Admin Superuser

Parameters:
session - the current session
Returns:
true if the current user is an Admin Superuser
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer

isSuperUser

public static boolean isSuperUser(Session session,
                                  ObjectId userObjectId)
                           throws ServerException,
                                  NetworkException
Checks if the a specific user is an Admin Superuser

Parameters:
session - the current session
userObjectId - the unique ID of the user
Returns:
true if the user is an Admin Superuser
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer

getGlobalPrivileges

public static java.util.Set<GlobalPrivilege> getGlobalPrivileges(Session session)
                                                          throws BusinessObjectException,
                                                                 ServerException,
                                                                 NetworkException
Gets the set of global privileges for the current user

Parameters:
session - the current session
Returns:
Set set of global privileges
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer
BusinessObjectException - if a problem occurred in the client-side business objects

getProjectPrivilegesByProject

public static java.util.Set<ProjectPrivilege> getProjectPrivilegesByProject(Session session,
                                                                            ObjectId projectObjectId)
                                                                     throws BusinessObjectException,
                                                                            ServerException,
                                                                            NetworkException
Gets the set of project privileges defined for a specific project for the current user

Parameters:
session - the current session
projectObjectId - the unique ID of the project
Returns:
Set set of project privileges
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer
BusinessObjectException - if a problem occurred in the client-side business objects

getProjectPrivilegesByProject

public static java.util.Set<ProjectPrivilege> getProjectPrivilegesByProject(Session session,
                                                                            ObjectId projectObjectId,
                                                                            ObjectId userObjectId)
                                                                     throws BusinessObjectException,
                                                                            ServerException,
                                                                            NetworkException
Gets the set of project privileges defined for a specific project and a specific user

Parameters:
session - the current session
projectObjectId - the unique ID of the project
userObjectId - the unique ID of the user
Returns:
Set set of project privileges
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer
BusinessObjectException - if a problem occurred in the client-side business objects

getProjectPrivilegesByEPS

public static java.util.Set<ProjectPrivilege> getProjectPrivilegesByEPS(Session session,
                                                                        ObjectId epsObjectId)
                                                                 throws BusinessObjectException,
                                                                        ServerException,
                                                                        NetworkException
Gets the set of project privileges defined for a specific EPS for the current user

Parameters:
session - the current session
epsObjectId - the unique ID of the EPS
Returns:
Set set of project privileges
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer
BusinessObjectException - if a problem occurred in the client-side business objects

getProjectPrivilegesByEPS

public static java.util.Set<ProjectPrivilege> getProjectPrivilegesByEPS(Session session,
                                                                        ObjectId epsObjectId,
                                                                        ObjectId userObjectId)
                                                                 throws BusinessObjectException,
                                                                        ServerException,
                                                                        NetworkException
Gets the set of project privileges defined for a specific EPS and a specific user

Parameters:
session - the current session
epsObjectId - the unique ID of the EPS
userObjectId - the unique ID of the user
Returns:
Set set of project privileges
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer
BusinessObjectException - if a problem occurred in the client-side business objects

hasAllResourceAccess

public static boolean hasAllResourceAccess(Session session)
                                    throws BusinessObjectException,
                                           ServerException,
                                           NetworkException
Checks if the current user has all resource access

Parameters:
session - the current session
Returns:
true if the current has all resource access
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer
BusinessObjectException - if a problem occurred in the client-side business objects

hasAllResourceAccess

public static boolean hasAllResourceAccess(Session session,
                                           ObjectId userObjectId)
                                    throws BusinessObjectException,
                                           ServerException,
                                           NetworkException
Checks if the current user has all resource access

Parameters:
session - the current session
userObjectId - unique ID of the user
Returns:
true if the current has all resource access
Throws:
ServerException - if a problem occurred on the server-side
NetworkException - if a problem occurred in the network layer
BusinessObjectException - if a problem occurred in the client-side business objects

Primavera Integration API 7.0

Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.