Class DbxUserFilePropertiesRequests
- java.lang.Object
-
- com.dropbox.core.v2.fileproperties.DbxUserFilePropertiesRequests
-
public class DbxUserFilePropertiesRequests extends java.lang.ObjectRoutes in namespace "file_properties".
-
-
Constructor Summary
Constructors Constructor Description DbxUserFilePropertiesRequests(DbxRawClientV2 client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidpropertiesAdd(java.lang.String path, java.util.List<PropertyGroup> propertyGroups)Add property groups to a Dropbox file.voidpropertiesOverwrite(java.lang.String path, java.util.List<PropertyGroup> propertyGroups)Overwrite property groups associated with a file.voidpropertiesRemove(java.lang.String path, java.util.List<java.lang.String> propertyTemplateIds)Permanently removes the specified property group from the file.PropertiesSearchResultpropertiesSearch(java.util.List<PropertiesSearchQuery> queries)Search across property templates for particular property field values.PropertiesSearchResultpropertiesSearch(java.util.List<PropertiesSearchQuery> queries, TemplateFilter templateFilter)Search across property templates for particular property field values.PropertiesSearchResultpropertiesSearchContinue(java.lang.String cursor)Once a cursor has been retrieved frompropertiesSearch(List,TemplateFilter), use this to paginate through all search results.voidpropertiesUpdate(java.lang.String path, java.util.List<PropertyGroupUpdate> updatePropertyGroups)Add, update or remove properties associated with the supplied file and templates.AddTemplateResulttemplatesAddForUser(java.lang.String name, java.lang.String description, java.util.List<PropertyFieldTemplate> fields)Add a template associated with a user.GetTemplateResulttemplatesGetForUser(java.lang.String templateId)Get the schema for a specified template.ListTemplateResulttemplatesListForUser()Get the template identifiers for a team.voidtemplatesRemoveForUser(java.lang.String templateId)Permanently removes the specified template created fromtemplatesAddForUser(String,String,List).UpdateTemplateResulttemplatesUpdateForUser(java.lang.String templateId)Update a template associated with a user.TemplatesUpdateForUserBuildertemplatesUpdateForUserBuilder(java.lang.String templateId)Update a template associated with a user.
-
-
-
Constructor Detail
-
DbxUserFilePropertiesRequests
public DbxUserFilePropertiesRequests(DbxRawClientV2 client)
-
-
Method Detail
-
propertiesAdd
public void propertiesAdd(java.lang.String path, java.util.List<PropertyGroup> propertyGroups) throws AddPropertiesErrorException, DbxExceptionAdd property groups to a Dropbox file. SeetemplatesAddForUser(String,String,List)ortemplatesAddForTeamto 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:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.AddPropertiesErrorExceptionDbxException
-
propertiesOverwrite
public void propertiesOverwrite(java.lang.String path, java.util.List<PropertyGroup> propertyGroups) throws InvalidPropertyGroupErrorException, DbxExceptionOverwrite 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:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.InvalidPropertyGroupErrorExceptionDbxException
-
propertiesRemove
public void propertiesRemove(java.lang.String path, java.util.List<java.lang.String> propertyTemplateIds) throws RemovePropertiesErrorException, DbxExceptionPermanently 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)ortemplatesUpdateForTeam. To remove a template, seetemplatesRemoveForUser(String)ortemplatesRemoveForTeam.- 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)ortemplatesAddForTeam. Must not contain anullitem and not benull.- Throws:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.RemovePropertiesErrorExceptionDbxException
-
propertiesSearch
public PropertiesSearchResult propertiesSearch(java.util.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:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.PropertiesSearchErrorExceptionDbxException
-
propertiesSearch
public PropertiesSearchResult propertiesSearch(java.util.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:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.PropertiesSearchErrorExceptionDbxException
-
propertiesSearchContinue
public PropertiesSearchResult propertiesSearchContinue(java.lang.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:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.PropertiesSearchContinueErrorExceptionDbxException
-
propertiesUpdate
public void propertiesUpdate(java.lang.String path, java.util.List<PropertyGroupUpdate> updatePropertyGroups) throws UpdatePropertiesErrorException, DbxExceptionAdd, 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:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.UpdatePropertiesErrorExceptionDbxException
-
templatesAddForUser
public AddTemplateResult templatesAddForUser(java.lang.String name, java.lang.String description, java.util.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:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.ModifyTemplateErrorExceptionDbxException
-
templatesGetForUser
public GetTemplateResult templatesGetForUser(java.lang.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)ortemplatesAddForTeam. Must have length of at least 1, match pattern "(/|ptid:).*", and not benull.- Throws:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.TemplateErrorExceptionDbxException
-
templatesListForUser
public ListTemplateResult templatesListForUser() throws TemplateErrorException, DbxException
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
public void templatesRemoveForUser(java.lang.String templateId) throws TemplateErrorException, DbxExceptionPermanently 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)ortemplatesAddForTeam. Must have length of at least 1, match pattern "(/|ptid:).*", and not benull.- Throws:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.TemplateErrorExceptionDbxException
-
templatesUpdateForUser
public UpdateTemplateResult templatesUpdateForUser(java.lang.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)ortemplatesAddForTeam. Must have length of at least 1, match pattern "(/|ptid:).*", and not benull.- Throws:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.ModifyTemplateErrorExceptionDbxException
-
templatesUpdateForUserBuilder
public TemplatesUpdateForUserBuilder templatesUpdateForUserBuilder(java.lang.String templateId)
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)ortemplatesAddForTeam. 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:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
-
-