Class IdentifiableJsonSchemaProperty.EncryptedJsonSchemaProperty
java.lang.Object
org.springframework.data.mongodb.core.schema.IdentifiableJsonSchemaProperty.EncryptedJsonSchemaProperty
- All Implemented Interfaces:
JsonSchemaObject,JsonSchemaProperty
- Enclosing class:
- IdentifiableJsonSchemaProperty<T extends JsonSchemaObject>
public static class IdentifiableJsonSchemaProperty.EncryptedJsonSchemaProperty
extends Object
implements JsonSchemaProperty
JsonSchemaProperty implementation for encrypted fields.- Since:
- 2.2
- Author:
- Christoph Strobl
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.mongodb.core.schema.JsonSchemaObject
JsonSchemaObject.TypeNested classes/interfaces inherited from interface org.springframework.data.mongodb.core.schema.JsonSchemaProperty
JsonSchemaProperty.JsonSchemaPropertyBuilder -
Constructor Summary
ConstructorsConstructorDescriptionCreate new instance ofIdentifiableJsonSchemaProperty.EncryptedJsonSchemaPropertywrapping the giventarget. -
Method Summary
Modifier and TypeMethodDescriptionUse AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic algorithm.Use AEAD_AES_256_CBC_HMAC_SHA_512-Random algorithm.Use the given algorithm identified via its name.encrypted(JsonSchemaProperty target) Create new instance ofIdentifiableJsonSchemaProperty.EncryptedJsonSchemaPropertywrapping the giventarget.The identifier can be either the property name or the regex expression properties have to match when used along withTypedJsonSchemaObject.ObjectJsonSchemaObject.patternProperties(JsonSchemaProperty...).getKeyId()getTypes()Get the set of types defined for this schema element.
TheSetis likely to contain only one element in most cases.rangeEncrypted(JsonSchemaProperty target) Create new instance ofIdentifiableJsonSchemaProperty.EncryptedJsonSchemaPropertywith Range encryption, wrapping the giventarget.org.bson.DocumentGet the MongoDB specific representation.
The Document may contain fields (eg. like bsonType) not contained in the JsonSchema specification.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.mongodb.core.schema.JsonSchemaProperty
isRequired
-
Constructor Details
-
EncryptedJsonSchemaProperty
Create new instance ofIdentifiableJsonSchemaProperty.EncryptedJsonSchemaPropertywrapping the giventarget.- Parameters:
target- must not be null.
-
-
Method Details
-
encrypted
public static IdentifiableJsonSchemaProperty.EncryptedJsonSchemaProperty encrypted(JsonSchemaProperty target) Create new instance ofIdentifiableJsonSchemaProperty.EncryptedJsonSchemaPropertywrapping the giventarget.- Parameters:
target- must not be null.- Returns:
- new instance of
IdentifiableJsonSchemaProperty.EncryptedJsonSchemaProperty.
-
rangeEncrypted
public static IdentifiableJsonSchemaProperty.EncryptedJsonSchemaProperty rangeEncrypted(JsonSchemaProperty target) Create new instance ofIdentifiableJsonSchemaProperty.EncryptedJsonSchemaPropertywith Range encryption, wrapping the giventarget.- Parameters:
target- must not be null.- Returns:
- new instance of
IdentifiableJsonSchemaProperty.EncryptedJsonSchemaProperty. - Since:
- 4.5
-
aead_aes_256_cbc_hmac_sha_512_random
public IdentifiableJsonSchemaProperty.EncryptedJsonSchemaProperty aead_aes_256_cbc_hmac_sha_512_random()Use AEAD_AES_256_CBC_HMAC_SHA_512-Random algorithm.- Returns:
- new instance of
IdentifiableJsonSchemaProperty.EncryptedJsonSchemaProperty.
-
aead_aes_256_cbc_hmac_sha_512_deterministic
public IdentifiableJsonSchemaProperty.EncryptedJsonSchemaProperty aead_aes_256_cbc_hmac_sha_512_deterministic()Use AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic algorithm.- Returns:
- new instance of
IdentifiableJsonSchemaProperty.EncryptedJsonSchemaProperty.
-
algorithm
Use the given algorithm identified via its name.- Returns:
- new instance of
IdentifiableJsonSchemaProperty.EncryptedJsonSchemaProperty.
-
keyId
- Parameters:
keyId- must not be null.- Returns:
- new instance of
IdentifiableJsonSchemaProperty.EncryptedJsonSchemaProperty.
-
keyId
- Parameters:
keyId- must not be null.- Returns:
- new instance of
IdentifiableJsonSchemaProperty.EncryptedJsonSchemaProperty. - Since:
- 4.5
-
keys
- Parameters:
keyId- must not be null.- Returns:
- new instance of
IdentifiableJsonSchemaProperty.EncryptedJsonSchemaProperty.
-
keys
- Parameters:
keyId- must not be null.- Returns:
- new instance of
IdentifiableJsonSchemaProperty.EncryptedJsonSchemaProperty.
-
toDocument
public org.bson.Document toDocument()Description copied from interface:JsonSchemaObjectGet the MongoDB specific representation.
The Document may contain fields (eg. like bsonType) not contained in the JsonSchema specification. It may also contain types not directly processable by the MongoDB java driver. Make sure to run the producedDocumentthrough the mapping infrastructure.- Specified by:
toDocumentin interfaceJsonSchemaObject- Returns:
- never null.
-
getIdentifier
Description copied from interface:JsonSchemaPropertyThe identifier can be either the property name or the regex expression properties have to match when used along withTypedJsonSchemaObject.ObjectJsonSchemaObject.patternProperties(JsonSchemaProperty...).- Specified by:
getIdentifierin interfaceJsonSchemaProperty- Returns:
- never null.
-
getTypes
Description copied from interface:JsonSchemaObjectGet the set of types defined for this schema element.
TheSetis likely to contain only one element in most cases.- Specified by:
getTypesin interfaceJsonSchemaObject- Returns:
- never null.
-
getKeyId
-