Class GrantServiceImpl

java.lang.Object
org.openwms.core.uaa.impl.GrantServiceImpl
All Implemented Interfaces:
GrantService

@TxService class GrantServiceImpl extends Object implements GrantService
A GrantServiceImpl is a transactional Spring Service implementation.
Author:
Heiko Scherrer
  • Field Details

    • grantRepository

      private final GrantRepository grantRepository
    • userRepository

      private final UserRepository 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

      @Measured @NotNull public @NotNull Grant findByPKey(@NotBlank @NotBlank String pKey)
      Find and return a Grant.
      Specified by:
      findByPKey in interface GrantService
      Parameters:
      pKey - The persistent key of the existing Grant
      Returns:
      The instance
    • findAllGrants

      @Measured @NotNull public @NotNull List<Grant> findAllGrants()
      Find and return all existing Grants.
      Specified by:
      findAllGrants in interface GrantService
      Returns:
      All existing Grants
    • findAllFor

      @Measured public List<@NotNull Grant> findAllFor(@NotBlank @NotBlank String username)
      Find and return all Grants assigned to an User.
      Specified by:
      findAllFor in interface GrantService
      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 new Grant.
      Specified by:
      create in interface GrantService
      Parameters:
      grant - The mandatory Grant
      Returns:
      The created Grant instance