Interface GrantService

All Known Implementing Classes:
GrantServiceImpl

public interface GrantService
A GrantService defines functionality to handle GrantServices.
Author:
Heiko Scherrer
  • Method Details

    • findByPKey

      @NotNull @NotNull Grant findByPKey(@NotBlank @NotBlank String pKey)
      Find and return a Grant.
      Parameters:
      pKey - The persistent key of the existing Grant
      Returns:
      The instance
      Throws:
      org.ameba.exception.NotFoundException - If the Grant does not exist
    • findAllGrants

      @NotNull @NotNull List<Grant> findAllGrants()
      Find and return all existing Grants.
      Returns:
      All existing Grants
    • findAllFor

      @NotNull @NotNull List<Grant> findAllFor(@NotBlank @NotBlank String user)
      Find and return all Grants assigned to an User.
      Parameters:
      user - The User's name
      Returns:
      All Grants assigned to the User
    • create

      @NotNull @NotNull Grant create(@NotNull(groups=Create.class) @Valid @NotNull(groups=Create.class) @Valid Grant grant)
      Create a new Grant.
      Parameters:
      grant - The mandatory Grant
      Returns:
      The created Grant instance