@@ -11,7 +11,7 @@ public class BeaconConfig
11
11
{
12
12
/*
13
13
* This file is used in an example to demonstrate complex queries
14
- * you can perform using beacons.
14
+ * that you can perform using beacons.
15
15
* The example data used is for demonstrative purposes only,
16
16
* and might not meet the distribution and correlation uniqueness
17
17
* recommendations for beacons.
@@ -26,7 +26,7 @@ public class BeaconConfig
26
26
public static AmazonDynamoDBClient SetupBeaconConfig ( String ddbTableName , String branchKeyId ,
27
27
String branchKeyWrappingKmsKeyArn , String branchKeyDdbTableName )
28
28
{
29
- // 1. Create Keystore and branch key.
29
+ // 1. Create keystore and branch key
30
30
// These are the same constructions as in the Basic examples, which describe this in more detail.
31
31
KeyStore keyStore = new KeyStore ( new KeyStoreConfig
32
32
{
@@ -85,7 +85,7 @@ public static AmazonDynamoDBClient SetupBeaconConfig(String ddbTableName, String
85
85
} ;
86
86
87
87
88
- // 4. Define signed parts.
88
+ // 4. Define signed parts
89
89
// These are unencrypted attributes we would like to use in beacon queries.
90
90
// In this example, all of these represent dates or times.
91
91
// Keeping these attributes unencrypted allows us to use them in comparison-based queries. If a signed
@@ -98,7 +98,7 @@ public static AmazonDynamoDBClient SetupBeaconConfig(String ddbTableName, String
98
98
new SignedPart { Name = "ProjectStart" , Prefix = "PS-" }
99
99
} ;
100
100
101
- // 6. Create constructor parts.
101
+ // 6. Create constructor parts
102
102
// Constructor parts are used to assemble constructors (constructors described more in next step).
103
103
// For each attribute that will be used in a constructor, there must be a corresponding constructor part.
104
104
// A constructor part must receive:
@@ -216,15 +216,15 @@ public static AmazonDynamoDBClient SetupBeaconConfig(String ddbTableName, String
216
216
Parts = new List < ConstructorPart > { buildingConstructorPart , floorConstructorPart , deskConstructorPart }
217
217
} ;
218
218
219
- // 5. Add constructors to the compound beacon constructor list in desired construction order.
219
+ // 5. Add constructors to the compound beacon constructor list in desired construction order
220
220
// In a compound beacon with multiple constructors, the order the constructors are added to
221
221
// the constructor list determines their priority.
222
222
// The first constructor added to a constructor list will be the first constructor that is executed.
223
223
// The client will evaluate constructors until one matches, and will use the first one that matches.
224
224
// If no constructors match, an attribute value is not written for that beacon.
225
225
// A general strategy is to add constructors with unique conditions at the beginning of the list,
226
226
// and add constructors with general conditions at the end of the list. This would allow a given
227
- // item would trigger the constructor most specific to its attributes.
227
+ // item to trigger the constructor most specific to its attributes.
228
228
var pk0ConstructorList = new List < Constructor >
229
229
{
230
230
employeeIdConstructor ,
@@ -285,7 +285,7 @@ public static AmazonDynamoDBClient SetupBeaconConfig(String ddbTableName, String
285
285
new CompoundBeacon { Name = "SK3" , Split = "~" , Constructors = sk3ConstructorList }
286
286
} ;
287
287
288
- // 10. Create BeaconVersion.
288
+ // 10. Create BeaconVersion
289
289
var beaconVersions = new List < BeaconVersion >
290
290
{
291
291
new BeaconVersion
@@ -339,7 +339,7 @@ public static AmazonDynamoDBClient SetupBeaconConfig(String ddbTableName, String
339
339
// These are not beaconized attributes, but are sensitive data that must be encrypted
340
340
[ "Attendees" ] = CryptoAction . ENCRYPT_AND_SIGN ,
341
341
[ "Subject" ] = CryptoAction . ENCRYPT_AND_SIGN ,
342
- // signed parts and unencrypted attributes can be configured as SIGN_ONLY or DO_NOTHING
342
+ // Signed parts and unencrypted attributes can be configured as SIGN_ONLY or DO_NOTHING
343
343
// For this example, we will set these to SIGN_ONLY to ensure authenticity
344
344
[ "TicketModTime" ] = CryptoAction . SIGN_ONLY ,
345
345
[ "MeetingStart" ] = CryptoAction . SIGN_ONLY ,
@@ -374,4 +374,4 @@ public static AmazonDynamoDBClient SetupBeaconConfig(String ddbTableName, String
374
374
// 15. Create a new AWS SDK DynamoDb client using the config above
375
375
return new Client . DynamoDbClient ( new DynamoDbTablesEncryptionConfig { TableEncryptionConfigs = tableConfigs } ) ;
376
376
}
377
- }
377
+ }
0 commit comments