public class AssetTypeClient extends MindsphereAPIClient
Modifier and Type | Class and Description |
---|---|
static class |
AssetTypeClient.ClientBuilder |
MindsphereAPIClient.Builder<T extends MindsphereAPIClient.Builder<T>>
credentials, restClientConfig, restTemplate
Modifier | Constructor and Description |
---|---|
protected |
AssetTypeClient(AssetTypeClient.ClientBuilder builder) |
Modifier and Type | Method and Description |
---|---|
static AssetTypeClient.ClientBuilder |
builder() |
AssetTypeResource |
createAssetType(String id,
AssetTypeDto assettype)
Create an asset type
|
boolean |
deleteAssetType(String id,
String ifMatch)
Delete an asset type Deletes an asset type.
|
AssetTypeResource |
deleteFileAssignment(String id,
String key,
String ifMatch)
Deletes a file assignment from an asset type.
|
AssetTypeResource |
getAssetTypeById(String id)
Read an asset type
|
AssetTypeResource |
getAssetTypeById(String id,
String ifNoneMatch)
Read an asset type
|
AssetTypeResource |
getAssetTypeById(String id,
String ifNoneMatch,
Boolean exploded)
Read an asset type
|
AssetTypes |
getAssetTypes()
List all asset types
|
AssetTypes |
getAssetTypes(Integer page,
Integer size)
List all asset types
|
AssetTypes |
getAssetTypes(Integer page,
Integer size,
String sort,
String filter,
String ifNoneMatch)
List all asset types
|
AssetTypes |
getAssetTypes(String sort,
String filter)
List all asset types
|
AssetTypeResource |
updateAssetType(String id,
AssetTypeDto assettype,
String ifMatch)
Update an asset type
|
AssetTypeResource |
updateFileAssignment(String id,
String key,
FileAssignmentDto assignment,
String ifMatch)
Add a new file assignment to a given asset type.
|
protected AssetTypeClient(AssetTypeClient.ClientBuilder builder)
public static AssetTypeClient.ClientBuilder builder()
public AssetTypes getAssetTypes(Integer page, Integer size, String sort, String filter, String ifNoneMatch) throws MindsphereException
Response Status Codes
200 - Array of asset types matched the tenant scope and filter criterias
304 - Asset-types page not changed
400 - Invalid request
401 - User is not authenticated
403 - User is not authorized for request
500 - Server error, for more information see errorcode and message
page
- Specifies the requested page indexsize
- Specifies the number of elements in a pagesort
- Specifies the ordering of returned elementsfilter
- Specifies the additional filtering criteria, e.g. "{\"name\":\"assettype_name\"}" or as an encoded string, "%7B%22name%22:%22assettype_name%22%7D"ifNoneMatch
- ETag hash of previous request to allow cachingMindsphereException
- thrown if an error occurs while attempting to invoke the APIpublic AssetTypes getAssetTypes() throws MindsphereException
Response Status Codes
200 - Array of asset types matched the tenant scope and filter criterias
304 - Asset-types page not changed
400 - Invalid request
401 - User is not authenticated
403 - User is not authorized for request
500 - Server error, for more information see errorcode and message
MindsphereException
- thrown if an error occurs while attempting to invoke the APIpublic AssetTypes getAssetTypes(Integer page, Integer size) throws MindsphereException
Response Status Codes
200 - Array of asset types matched the tenant scope and filter criterias
304 - Asset-types page not changed
400 - Invalid request
401 - User is not authenticated
403 - User is not authorized for request
500 - Server error, for more information see errorcode and message
page
- Specifies the requested page indexsize
- Specifies the number of elements in a pageMindsphereException
- thrown if an error occurs while attempting to invoke the APIpublic AssetTypes getAssetTypes(String sort, String filter) throws MindsphereException
Response Status Codes
200 - Array of asset types matched the tenant scope and filter criterias
304 - Asset-types page not changed
400 - Invalid request
401 - User is not authenticated
403 - User is not authorized for request
500 - Server error, for more information see error-code and message
sort
- Specifies the ordering of returned elementsfilter
- Specifies the additional filtering criteria, e.g. "{\"name\":\"assettype_name\"}" or as an encoded string, "%7B%22name%22:%22assettype_name%22%7D"MindsphereException
- thrown if an error occurs while attempting to invoke the APIpublic AssetTypeResource getAssetTypeById(String id, String ifNoneMatch, Boolean exploded) throws MindsphereException
Response Status Codes
200 - Returns the asset type
304 - AssetType not changed
400 - Invalid request
401 - User is not authenticated
403 - User is not authorized for request
500 - Server error, for more information see errorcode and message
id
- id Unique identifierifNoneMatch
- ETag hash of previous request to allow cachingexploded
- Specifies if the asset type should include all of it's
inherited variables and aspects. Default is false.MindsphereException
- thrown if an error occurs while attempting to invoke the APIpublic AssetTypeResource getAssetTypeById(String id, String ifNoneMatch) throws MindsphereException
Response Status Codes
200 - Returns the asset type
304 - AssetType not changed
400 - Invalid request
401 - User is not authenticated
403 - User is not authorized for request
500 - Server error, for more information see errorcode and message
id
- id Unique identifierifNoneMatch
- ETag hash of previous request to allow caching inherited variables
and aspects. Default is false.MindsphereException
- thrown if an error occurs while attempting to invoke the APIpublic AssetTypeResource getAssetTypeById(String id) throws MindsphereException
Response Status Codes
200 - Returns the asset type
304 - AssetType not changed
400 - Invalid request
401 - User is not authenticated
403 - User is not authorized for request
500 - Server error, for more information see errorcode and message
id
- id Unique identifierMindsphereException
- thrown if an error occurs while attempting to invoke the APIpublic AssetTypeResource updateAssetType(String id, AssetTypeDto assettype, String ifMatch) throws MindsphereException
Response Status Codes 200 - The asset type has been updated
400 - Invalid request
401 - User is not authenticated
403 - User is not authorized for request
412 - AssetType is changed in the background
500 - Server error, for more information see errorcode and message
id
- id Unique identifierassettype
- asset typeifMatch
- Last known version to facilitate optimistic lockingMindsphereException
- thrown if an error occurs while attempting to invoke the APIpublic AssetTypeResource createAssetType(String id, AssetTypeDto assettype) throws MindsphereException
201 - The asset type has been created
400 - Invalid request
401 - User is not authenticated
403 - User is not authorized for request
412 - AssetType is changed in the background
500 - Server error, for more information see errorcode and message
id
- id Unique identifierassettype
- asset typeMindsphereException
- thrown if an error occurs while attempting to invoke the APIpublic boolean deleteAssetType(String id, String ifMatch) throws MindsphereException
Response Status Codes
204 - Asset type deletion was successful
400 - Invalid request
401 - User is not authenticated
403 - User is not authorized for request
412 - AssetType is changed in the background
500 - Server error, for more information see errorcode and message
id
- id Unique identifierifMatch
- Last known version to facilitate optimistic lockingMindsphereException
- thrown if an error occurs while attempting to invoke the APIpublic AssetTypeResource updateFileAssignment(String id, String key, FileAssignmentDto assignment, String ifMatch) throws MindsphereException
Response Status Codes 200 - The assignment has been updated or a new assignment has been added
400 - Invalid request
401 - User is not authenticated
403 - User is not authorized for request
412 - AssetType is changed in the background
500 - Server error, for more information see errorcode and message
id
- id Unique identifierkey
- key Keyword for the file to be assigned to an asset or asset type.assignment
- Data for file assignmentifMatch
- Last known version to facilitate optimistic lockingMindsphereException
- thrown if an error occurs while attempting to invoke the APIpublic AssetTypeResource deleteFileAssignment(String id, String key, String ifMatch) throws MindsphereException
Response Status Codes
200 -The assignment has been deleted
400 - Invalid request
401 - User is not authenticated
403 - User is not authorized for request
412 - AssetType is changed in the background
500 - Server error, for more information see errorcode and message
id
- id Unique identifierkey
- Keyword for the file to be assigned to an asset or asset type.ifMatch
- Last known version to facilitate optimistic lockingMindsphereException
- thrown if an error occurs while attempting to invoke the API