@BoxResourceType(value="legal_hold_assignment") public class BoxLegalHoldAssignment extends BoxResource
Unless otherwise noted, the methods in this class can throw an unchecked {@link BoxAPIException} (unchecked meaning that the compiler won't force you to handle it) if an error occurs. If you wish to implement custom error handling for errors related to the Box REST API, you should capture this exception explicitly.
Modifier and Type | Class and Description |
---|---|
class |
BoxLegalHoldAssignment.Info
Contains information about the legal hold policy.
|
Modifier and Type | Field and Description |
---|---|
static URLTemplate |
ASSIGNMENTS_URL_TEMPLATE
The URL template used for operation with legal hold policy assignments.
|
static URLTemplate |
LEGAL_HOLD_ASSIGNMENT_URL_TEMPLATE
The URL template used for operation with legal hold policy assignment with given ID.
|
static String |
TYPE_FILE
Used to assign legal hold policy to file.
|
static String |
TYPE_FILE_VERSION
Used to assign legal hold policy to file version.
|
static String |
TYPE_FOLDER
Used to assign legal hold policy to folder.
|
static String |
TYPE_USER
Used to assign legal hold policy to user.
|
Constructor and Description |
---|
BoxLegalHoldAssignment(BoxAPIConnection api,
String id)
Constructs a BoxLegalHoldAssignment for a resource with a given ID.
|
Modifier and Type | Method and Description |
---|---|
static BoxLegalHoldAssignment.Info |
create(BoxAPIConnection api,
String policyID,
String resourceType,
String resourceID)
Creates new legal hold policy assignment.
|
void |
delete()
Deletes the legal hold policy assignment.
|
BoxLegalHoldAssignment.Info |
getInfo(String... fields) |
equals, getAPI, getID, getResourceType, hashCode
public static final String TYPE_FILE_VERSION
public static final String TYPE_FOLDER
public static final URLTemplate ASSIGNMENTS_URL_TEMPLATE
public static final URLTemplate LEGAL_HOLD_ASSIGNMENT_URL_TEMPLATE
public BoxLegalHoldAssignment(BoxAPIConnection api, String id)
api
- the API connection to be used by the resource.id
- the ID of the resource.public static BoxLegalHoldAssignment.Info create(BoxAPIConnection api, String policyID, String resourceType, String resourceID)
api
- the API connection to be used by the resource.policyID
- ID of policy to create assignment for.resourceType
- type of target resource. Can be 'file_version', 'file', 'folder', or 'user'.resourceID
- ID of the target resource.public void delete()
public BoxLegalHoldAssignment.Info getInfo(String... fields)
fields
- the fields to retrieve.