Class DbxUserFilePropertiesRequests
java.lang.Object
com.dropbox.core.v2.fileproperties.DbxUserFilePropertiesRequests
Routes in namespace "file_properties".
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidpropertiesAdd(String path, List<PropertyGroup> propertyGroups) Add property groups to a Dropbox file.voidpropertiesOverwrite(String path, List<PropertyGroup> propertyGroups) Overwrite property groups associated with a file.voidpropertiesRemove(String path, List<String> propertyTemplateIds) Permanently removes the specified property group from the file.propertiesSearch(List<PropertiesSearchQuery> queries) Search across property templates for particular property field values.propertiesSearch(List<PropertiesSearchQuery> queries, TemplateFilter templateFilter) Search across property templates for particular property field values.propertiesSearchContinue(String cursor) Once a cursor has been retrieved frompropertiesSearch(List,TemplateFilter), use this to paginate through all search results.voidpropertiesUpdate(String path, List<PropertyGroupUpdate> updatePropertyGroups) Add, update or remove properties associated with the supplied file and templates.templatesAddForUser(String name, String description, List<PropertyFieldTemplate> fields) Add a template associated with a user.templatesGetForUser(String templateId) Get the schema for a specified template.Get the template identifiers for a team.voidtemplatesRemoveForUser(String templateId) Permanently removes the specified template created fromtemplatesAddForUser(String,String,List).templatesUpdateForUser(String templateId) Update a template associated with a user.templatesUpdateForUserBuilder(String templateId) Update a template associated with a user.
-
Constructor Details
-
DbxUserFilePropertiesRequests
-
-
Method Details
-
propertiesAdd
public void propertiesAdd(String path, List<PropertyGroup> propertyGroups) throws AddPropertiesErrorException, DbxException Add property groups to a Dropbox file. SeetemplatesAddForUser(String,String,List)orDbxTeamFilePropertiesRequests.templatesAddForTeam(String,String,List)to create new templates.- Parameters:
path- A unique identifier for the file or folder. Must match pattern "/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/.*)?)" and not benull.propertyGroups- The property groups which are to be added to a Dropbox file. No two groups in the input should refer to the same template. Must not contain anullitem and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.AddPropertiesErrorExceptionDbxException
-
propertiesOverwrite
public void propertiesOverwrite(String path, List<PropertyGroup> propertyGroups) throws InvalidPropertyGroupErrorException, DbxException Overwrite property groups associated with a file. This endpoint should be used instead ofpropertiesUpdate(String,List)when property groups are being updated via a "snapshot" instead of via a "delta". In other words, this endpoint will delete all omitted fields from a property group, whereaspropertiesUpdate(String,List)will only delete fields that are explicitly marked for deletion.- Parameters:
path- A unique identifier for the file or folder. Must match pattern "/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/.*)?)" and not benull.propertyGroups- The property groups "snapshot" updates to force apply. No two groups in the input should refer to the same template. Must contain at least 1 items, not contain anullitem, and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.InvalidPropertyGroupErrorExceptionDbxException
-
propertiesRemove
public void propertiesRemove(String path, List<String> propertyTemplateIds) throws RemovePropertiesErrorException, DbxException Permanently removes the specified property group from the file. To remove specific property field key value pairs, seepropertiesUpdate(String,List). To update a template, seetemplatesUpdateForUser(String)orDbxTeamFilePropertiesRequests.templatesUpdateForTeam(String). To remove a template, seetemplatesRemoveForUser(String)orDbxTeamFilePropertiesRequests.templatesRemoveForTeam(String).- Parameters:
path- A unique identifier for the file or folder. Must match pattern "/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/.*)?)" and not benull.propertyTemplateIds- A list of identifiers for a template created bytemplatesAddForUser(String,String,List)orDbxTeamFilePropertiesRequests.templatesAddForTeam(String,String,List). Must not contain anullitem and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.RemovePropertiesErrorExceptionDbxException
-
propertiesSearch
public PropertiesSearchResult propertiesSearch(List<PropertiesSearchQuery> queries) throws PropertiesSearchErrorException, DbxException Search across property templates for particular property field values.The
templateFilterrequest parameter will default toTemplateFilter.FILTER_NONE(seepropertiesSearch(List,TemplateFilter)).- Parameters:
queries- Queries to search. Must contain at least 1 items, not contain anullitem, and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.PropertiesSearchErrorExceptionDbxException
-
propertiesSearch
public PropertiesSearchResult propertiesSearch(List<PropertiesSearchQuery> queries, TemplateFilter templateFilter) throws PropertiesSearchErrorException, DbxException Search across property templates for particular property field values.- Parameters:
queries- Queries to search. Must contain at least 1 items, not contain anullitem, and not benull.templateFilter- Filter results to contain only properties associated with these template IDs. Must not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.PropertiesSearchErrorExceptionDbxException
-
propertiesSearchContinue
public PropertiesSearchResult propertiesSearchContinue(String cursor) throws PropertiesSearchContinueErrorException, DbxException Once a cursor has been retrieved frompropertiesSearch(List,TemplateFilter), use this to paginate through all search results.- Parameters:
cursor- The cursor returned by your last call topropertiesSearch(List,TemplateFilter)orpropertiesSearchContinue(String). Must have length of at least 1 and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.PropertiesSearchContinueErrorExceptionDbxException
-
propertiesUpdate
public void propertiesUpdate(String path, List<PropertyGroupUpdate> updatePropertyGroups) throws UpdatePropertiesErrorException, DbxException Add, update or remove properties associated with the supplied file and templates. This endpoint should be used instead ofpropertiesOverwrite(String,List)when property groups are being updated via a "delta" instead of via a "snapshot" . In other words, this endpoint will not delete any omitted fields from a property group, whereaspropertiesOverwrite(String,List)will delete any fields that are omitted from a property group.- Parameters:
path- A unique identifier for the file or folder. Must match pattern "/(.|[\\r\\n])*|id:.*|(ns:[0-9]+(/.*)?)" and not benull.updatePropertyGroups- The property groups "delta" updates to apply. Must not contain anullitem and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.UpdatePropertiesErrorExceptionDbxException
-
templatesAddForUser
public AddTemplateResult templatesAddForUser(String name, String description, List<PropertyFieldTemplate> fields) throws ModifyTemplateErrorException, DbxException Add a template associated with a user. SeepropertiesAdd(String,List)to add properties to a file. This endpoint can't be called on a team member or admin's behalf.- Parameters:
name- Display name for the template. Template names can be up to 256 bytes. Must not benull.description- Description for the template. Template descriptions can be up to 1024 bytes. Must not benull.fields- Definitions of the property fields associated with this template. There can be up to 32 properties in a single template. Must not contain anullitem and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.ModifyTemplateErrorExceptionDbxException
-
templatesGetForUser
public GetTemplateResult templatesGetForUser(String templateId) throws TemplateErrorException, DbxException Get the schema for a specified template. This endpoint can't be called on a team member or admin's behalf.- Parameters:
templateId- An identifier for template added by route SeetemplatesAddForUser(String,String,List)orDbxTeamFilePropertiesRequests.templatesAddForTeam(String,String,List). Must have length of at least 1, match pattern "(/|ptid:).*", and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.TemplateErrorExceptionDbxException
-
templatesListForUser
Get the template identifiers for a team. To get the schema of each template usetemplatesGetForUser(String). This endpoint can't be called on a team member or admin's behalf.- Throws:
TemplateErrorExceptionDbxException
-
templatesRemoveForUser
Permanently removes the specified template created fromtemplatesAddForUser(String,String,List). All properties associated with the template will also be removed. This action cannot be undone.- Parameters:
templateId- An identifier for a template created bytemplatesAddForUser(String,String,List)orDbxTeamFilePropertiesRequests.templatesAddForTeam(String,String,List). Must have length of at least 1, match pattern "(/|ptid:).*", and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.TemplateErrorExceptionDbxException
-
templatesUpdateForUser
public UpdateTemplateResult templatesUpdateForUser(String templateId) throws ModifyTemplateErrorException, DbxException Update a template associated with a user. This route can update the template name, the template description and add optional properties to templates. This endpoint can't be called on a team member or admin's behalf.- Parameters:
templateId- An identifier for template added by SeetemplatesAddForUser(String,String,List)orDbxTeamFilePropertiesRequests.templatesAddForTeam(String,String,List). Must have length of at least 1, match pattern "(/|ptid:).*", and not benull.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.ModifyTemplateErrorExceptionDbxException
-
templatesUpdateForUserBuilder
Update a template associated with a user. This route can update the template name, the template description and add optional properties to templates. This endpoint can't be called on a team member or admin's behalf.- Parameters:
templateId- An identifier for template added by SeetemplatesAddForUser(String,String,List)orDbxTeamFilePropertiesRequests.templatesAddForTeam(String,String,List). Must have length of at least 1, match pattern "(/|ptid:).*", and not benull.- Returns:
- Request builder for configuring request parameters and completing the request.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-