Class DbxUserFilePropertiesRequests
- java.lang.Object
-
- com.dropbox.core.v2.fileproperties.DbxUserFilePropertiesRequests
-
public class DbxUserFilePropertiesRequests extends java.lang.Object
Routes 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 void
propertiesAdd(java.lang.String path, java.util.List<PropertyGroup> propertyGroups)
Add property groups to a Dropbox file.void
propertiesOverwrite(java.lang.String path, java.util.List<PropertyGroup> propertyGroups)
Overwrite property groups associated with a file.void
propertiesRemove(java.lang.String path, java.util.List<java.lang.String> propertyTemplateIds)
Permanently removes the specified property group from the file.PropertiesSearchResult
propertiesSearch(java.util.List<PropertiesSearchQuery> queries)
Search across property templates for particular property field values.PropertiesSearchResult
propertiesSearch(java.util.List<PropertiesSearchQuery> queries, TemplateFilter templateFilter)
Search across property templates for particular property field values.PropertiesSearchResult
propertiesSearchContinue(java.lang.String cursor)
Once a cursor has been retrieved frompropertiesSearch(List,TemplateFilter)
, use this to paginate through all search results.void
propertiesUpdate(java.lang.String path, java.util.List<PropertyGroupUpdate> updatePropertyGroups)
Add, update or remove properties associated with the supplied file and templates.AddTemplateResult
templatesAddForUser(java.lang.String name, java.lang.String description, java.util.List<PropertyFieldTemplate> fields)
Add a template associated with a user.GetTemplateResult
templatesGetForUser(java.lang.String templateId)
Get the schema for a specified template.ListTemplateResult
templatesListForUser()
Get the template identifiers for a team.void
templatesRemoveForUser(java.lang.String templateId)
Permanently removes the specified template created fromtemplatesAddForUser(String,String,List)
.UpdateTemplateResult
templatesUpdateForUser(java.lang.String templateId)
Update a template associated with a user.TemplatesUpdateForUserBuilder
templatesUpdateForUserBuilder(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, DbxException
Add property groups to a Dropbox file. SeetemplatesAddForUser(String,String,List)
ortemplatesAddForTeam
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 anull
item and not benull
.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.AddPropertiesErrorException
DbxException
-
propertiesOverwrite
public void propertiesOverwrite(java.lang.String path, java.util.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 anull
item, and not benull
.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.InvalidPropertyGroupErrorException
DbxException
-
propertiesRemove
public void propertiesRemove(java.lang.String path, java.util.List<java.lang.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)
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 anull
item and not benull
.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.RemovePropertiesErrorException
DbxException
-
propertiesSearch
public PropertiesSearchResult propertiesSearch(java.util.List<PropertiesSearchQuery> queries) throws PropertiesSearchErrorException, DbxException
Search across property templates for particular property field values.The
templateFilter
request parameter will default toTemplateFilter.FILTER_NONE
(seepropertiesSearch(List,TemplateFilter)
).- Parameters:
queries
- Queries to search. Must contain at least 1 items, not contain anull
item, and not benull
.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.PropertiesSearchErrorException
DbxException
-
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 anull
item, 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.PropertiesSearchErrorException
DbxException
-
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.PropertiesSearchContinueErrorException
DbxException
-
propertiesUpdate
public void propertiesUpdate(java.lang.String path, java.util.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 anull
item and not benull
.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.UpdatePropertiesErrorException
DbxException
-
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 anull
item and not benull
.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.ModifyTemplateErrorException
DbxException
-
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.TemplateErrorException
DbxException
-
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:
TemplateErrorException
DbxException
-
templatesRemoveForUser
public void templatesRemoveForUser(java.lang.String templateId) throws TemplateErrorException, DbxException
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)
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.TemplateErrorException
DbxException
-
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.ModifyTemplateErrorException
DbxException
-
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.
-
-