Package com.aserto.directory.v3
Class DirectoryClient
java.lang.Object
com.aserto.directory.v3.DirectoryClient
- All Implemented Interfaces:
DirectoryClientExporter,DirectoryClientImporter,DirectoryClientModel,DirectoryClientReader,DirectoryClientWriter
public class DirectoryClient
extends Object
implements DirectoryClientReader, DirectoryClientWriter, DirectoryClientModel, DirectoryClientImporter, DirectoryClientExporter
-
Constructor Summary
ConstructorsConstructorDescriptionDirectoryClient(io.grpc.ManagedChannel managedChannel) DirectoryClient(io.grpc.ManagedChannel readerChannel, io.grpc.ManagedChannel writerChannel, io.grpc.ManagedChannel importerChannel, io.grpc.ManagedChannel exporterChannel, io.grpc.ManagedChannel modelChannel) -
Method Summary
Modifier and TypeMethodDescriptioncom.aserto.directory.reader.v3.CheckResponsecheck(String objectType, String objectId, String relationName, String subjectType, String subjectId) com.aserto.directory.reader.v3.CheckResponsecheck(String objectType, String objectId, String relationName, String subjectType, String subjectId, boolean trace) com.aserto.directory.reader.v3.CheckPermissionResponsecheckPermission(String objectType, String objectId, String subjectType, String subjectId, String permissionName) Deprecated.com.aserto.directory.reader.v3.CheckPermissionResponsecheckPermission(String objectType, String objectId, String subjectType, String subjectId, String permissionName, boolean trace) Deprecated.use @linkcheck(String, String, String, String, String, boolean)instead.com.aserto.directory.reader.v3.CheckRelationResponsecheckRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId) Deprecated.use @linkcheck(String, String, String, String, String)instead.com.aserto.directory.reader.v3.CheckRelationResponsecheckRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId, boolean trace) Deprecated.use @linkcheck(String, String, String, String, String, boolean)instead.com.aserto.directory.model.v3.DeleteManifestResponsecom.aserto.directory.writer.v3.DeleteObjectResponsedeleteObject(String type, String id) com.aserto.directory.writer.v3.DeleteObjectResponsedeleteObject(String type, String id, boolean withRelations) com.aserto.directory.writer.v3.DeleteRelationResponsedeleteRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId) com.aserto.directory.writer.v3.DeleteRelationResponsedeleteRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId, String subjectRelation) Iterator<com.aserto.directory.exporter.v3.ExportResponse>exportData(com.aserto.directory.exporter.v3.Option options) Iterator<com.aserto.directory.exporter.v3.ExportResponse>exportData(com.aserto.directory.exporter.v3.Option options, com.google.protobuf.Timestamp startFrom) com.aserto.directory.reader.v3.GetGraphResponsegetGraph(com.aserto.directory.reader.v3.GetGraphRequest getGraphRequest) com.aserto.directory.model.v3.GetManifestResponsecom.aserto.directory.reader.v3.GetObjectResponsecom.aserto.directory.reader.v3.GetObjectResponsecom.aserto.directory.reader.v3.GetObjectManyResponsegetObjectManyRequest(List<com.aserto.directory.common.v3.ObjectIdentifier> objectIdentifiers) com.aserto.directory.reader.v3.GetObjectsResponsegetObjects(String type) com.aserto.directory.reader.v3.GetObjectsResponsegetObjects(String type, int pageSize, String pageToken) com.aserto.directory.reader.v3.GetRelationResponsegetRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId) com.aserto.directory.reader.v3.GetRelationResponsegetRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId, boolean withObjects) com.aserto.directory.reader.v3.GetRelationResponsegetRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId, String subjectRelation) com.aserto.directory.reader.v3.GetRelationResponsegetRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId, String subjectRelation, boolean withObjects) com.aserto.directory.reader.v3.GetRelationsResponsegetRelations(com.aserto.directory.reader.v3.GetRelationsRequest relationsRequest) voidimportData(Stream<ImportElement> importStream) Sets and/or deletes a stream of objects and relations without any feedback.io.grpc.StatusimportData(Stream<ImportElement> importStream, ImportHandler handler) Sets and/or deletes a stream of objects and relations.voidsetManifest(String manifest) com.aserto.directory.writer.v3.SetObjectResponsecom.aserto.directory.writer.v3.SetObjectResponsesetObject(String type, String id, String displayName, com.google.protobuf.Struct properties, String hash) com.aserto.directory.writer.v3.SetRelationResponsesetRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId) com.aserto.directory.writer.v3.SetRelationResponsesetRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId, String subjectRelation) com.aserto.directory.writer.v3.SetRelationResponsesetRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId, String subjectRelation, String hash)
-
Constructor Details
-
DirectoryClient
public DirectoryClient(io.grpc.ManagedChannel readerChannel, io.grpc.ManagedChannel writerChannel, io.grpc.ManagedChannel importerChannel, io.grpc.ManagedChannel exporterChannel, io.grpc.ManagedChannel modelChannel) -
DirectoryClient
public DirectoryClient(io.grpc.ManagedChannel managedChannel)
-
-
Method Details
-
getObject
public com.aserto.directory.reader.v3.GetObjectResponse getObject(String type, String id) throws UninitilizedClientException - Specified by:
getObjectin interfaceDirectoryClientReader- Throws:
UninitilizedClientException
-
getObject
public com.aserto.directory.reader.v3.GetObjectResponse getObject(String type, String id, boolean withRelations) throws UninitilizedClientException - Specified by:
getObjectin interfaceDirectoryClientReader- Throws:
UninitilizedClientException
-
getObjects
public com.aserto.directory.reader.v3.GetObjectsResponse getObjects(String type) throws UninitilizedClientException - Specified by:
getObjectsin interfaceDirectoryClientReader- Throws:
UninitilizedClientException
-
getObjects
public com.aserto.directory.reader.v3.GetObjectsResponse getObjects(String type, int pageSize, String pageToken) throws UninitilizedClientException - Specified by:
getObjectsin interfaceDirectoryClientReader- Throws:
UninitilizedClientException
-
getObjectManyRequest
public com.aserto.directory.reader.v3.GetObjectManyResponse getObjectManyRequest(List<com.aserto.directory.common.v3.ObjectIdentifier> objectIdentifiers) throws UninitilizedClientException - Specified by:
getObjectManyRequestin interfaceDirectoryClientReader- Throws:
UninitilizedClientException
-
getRelation
public com.aserto.directory.reader.v3.GetRelationResponse getRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId) throws UninitilizedClientException - Specified by:
getRelationin interfaceDirectoryClientReader- Throws:
UninitilizedClientException
-
getRelation
public com.aserto.directory.reader.v3.GetRelationResponse getRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId, boolean withObjects) throws UninitilizedClientException - Specified by:
getRelationin interfaceDirectoryClientReader- Throws:
UninitilizedClientException
-
getRelation
public com.aserto.directory.reader.v3.GetRelationResponse getRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId, String subjectRelation) throws UninitilizedClientException - Specified by:
getRelationin interfaceDirectoryClientReader- Throws:
UninitilizedClientException
-
getRelation
public com.aserto.directory.reader.v3.GetRelationResponse getRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId, String subjectRelation, boolean withObjects) throws UninitilizedClientException - Specified by:
getRelationin interfaceDirectoryClientReader- Throws:
UninitilizedClientException
-
getRelations
public com.aserto.directory.reader.v3.GetRelationsResponse getRelations(com.aserto.directory.reader.v3.GetRelationsRequest relationsRequest) throws UninitilizedClientException - Specified by:
getRelationsin interfaceDirectoryClientReader- Throws:
UninitilizedClientException
-
checkPermission
@Deprecated public com.aserto.directory.reader.v3.CheckPermissionResponse checkPermission(String objectType, String objectId, String subjectType, String subjectId, String permissionName) throws UninitilizedClientException Deprecated.use @linkcheck(String, String, String, String, String)instead.Checks whether a subject has a given permission on an object.- Specified by:
checkPermissionin interfaceDirectoryClientReader- Throws:
UninitilizedClientException
-
checkPermission
@Deprecated public com.aserto.directory.reader.v3.CheckPermissionResponse checkPermission(String objectType, String objectId, String subjectType, String subjectId, String permissionName, boolean trace) throws UninitilizedClientException Deprecated.use @linkcheck(String, String, String, String, String, boolean)instead.Checks whether a subject has a given permission on an object.- Specified by:
checkPermissionin interfaceDirectoryClientReader- Throws:
UninitilizedClientException
-
checkRelation
@Deprecated public com.aserto.directory.reader.v3.CheckRelationResponse checkRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId) throws UninitilizedClientException Deprecated.use @linkcheck(String, String, String, String, String)instead.Checks whether a subject has a given relation to an object.- Specified by:
checkRelationin interfaceDirectoryClientReader- Throws:
UninitilizedClientException
-
checkRelation
@Deprecated public com.aserto.directory.reader.v3.CheckRelationResponse checkRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId, boolean trace) throws UninitilizedClientException Deprecated.use @linkcheck(String, String, String, String, String, boolean)instead.Checks whether a subject has a given relation to an object.- Specified by:
checkRelationin interfaceDirectoryClientReader- Throws:
UninitilizedClientException
-
check
public com.aserto.directory.reader.v3.CheckResponse check(String objectType, String objectId, String relationName, String subjectType, String subjectId) throws UninitilizedClientException - Specified by:
checkin interfaceDirectoryClientReader- Throws:
UninitilizedClientException
-
check
public com.aserto.directory.reader.v3.CheckResponse check(String objectType, String objectId, String relationName, String subjectType, String subjectId, boolean trace) throws UninitilizedClientException - Specified by:
checkin interfaceDirectoryClientReader- Throws:
UninitilizedClientException
-
getGraph
public com.aserto.directory.reader.v3.GetGraphResponse getGraph(com.aserto.directory.reader.v3.GetGraphRequest getGraphRequest) - Specified by:
getGraphin interfaceDirectoryClientReader
-
setObject
public com.aserto.directory.writer.v3.SetObjectResponse setObject(String type, String id) throws UninitilizedClientException - Specified by:
setObjectin interfaceDirectoryClientWriter- Throws:
UninitilizedClientException
-
setObject
public com.aserto.directory.writer.v3.SetObjectResponse setObject(String type, String id, String displayName, com.google.protobuf.Struct properties, String hash) throws UninitilizedClientException - Specified by:
setObjectin interfaceDirectoryClientWriter- Throws:
UninitilizedClientException
-
deleteObject
public com.aserto.directory.writer.v3.DeleteObjectResponse deleteObject(String type, String id) throws UninitilizedClientException - Specified by:
deleteObjectin interfaceDirectoryClientWriter- Throws:
UninitilizedClientException
-
deleteObject
public com.aserto.directory.writer.v3.DeleteObjectResponse deleteObject(String type, String id, boolean withRelations) throws UninitilizedClientException - Specified by:
deleteObjectin interfaceDirectoryClientWriter- Throws:
UninitilizedClientException
-
setRelation
public com.aserto.directory.writer.v3.SetRelationResponse setRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId) throws UninitilizedClientException - Specified by:
setRelationin interfaceDirectoryClientWriter- Throws:
UninitilizedClientException
-
setRelation
public com.aserto.directory.writer.v3.SetRelationResponse setRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId, String subjectRelation) throws UninitilizedClientException - Specified by:
setRelationin interfaceDirectoryClientWriter- Throws:
UninitilizedClientException
-
setRelation
public com.aserto.directory.writer.v3.SetRelationResponse setRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId, String subjectRelation, String hash) throws UninitilizedClientException - Specified by:
setRelationin interfaceDirectoryClientWriter- Throws:
UninitilizedClientException
-
deleteRelation
public com.aserto.directory.writer.v3.DeleteRelationResponse deleteRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId) throws UninitilizedClientException - Specified by:
deleteRelationin interfaceDirectoryClientWriter- Throws:
UninitilizedClientException
-
deleteRelation
public com.aserto.directory.writer.v3.DeleteRelationResponse deleteRelation(String objectType, String objectId, String relationName, String subjectType, String subjectId, String subjectRelation) throws UninitilizedClientException - Specified by:
deleteRelationin interfaceDirectoryClientWriter- Throws:
UninitilizedClientException
-
getManifest
public com.aserto.directory.model.v3.GetManifestResponse getManifest() throws UninitilizedClientException- Specified by:
getManifestin interfaceDirectoryClientModel- Throws:
UninitilizedClientException
-
setManifest
- Specified by:
setManifestin interfaceDirectoryClientModel- Throws:
InterruptedExceptionUninitilizedClientException
-
deleteManifest
public com.aserto.directory.model.v3.DeleteManifestResponse deleteManifest() throws UninitilizedClientException- Specified by:
deleteManifestin interfaceDirectoryClientModel- Throws:
UninitilizedClientException
-
importData
public void importData(Stream<ImportElement> importStream) throws InterruptedException, UninitilizedClientException Description copied from interface:DirectoryClientImporterSets and/or deletes a stream of objects and relations without any feedback.- Specified by:
importDatain interfaceDirectoryClientImporter- Parameters:
importStream- a stream ofImportElementobjects representing the set of objects and/or relations to be added or deleted.- Throws:
InterruptedException- if the operations is interrupted before completion.UninitilizedClientException- if called on an uninitialized client.
-
importData
public io.grpc.Status importData(Stream<ImportElement> importStream, ImportHandler handler) throws InterruptedException, UninitilizedClientException Description copied from interface:DirectoryClientImporterSets and/or deletes a stream of objects and relations.- Specified by:
importDatain interfaceDirectoryClientImporter- Parameters:
importStream- a stream ofImportElementobjects representing the set of objects and/or relations to be added or deleted.handler- aImportHandlerobject to receive progress and error events.- Throws:
InterruptedException- if the operations is interrupted before completion.UninitilizedClientException- if called on an uninitialized client.
-
exportData
public Iterator<com.aserto.directory.exporter.v3.ExportResponse> exportData(com.aserto.directory.exporter.v3.Option options) throws UninitilizedClientException - Specified by:
exportDatain interfaceDirectoryClientExporter- Throws:
UninitilizedClientException
-
exportData
public Iterator<com.aserto.directory.exporter.v3.ExportResponse> exportData(com.aserto.directory.exporter.v3.Option options, com.google.protobuf.Timestamp startFrom) throws UninitilizedClientException - Specified by:
exportDatain interfaceDirectoryClientExporter- Throws:
UninitilizedClientException
-
check(String, String, String, String, String)instead.