Class ExampleEntityRepositoryImpl
java.lang.Object
org.bremersee.acl.spring.data.mongodb.app.ExampleEntityRepositoryImpl
- All Implemented Interfaces:
ExampleEntityRepositoryCustom
The example entity repository.
- Author:
- Christian Bremer
-
Constructor Summary
ConstructorsConstructorDescriptionExampleEntityRepositoryImpl(org.springframework.data.mongodb.core.MongoTemplate mongoTemplate) Instantiates a new example entity repository. -
Method Summary
Modifier and TypeMethodDescriptionchangeOwnerByOtherContent(String otherContent, AclUserContext userContext, String newOwner) Change owner by other content optional.findByOtherContent(String otherContent, AclUserContext userContext, AccessEvaluation accessEvaluation, Collection<String> permissions) Find by other content optional.voidinit()Init.modifyAclByOtherContent(String otherContent, AclUserContext userContext, AccessControlListModifications modifications) Modify acl by other content optional.replaceAclByOtherContent(String otherContent, Acl newAcl) Replace acl by other content optional.
-
Constructor Details
-
ExampleEntityRepositoryImpl
public ExampleEntityRepositoryImpl(org.springframework.data.mongodb.core.MongoTemplate mongoTemplate) Instantiates a new example entity repository.- Parameters:
mongoTemplate- the mongo template
-
-
Method Details
-
init
@EventListener(org.springframework.boot.context.event.ApplicationReadyEvent.class) public void init()Init. -
findByOtherContent
public Optional<ExampleEntity> findByOtherContent(String otherContent, AclUserContext userContext, AccessEvaluation accessEvaluation, Collection<String> permissions) Description copied from interface:ExampleEntityRepositoryCustomFind by other content optional.- Specified by:
findByOtherContentin interfaceExampleEntityRepositoryCustom- Parameters:
otherContent- the other contentuserContext- the user contextaccessEvaluation- the access evaluationpermissions- the permissions- Returns:
- the optional
-
modifyAclByOtherContent
public Optional<ExampleEntity> modifyAclByOtherContent(String otherContent, AclUserContext userContext, AccessControlListModifications modifications) Description copied from interface:ExampleEntityRepositoryCustomModify acl by other content optional.- Specified by:
modifyAclByOtherContentin interfaceExampleEntityRepositoryCustom- Parameters:
otherContent- the other contentuserContext- the user contextmodifications- the modifications- Returns:
- the optional
-
replaceAclByOtherContent
Description copied from interface:ExampleEntityRepositoryCustomReplace acl by other content optional.- Specified by:
replaceAclByOtherContentin interfaceExampleEntityRepositoryCustom- Parameters:
otherContent- the other contentnewAcl- the new acl- Returns:
- the optional
-
changeOwnerByOtherContent
public Optional<ExampleEntity> changeOwnerByOtherContent(String otherContent, AclUserContext userContext, String newOwner) Description copied from interface:ExampleEntityRepositoryCustomChange owner by other content optional.- Specified by:
changeOwnerByOtherContentin interfaceExampleEntityRepositoryCustom- Parameters:
otherContent- the other contentuserContext- the user contextnewOwner- the new owner- Returns:
- the optional
-