11package com .bakdata .conquery .apiv1 ;
22
33import java .util .List ;
4- import java .util .Set ;
5- import java .util .function .BiFunction ;
64import java .util .function .Consumer ;
75
86import com .bakdata .conquery .io .storage .MetaStorage ;
97import com .bakdata .conquery .models .auth .entities .Group ;
108import com .bakdata .conquery .models .auth .entities .Subject ;
119import com .bakdata .conquery .models .auth .permissions .Ability ;
1210import com .bakdata .conquery .models .auth .permissions .Authorized ;
13- import com .bakdata .conquery .models .auth .permissions .ConqueryPermission ;
1411import com .bakdata .conquery .models .execution .Labelable ;
1512import com .bakdata .conquery .models .execution .Owned ;
1613import com .bakdata .conquery .models .execution .Shareable ;
@@ -46,11 +43,18 @@ public class MetaDataPatch implements Taggable, Labelable, ShareInformation {
4643 * @param subject The subject on whose behalf the patch is executed
4744 * @param <INST> Type of the instance that is patched
4845 */
49- public <T extends MetaDataPatch , ID extends Id <?>, INST extends Taggable & Shareable & Labelable & Identifiable <? extends ID > & Owned & Authorized > void applyTo (INST instance , MetaStorage storage , Subject subject ) {
46+ public <INST extends Taggable & Shareable & Labelable & Identifiable <? extends Id <?, ?>, ?> & Owned & Authorized > void applyTo (
47+ INST instance ,
48+ MetaStorage storage ,
49+ Subject subject ) {
5050 buildChain (QueryUtils .getNoOpEntryPoint (), storage , subject , instance ).accept (this );
5151 }
5252
53- protected <T extends MetaDataPatch , ID extends Id <?>, INST extends Taggable & Shareable & Labelable & Identifiable <? extends ID > & Owned & Authorized > Consumer <T > buildChain (Consumer <T > patchConsumerChain , MetaStorage storage , Subject subject , INST instance ) {
53+ protected <T extends MetaDataPatch , INST extends Taggable & Shareable & Labelable & Identifiable <? extends Id <?, ?>, ?> & Owned & Authorized > Consumer <T > buildChain (
54+ Consumer <T > patchConsumerChain ,
55+ MetaStorage storage ,
56+ Subject subject ,
57+ INST instance ) {
5458 if (getTags () != null && subject .isPermitted (instance , Ability .TAG )) {
5559 patchConsumerChain = patchConsumerChain .andThen (instance .tagger ());
5660 }
@@ -62,10 +66,4 @@ protected <T extends MetaDataPatch, ID extends Id<?>, INST extends Taggable & Sh
6266 }
6367 return patchConsumerChain ;
6468 }
65-
66-
67- @ FunctionalInterface
68- public interface PermissionCreator <ID extends Id <?>> extends BiFunction <Set <Ability >, ID , ConqueryPermission > {
69-
70- }
7169}
0 commit comments