Interface AssetCheckoutService


public interface AssetCheckoutService
OSGi service that allows to check in and check out assets.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Return a flag indicating whether the current user can check in the asset.
    boolean
    canCheckIn(Asset asset, Privilege[] privileges)
    Return a flag indicating whether the current user can check in the asset.
    boolean
    Return a flag indicating whether the current user can check out the asset.
    boolean
    canCheckOut(Asset asset, Privilege[] privileges)
    Return a flag indicating whether the current user can check out the asset.
    void
    checkIn(Asset asset)
    Check in an asset.
    void
    checkOut(Asset asset)
    Check out an asset.
    Return the user who has checked out the asset.
    boolean
    Checks if this asset is checked out.
  • Method Details

    • canCheckOut

      boolean canCheckOut(Asset asset)
      Return a flag indicating whether the current user can check out the asset.
      Parameters:
      asset - Asset
      Returns:
      true if the asset can be checked out; false otherwise
    • checkOut

      void checkOut(Asset asset) throws IllegalStateException
      Check out an asset.
      Parameters:
      asset - Asset
      Throws:
      IllegalStateException - if the asset is already checked out or cannot be checked out by the current user.
    • isCheckedOut

      boolean isCheckedOut(Asset asset)
      Checks if this asset is checked out.
      Parameters:
      asset - Asset
      Returns:
      true if this asset is checked out.
    • getCheckedOutBy

      String getCheckedOutBy(Asset asset)
      Return the user who has checked out the asset.
      Parameters:
      asset - Asset
      Returns:
      Checkout user; null if the asset is not checked out
    • canCheckIn

      boolean canCheckIn(Asset asset)
      Return a flag indicating whether the current user can check in the asset.
      Parameters:
      asset - Asset
      Returns:
      true if the asset can be checked in; false otherwise
    • canCheckIn

      boolean canCheckIn(Asset asset, Privilege[] privileges)
      Return a flag indicating whether the current user can check in the asset.
      Parameters:
      asset - Asset
      privileges - Privileges array
      Returns:
      true if the asset can be checked in; false otherwise
    • canCheckOut

      boolean canCheckOut(Asset asset, Privilege[] privileges)
      Return a flag indicating whether the current user can check out the asset.
      Parameters:
      asset - Asset
      privileges - Privileges array
      Returns:
      true if the asset can be checked out; false otherwise
    • checkIn

      void checkIn(Asset asset) throws IllegalStateException
      Check in an asset.
      Parameters:
      asset - Asset
      Throws:
      IllegalStateException - if the asset is not checked out or cannot be checked in by the current user.