@BoxResourceType(value="storage_policy") public class BoxStoragePolicy extends BoxResource
Modifier and Type | Class and Description |
---|---|
class |
BoxStoragePolicy.Info
Contains information about the BoxStoragePolicy.
|
Modifier and Type | Field and Description |
---|---|
static URLTemplate |
STORAGE_POLICY_URL_TEMPLATE
Storage Policies URL Template.
|
static URLTemplate |
STORAGE_POLICY_WITH_ID_URL_TEMPLATE
Storage Policies URL Template.
|
Constructor and Description |
---|
BoxStoragePolicy(BoxAPIConnection api,
String id)
Constructs a BoxStoragePolicy with a given ID.
|
Modifier and Type | Method and Description |
---|---|
BoxStoragePolicyAssignment.Info |
assign(String userID)
Checks if there is already a Storage Policy Assignment and creates one if one does not exist.
|
static Iterable<BoxStoragePolicy.Info> |
getAll(BoxAPIConnection api,
int limit,
String... fields)
Returns all BoxStoragePolicy with specified fields.
|
static Iterable<BoxStoragePolicy.Info> |
getAll(BoxAPIConnection api,
String... fields)
Returns all BoxStoragePolicy with specified fields.
|
BoxStoragePolicy.Info |
getInfo(String... fields)
Gets information for a Box Storage Policy with optional fields.
|
equals, getAPI, getID, getResourceType, hashCode
public static final URLTemplate STORAGE_POLICY_URL_TEMPLATE
public static final URLTemplate STORAGE_POLICY_WITH_ID_URL_TEMPLATE
public BoxStoragePolicy(BoxAPIConnection api, String id)
api
- the API connection to be used by the BoxStoragePolicy.id
- the ID of the BoxStoragePolicy.public static Iterable<BoxStoragePolicy.Info> getAll(BoxAPIConnection api, String... fields)
api
- the API connection to be used by the resource.fields
- the fields to retrieve.public static Iterable<BoxStoragePolicy.Info> getAll(BoxAPIConnection api, int limit, String... fields)
api
- the API connection to be used by the resource.limit
- the limit of items per single response. The default is 100.fields
- the fields to retrieve.public BoxStoragePolicy.Info getInfo(String... fields)
fields
- the fields to retrieve.public BoxStoragePolicyAssignment.Info assign(String userID)
userID
- the ID of the user you want to assign the Storage Policy to.BoxStoragePolicyAssignment
.