@@ -72,7 +72,7 @@ public CompletableFuture<UUID> send(MessageKey key, MessageValue value) {
72
72
* Content
73
73
* ****************************************************************************************** */
74
74
public CompletableFuture <UUID > submitContent (long contentId , String contentHash , ActionType action , String canonicalHash , ContentHandle content , String serializedReferences ) {
75
- ContentKey key = ContentKey .create ( contentId , contentHash );
75
+ ContentKey key = ContentKey .create (contentId , contentHash );
76
76
ContentValue value = ContentValue .create (action , canonicalHash , content , serializedReferences );
77
77
return send (key , value );
78
78
}
@@ -87,7 +87,7 @@ public CompletableFuture<UUID> submitGroup(ActionType action, GroupMetaDataDto m
87
87
return send (key , value );
88
88
}
89
89
public CompletableFuture <UUID > submitGroup (String groupId , ActionType action , boolean onlyArtifacts ) {
90
- GroupKey key = GroupKey .create ( groupId );
90
+ GroupKey key = GroupKey .create (groupId );
91
91
GroupValue value = GroupValue .create (action , onlyArtifacts );
92
92
return send (key , value );
93
93
}
@@ -99,19 +99,19 @@ public CompletableFuture<UUID> submitGroup(String groupId, ActionType action, bo
99
99
public CompletableFuture <UUID > submitArtifact (String groupId , String artifactId , String version , ActionType action ,
100
100
Long globalId , String artifactType , String contentHash , String createdBy , Date createdOn ,
101
101
EditableArtifactMetaDataDto metaData , Integer versionOrder , ArtifactState state , Long contentId ) {
102
- ArtifactKey key = ArtifactKey .create ( groupId , artifactId );
102
+ ArtifactKey key = ArtifactKey .create (groupId , artifactId );
103
103
ArtifactValue value = ArtifactValue .create (action , globalId , version , artifactType , contentHash , createdBy , createdOn , metaData ,
104
104
versionOrder , state , contentId );
105
105
return send (key , value );
106
106
}
107
107
public CompletableFuture <UUID > submitArtifact (String groupId , String artifactId , String version , ActionType action ,
108
108
Long globalId , String artifactType , String contentHash , String createdBy , Date createdOn ,
109
109
EditableArtifactMetaDataDto metaData ) {
110
- return submitArtifact ( groupId , artifactId , version , action , globalId , artifactType , contentHash , createdBy , createdOn ,
110
+ return submitArtifact (groupId , artifactId , version , action , globalId , artifactType , contentHash , createdBy , createdOn ,
111
111
metaData , null , null , null );
112
112
}
113
113
public CompletableFuture <UUID > submitArtifact (String groupId , String artifactId , ActionType action ) {
114
- return this .submitArtifact ( groupId , artifactId , null , action , null , null , null , null , null , null );
114
+ return this .submitArtifact (groupId , artifactId , null , action , null , null , null , null , null , null );
115
115
}
116
116
117
117
@@ -120,20 +120,20 @@ public CompletableFuture<UUID> submitArtifact(String groupId, String artifactId,
120
120
* ****************************************************************************************** */
121
121
public CompletableFuture <UUID > submitArtifactVersion (String groupId , String artifactId , String version , ActionType action , ArtifactState state ,
122
122
EditableArtifactMetaDataDto metaData ) {
123
- ArtifactVersionKey key = ArtifactVersionKey .create ( groupId , artifactId , version );
123
+ ArtifactVersionKey key = ArtifactVersionKey .create (groupId , artifactId , version );
124
124
ArtifactVersionValue value = ArtifactVersionValue .create (action , state , metaData );
125
125
return send (key , value );
126
126
}
127
127
public CompletableFuture <UUID > submitVersion (String groupId , String artifactId , String version , ActionType action ) {
128
- return submitArtifactVersion ( groupId , artifactId , version , action , null , null );
128
+ return submitArtifactVersion (groupId , artifactId , version , action , null , null );
129
129
}
130
130
131
131
132
132
/* ******************************************************************************************
133
133
* Artifact Owner
134
134
* ****************************************************************************************** */
135
135
public CompletableFuture <UUID > submitArtifactOwner (String groupId , String artifactId , ActionType action , String owner ) {
136
- ArtifactOwnerKey key = ArtifactOwnerKey .create ( groupId , artifactId );
136
+ ArtifactOwnerKey key = ArtifactOwnerKey .create (groupId , artifactId );
137
137
ArtifactOwnerValue value = ArtifactOwnerValue .create (action , owner );
138
138
return send (key , value );
139
139
}
@@ -144,12 +144,22 @@ public CompletableFuture<UUID> submitArtifactOwner(String groupId, String artifa
144
144
* ****************************************************************************************** */
145
145
public CompletableFuture <UUID > submitArtifactRule (String groupId , String artifactId , RuleType rule , ActionType action ,
146
146
RuleConfigurationDto config ) {
147
- ArtifactRuleKey key = ArtifactRuleKey .create ( groupId , artifactId , rule );
147
+ ArtifactRuleKey key = ArtifactRuleKey .create (groupId , artifactId , rule );
148
148
ArtifactRuleValue value = ArtifactRuleValue .create (action , config );
149
149
return send (key , value );
150
150
}
151
151
public CompletableFuture <UUID > submitArtifactRule (String groupId , String artifactId , RuleType rule , ActionType action ) {
152
- return submitArtifactRule ( groupId , artifactId , rule , action , null );
152
+ return submitArtifactRule (groupId , artifactId , rule , action , null );
153
+ }
154
+
155
+
156
+ /* ******************************************************************************************
157
+ * Artifact Rules
158
+ * ****************************************************************************************** */
159
+ public CompletableFuture <UUID > submitArtifactRules (String groupId , String artifactId , ActionType action ) {
160
+ ArtifactRulesKey key = ArtifactRulesKey .create (groupId , artifactId );
161
+ ArtifactRulesValue value = ArtifactRulesValue .create (action );
162
+ return send (key , value );
153
163
}
154
164
155
165
@@ -158,21 +168,21 @@ public CompletableFuture<UUID> submitArtifactRule(String groupId, String artifac
158
168
* ****************************************************************************************** */
159
169
public CompletableFuture <UUID > submitComment (String groupId , String artifactId , String version ,
160
170
String commentId , ActionType action , long globalId , String createdBy , Date createdOn , String value ) {
161
- CommentKey key = CommentKey .create ( groupId , artifactId , version , commentId );
171
+ CommentKey key = CommentKey .create (groupId , artifactId , version , commentId );
162
172
CommentValue cv = CommentValue .create (action , globalId , createdBy , createdOn , value );
163
173
return send (key , cv );
164
174
}
165
175
public CompletableFuture <UUID > submitComment (String groupId , String artifactId , String version ,
166
176
String commentId , ActionType action , String createdBy , Date createdOn , String value ) {
167
- return submitComment ( groupId , artifactId , version , commentId , action , -1 , createdBy , createdOn , value );
177
+ return submitComment (groupId , artifactId , version , commentId , action , -1 , createdBy , createdOn , value );
168
178
}
169
179
public CompletableFuture <UUID > submitComment (String groupId , String artifactId , String version ,
170
180
String commentId , ActionType action ) {
171
- return submitComment ( groupId , artifactId , version , commentId , action , null , null , null );
181
+ return submitComment (groupId , artifactId , version , commentId , action , null , null , null );
172
182
}
173
183
public CompletableFuture <UUID > submitComment (String commentId , ActionType action , long globalId ,
174
184
String createdBy , Date createdOn , String value ) {
175
- return submitComment ( "<import-comments>" , "_" , "_" , commentId , action , globalId , createdBy , createdOn , value );
185
+ return submitComment ("<import-comments>" , "_" , "_" , commentId , action , globalId , createdBy , createdOn , value );
176
186
}
177
187
178
188
@@ -185,20 +195,30 @@ public CompletableFuture<UUID> submitGlobalRule(RuleType rule, ActionType action
185
195
return send (key , value );
186
196
}
187
197
public CompletableFuture <UUID > submitGlobalRule (RuleType rule , ActionType action ) {
188
- return submitGlobalRule ( rule , action , null );
198
+ return submitGlobalRule (rule , action , null );
199
+ }
200
+
201
+
202
+ /* ******************************************************************************************
203
+ * Global Rules
204
+ * ****************************************************************************************** */
205
+ public CompletableFuture <UUID > submitGlobalRules (ActionType action ) {
206
+ GlobalRulesKey key = GlobalRulesKey .create ();
207
+ GlobalRulesValue value = GlobalRulesValue .create (action );
208
+ return send (key , value );
189
209
}
190
210
191
211
192
212
/* ******************************************************************************************
193
213
* Role Mappings
194
214
* ****************************************************************************************** */
195
215
public CompletableFuture <UUID > submitRoleMapping (String principalId , ActionType action , String role , String principalName ) {
196
- RoleMappingKey key = RoleMappingKey .create ( principalId );
216
+ RoleMappingKey key = RoleMappingKey .create (principalId );
197
217
RoleMappingValue value = RoleMappingValue .create (action , role , principalName );
198
218
return send (key , value );
199
219
}
200
220
public CompletableFuture <UUID > submitRoleMapping (String principalId , ActionType action ) {
201
- return submitRoleMapping ( principalId , action , null , null );
221
+ return submitRoleMapping (principalId , action , null , null );
202
222
}
203
223
204
224
@@ -237,12 +257,12 @@ public CompletableFuture<UUID> submitCommentId(ActionType action) {
237
257
* ****************************************************************************************** */
238
258
239
259
public CompletableFuture <UUID > submitDownload (String downloadId , ActionType action , DownloadContextDto context ) {
240
- DownloadKey key = DownloadKey .create ( downloadId );
260
+ DownloadKey key = DownloadKey .create (downloadId );
241
261
DownloadValue value = DownloadValue .create (action , context );
242
262
return send (key , value );
243
263
}
244
264
public CompletableFuture <UUID > submitDownload (String downloadId , ActionType action ) {
245
- return submitDownload ( downloadId , action , null );
265
+ return submitDownload (downloadId , action , null );
246
266
}
247
267
248
268
@@ -251,12 +271,12 @@ public CompletableFuture<UUID> submitDownload(String downloadId, ActionType acti
251
271
* ****************************************************************************************** */
252
272
253
273
public CompletableFuture <UUID > submitConfigProperty (String propertyName , ActionType action , String propertyValue ) {
254
- ConfigPropertyKey key = ConfigPropertyKey .create ( propertyName );
274
+ ConfigPropertyKey key = ConfigPropertyKey .create (propertyName );
255
275
ConfigPropertyValue value = ConfigPropertyValue .create (action , propertyValue );
256
276
return send (key , value );
257
277
}
258
278
public CompletableFuture <UUID > submitConfigProperty (String propertyName , ActionType action ) {
259
- return submitConfigProperty ( propertyName , action , null );
279
+ return submitConfigProperty (propertyName , action , null );
260
280
}
261
281
262
282
@@ -300,7 +320,7 @@ public CompletableFuture<UUID> submitGlobalAction(ActionType action) {
300
320
* Tombstones
301
321
* ****************************************************************************************** */
302
322
public void submitArtifactVersionTombstone (String groupId , String artifactId , String version ) {
303
- ArtifactVersionKey key = ArtifactVersionKey .create ( groupId , artifactId , version );
323
+ ArtifactVersionKey key = ArtifactVersionKey .create (groupId , artifactId , version );
304
324
send (key , null );
305
325
}
306
326
public void submitArtifactRuleTombstone (String groupId , String artifactId , RuleType rule ) {
0 commit comments