Class MachinePrincipalServiceImpl
java.lang.Object
com.foreach.across.modules.user.services.MachinePrincipalServiceImpl
- All Implemented Interfaces:
MachinePrincipalService
,org.springframework.data.querydsl.QuerydslPredicateExecutor<MachinePrincipal>
- Author:
- Arne Vandamme
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
count
(com.querydsl.core.types.Predicate predicate) boolean
exists
(com.querydsl.core.types.Predicate predicate) findAll
(com.querydsl.core.types.OrderSpecifier<?>... orders) findAll
(com.querydsl.core.types.Predicate predicate) findAll
(com.querydsl.core.types.Predicate predicate, com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers) org.springframework.data.domain.Page<MachinePrincipal>
findAll
(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Pageable pageable) findAll
(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Sort sort) <S extends MachinePrincipal,
R>
RfindBy
(com.querydsl.core.types.Predicate predicate, Function<org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>, R> queryFunction) findOne
(com.querydsl.core.types.Predicate predicate) getMachinePrincipalById
(long id) Get the machine with a given name in the default directory.getMachinePrincipalByName
(String name, UserDirectory userDirectory) Get the group with a given name in the specified directory.save
(MachinePrincipal machinePrincipalDto)
-
Constructor Details
-
MachinePrincipalServiceImpl
public MachinePrincipalServiceImpl()
-
-
Method Details
-
getMachinePrincipals
- Specified by:
getMachinePrincipals
in interfaceMachinePrincipalService
- Returns:
- all registered machine principals
-
getMachinePrincipalById
@Cacheable(value="securityPrincipalCache", unless="true && (#result instanceof T(java.util.Optional) && #result.isPresent() ) || (not (#result instanceof T(java.util.Optional)) && #result != null)") public Optional<MachinePrincipal> getMachinePrincipalById(long id) - Specified by:
getMachinePrincipalById
in interfaceMachinePrincipalService
-
getMachinePrincipalByName
Description copied from interface:MachinePrincipalService
Get the machine with a given name in the default directory.- Specified by:
getMachinePrincipalByName
in interfaceMachinePrincipalService
- Parameters:
name
- of the machine- Returns:
- instance or
null
if not found
-
getMachinePrincipalByName
public Optional<MachinePrincipal> getMachinePrincipalByName(String name, UserDirectory userDirectory) Description copied from interface:MachinePrincipalService
Get the group with a given name in the specified directory.- Specified by:
getMachinePrincipalByName
in interfaceMachinePrincipalService
- Parameters:
name
- of the machineuserDirectory
- the machine should belong to- Returns:
- instance or
null
if not found
-
save
- Specified by:
save
in interfaceMachinePrincipalService
-
findOne
- Specified by:
findOne
in interfaceMachinePrincipalService
- Specified by:
findOne
in interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<MachinePrincipal>
-
findAll
- Specified by:
findAll
in interfaceMachinePrincipalService
- Specified by:
findAll
in interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<MachinePrincipal>
-
findAll
public Iterable<MachinePrincipal> findAll(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Sort sort) - Specified by:
findAll
in interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<MachinePrincipal>
-
findAll
public Collection<MachinePrincipal> findAll(com.querydsl.core.types.Predicate predicate, com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers) - Specified by:
findAll
in interfaceMachinePrincipalService
- Specified by:
findAll
in interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<MachinePrincipal>
-
findAll
- Specified by:
findAll
in interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<MachinePrincipal>
-
findAll
public org.springframework.data.domain.Page<MachinePrincipal> findAll(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Pageable pageable) - Specified by:
findAll
in interfaceMachinePrincipalService
- Specified by:
findAll
in interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<MachinePrincipal>
-
count
public long count(com.querydsl.core.types.Predicate predicate) - Specified by:
count
in interfaceMachinePrincipalService
- Specified by:
count
in interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<MachinePrincipal>
-
exists
public boolean exists(com.querydsl.core.types.Predicate predicate) - Specified by:
exists
in interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<MachinePrincipal>
-
findBy
public <S extends MachinePrincipal,R> R findBy(com.querydsl.core.types.Predicate predicate, Function<org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>, R> queryFunction) - Specified by:
findBy
in interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<MachinePrincipal>
-