Package org.openwms.core.uaa.impl
Class GrantServiceImpl
java.lang.Object
org.openwms.core.uaa.impl.GrantServiceImpl
- All Implemented Interfaces:
GrantService
A GrantServiceImpl is a transactional Spring Service implementation.
- Author:
- Heiko Scherrer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.springframework.context.ApplicationEventPublisherprivate final GrantRepositoryprivate final org.ameba.i18n.Translatorprivate final UserRepository -
Constructor Summary
ConstructorsConstructorDescriptionGrantServiceImpl(GrantRepository grantRepository, UserRepository userRepository, org.ameba.i18n.Translator translator, org.springframework.context.ApplicationEventPublisher eventPublisher) -
Method Summary
Modifier and TypeMethodDescription@NotNull Grantcreate(@NotNull(groups=Create.class) @Valid Grant grant) Create a newGrant.findAllFor(@NotBlank String username) Find and return allGrants assigned to anUser.Find and return all existingGrants.@NotNull GrantfindByPKey(@NotBlank String pKey) Find and return aGrant.
-
Field Details
-
grantRepository
-
userRepository
-
translator
private final org.ameba.i18n.Translator translator -
eventPublisher
private final org.springframework.context.ApplicationEventPublisher eventPublisher
-
-
Constructor Details
-
GrantServiceImpl
GrantServiceImpl(GrantRepository grantRepository, UserRepository userRepository, org.ameba.i18n.Translator translator, org.springframework.context.ApplicationEventPublisher eventPublisher)
-
-
Method Details
-
findByPKey
Find and return aGrant.- Specified by:
findByPKeyin interfaceGrantService- Parameters:
pKey- The persistent key of the existing Grant- Returns:
- The instance
-
findAllGrants
Find and return all existingGrants.- Specified by:
findAllGrantsin interfaceGrantService- Returns:
- All existing
Grants
-
findAllFor
Find and return allGrants assigned to anUser.- Specified by:
findAllForin interfaceGrantService- Parameters:
username- The User's name- Returns:
- All Grants assigned to the User
-
create
@Measured @Validated(Create.class) @NotNull public @NotNull Grant create(@NotNull(groups=Create.class) @Valid @NotNull(groups=Create.class) @Valid Grant grant) Create a newGrant.- Specified by:
createin interfaceGrantService- Parameters:
grant- The mandatory Grant- Returns:
- The created Grant instance
-