public class ResourceAccess extends BusinessObject
Resource access allows you to restrict a user's ability to access resources. If the User.AllResourceAccessFlag is True, the user has access to all resources and resource access does not apply. If the User.AllResourceAccessFlag is False, the user has restricted resource access. In this case, the user is assigned to a resource in the resource hierarchy and that resource becomes the user's root resource access node. The position of the user's root resource access node in the hierarchy determines the user's resource access. The user has access to that root resource access node and all of its children, but no other resources above in the hierarchy. If the user is not assigned to any resources, that user does not have access to resources. Admin Superusers always have all resource access.
Note that project access overrides resource access. If a user can access a project, the user is able to see all resources assigned to that project. The user can then assign these resources anywhere but will only be able to edit them if the user has resource access to them.
Resource Access business objects may not be updated. To change the values on a Resource Access object, create a new object with the desired values and delete the old object.
Note that this business object has a multi-part object ID; its object ID is a combination of its user object ID and its resource object ID. The method createObjectId() can be used to create the multi-part object ID from the individual IDs.
See Also: Quick reference of ResourceAccess fields
| Constructor and Description |
|---|
ResourceAccess(Session session)
Class constructor specifying the Session.
|
ResourceAccess(Session session,
ObjectId objId)
Class constructor specifying the Session and ObjectId of the object.
|
ResourceAccess(Session session,
ObjectId userObjectId,
ObjectId resourceObjectId)
Class constructor specifying the Session and the individual components of the multi-part key: UserObjectId and ResourceObjectId.
|
ResourceAccess(Session session,
com.primavera.infr.db.PrmRowSet rowSet,
int iIndex)
Class constructor called internally after objects are retrieved from the server.
|
| Modifier and Type | Method and Description |
|---|---|
ObjectId |
create()
Creates this ResourceAccess object in the database.
|
static ObjectId[] |
create(Session session,
ResourceAccess[] resourceaccess)
Creates multiple ResourceAccess objects in the database.
|
static ObjectId |
createObjectId(ObjectId userObjectId,
ObjectId resourceObjectId)
Creates a multi-part ObjectId from two individual ObjectIds.
|
void |
delete()
Deletes this ResourceAccess object from the database.
|
static void |
delete(Session session,
ResourceAccess[] resourceaccess)
Deletes multiple ResourceAccess objects from the database.
|
static String[] |
getAllFields()
Gets all fields for this business object.
|
Date |
getCreateDate()
Gets the date this resource security was created.
|
String |
getCreateUser()
Gets the name of the user that created this resource security.
|
static String[] |
getDefaultXMLExportFields()
Deprecated.
|
static String[] |
getFilterableFields()
Gets all fields that can be filtered.
|
static String[] |
getInternalAllFields()
An internal method that should not be called directly by client code.
|
static Set<String> |
getInternalAllFieldsSet()
An internal method that should not be called directly by client code.
|
static String[] |
getInternalDefaultLoadFields()
An internal method that should not be called directly by client code.
|
Date |
getLastUpdateDate()
Gets the date this resource security was last updated.
|
String |
getLastUpdateUser()
Gets the name of the user that last updated this resource security.
|
static String[] |
getMinimumXMLExportFields()
Gets all fields that are always exported at a minimum by the
new flat XML exporter
|
ObjectId |
getObjectId()
Gets the ObjectId for this object.
|
static String[] |
getRequiredCreateFields()
Gets all fields that must be set before calling create() on this business object.
|
String |
getResourceId()
Gets the short code that uniquely identifies the resource.
|
String |
getResourceName()
Gets the name of the resource.
|
ObjectId |
getResourceObjectId()
Gets the unique ID of the associated resource.
|
int |
getSequenceNumber()
Gets the sequence number for sorting.
|
String |
getUserName()
Gets the user's login name.
|
ObjectId |
getUserObjectId()
Gets the unique ID of the associated user.
|
static String[] |
getWritableFields()
Gets all writable fields for this business object.
|
static ResourceAccess |
load(Session session,
String[] fields,
ObjectId objId)
Loads a single ResourceAccess object from the database.
|
static BOIterator<ResourceAccess> |
load(Session session,
String[] fields,
ObjectId[] objIds)
Loads multiple ResourceAccess objects from the database.
|
Resource |
loadResource(String[] fields)
Loads an associated Resource object from the database.
|
User |
loadUser(String[] fields)
Loads an associated User object from the database.
|
void |
setResourceObjectId(ObjectId o)
Sets the unique ID of the associated resource.
|
void |
setSequenceNumber(int i)
Sets the sequence number for sorting.
|
void |
setUserObjectId(ObjectId o)
Sets the unique ID of the associated user.
|
String |
toString()
Returns a string representation of the object.
|
equals, getMaxFieldLength, getValue, getValue, hashCode, isNull, setEarlyDate, setNull, setObjectIdpublic ResourceAccess(Session session)
session - the Sessionpublic ResourceAccess(Session session, ObjectId objId) throws BusinessObjectException
session - the SessionobjId - the ObjectIdBusinessObjectException - if a problem occurred in the client-side business objectspublic ResourceAccess(Session session, ObjectId userObjectId, ObjectId resourceObjectId) throws BusinessObjectException
session - the SessionuserObjectId - the first ObjectId in the keyresourceObjectId - the second ObjectId in the keyBusinessObjectException - if a problem occurred in the client-side business objectspublic ResourceAccess(Session session, com.primavera.infr.db.PrmRowSet rowSet, int iIndex) throws BusinessObjectException
session - the SessionrowSet - the PrmRowSet retrieved from the serveriIndex - the row index in the PrmRowSet associated with this business objectBusinessObjectException - if a problem occurred in the client-side business objectspublic Resource loadResource(String[] fields) throws ServerException, NetworkException, BusinessObjectException
fields - fields to loadServerException - if a problem occurred on the server-sideNetworkException - if a problem occurred in the network layerBusinessObjectException - if a problem occurred in the client-side business objectspublic User loadUser(String[] fields) throws ServerException, NetworkException, BusinessObjectException
fields - fields to loadServerException - if a problem occurred on the server-sideNetworkException - if a problem occurred in the network layerBusinessObjectException - if a problem occurred in the client-side business objectspublic ObjectId getUserObjectId() throws BusinessObjectException
BusinessObjectException - if a problem occurred in the client-side business objectspublic void setUserObjectId(ObjectId o) throws BusinessObjectException
o - the value to set this field toBusinessObjectException - if a problem occurred in the client-side business objectspublic ObjectId getResourceObjectId() throws BusinessObjectException
BusinessObjectException - if a problem occurred in the client-side business objectspublic void setResourceObjectId(ObjectId o) throws BusinessObjectException
o - the value to set this field toBusinessObjectException - if a problem occurred in the client-side business objectspublic String getResourceId() throws BusinessObjectException
BusinessObjectException - if a problem occurred in the client-side business objectspublic String getResourceName() throws BusinessObjectException
BusinessObjectException - if a problem occurred in the client-side business objectspublic String getUserName() throws BusinessObjectException
BusinessObjectException - if a problem occurred in the client-side business objectspublic Date getCreateDate() throws BusinessObjectException
BusinessObjectException - if a problem occurred in the client-side business objectspublic int getSequenceNumber()
throws BusinessObjectException
BusinessObjectException - if a problem occurred in the client-side business objectspublic void setSequenceNumber(int i)
throws BusinessObjectException
i - the value to set this field toBusinessObjectException - if a problem occurred in the client-side business objectspublic Date getLastUpdateDate() throws BusinessObjectException
BusinessObjectException - if a problem occurred in the client-side business objectspublic String getCreateUser() throws BusinessObjectException
BusinessObjectException - if a problem occurred in the client-side business objectspublic String getLastUpdateUser() throws BusinessObjectException
BusinessObjectException - if a problem occurred in the client-side business objectspublic static String[] getRequiredCreateFields()
public static String[] getFilterableFields()
public static String[] getInternalDefaultLoadFields()
public static String[] getAllFields()
public static String[] getInternalAllFields()
public static Set<String> getInternalAllFieldsSet()
public static String[] getWritableFields()
@Deprecated public static String[] getDefaultXMLExportFields()
public static String[] getMinimumXMLExportFields()
public String toString()
public static ObjectId createObjectId(ObjectId userObjectId, ObjectId resourceObjectId) throws InvalidValueException
userObjectId - the ObjectId of the associated user object.resourceObjectId - the ObjectId of the associated resource object.InvalidValueException - if one of the input parameters was invalid.IllegalArgumentException - if one of the input parameters was null.public ObjectId getObjectId() throws BusinessObjectException
getObjectId in class BusinessObjectBusinessObjectException - if the ObjectId fields were not loaded.public ObjectId create() throws ServerException, NetworkException, BusinessObjectException
ServerException - if a problem occurred on the server-sideNetworkException - if a problem occurred in the network layerBusinessObjectException - if a problem occurred in the client-side business objectspublic static ObjectId[] create(Session session, ResourceAccess[] resourceaccess) throws ServerException, NetworkException, BusinessObjectException
session - the Session objectresourceaccess - array of ResourceAccess objects to createServerException - if a problem occurred on the server-sideNetworkException - if a problem occurred in the network layerBusinessObjectException - if a problem occurred in the client-side business objectspublic static ResourceAccess load(Session session, String[] fields, ObjectId objId) throws ServerException, NetworkException, BusinessObjectException
session - the Session objectfields - fields to loadobjId - unique ID of the ResourceAccess objectServerException - if a problem occurred on the server-sideNetworkException - if a problem occurred in the network layerBusinessObjectException - if a problem occurred in the client-side business objectspublic static BOIterator<ResourceAccess> load(Session session, String[] fields, ObjectId[] objIds) throws ServerException, NetworkException, BusinessObjectException
session - the Session objectfields - fields to loadobjIds - object ids of the ResourceAccess objectsServerException - if a problem occurred on the server-sideNetworkException - if a problem occurred in the network layerBusinessObjectException - if a problem occurred in the client-side business objectspublic void delete()
throws ServerException,
NetworkException,
BusinessObjectException
delete in class com.primavera.integration.client.BOBaseServerException - if a problem occurred on the server-sideNetworkException - if a problem occurred in the network layerBusinessObjectException - if a problem occurred in the client-side business objectspublic static void delete(Session session, ResourceAccess[] resourceaccess) throws ServerException, NetworkException, BusinessObjectException
session - the Session objectresourceaccess - array of ResourceAccess objects to deleteServerException - if a problem occurred on the server-sideNetworkException - if a problem occurred in the network layerBusinessObjectException - if a problem occurred in the client-side business objectsCopyright © 2003, 2021, Oracle and/or its affiliates.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.