Interface AssetCheckoutService


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

      • 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 java.lang.IllegalStateException
        Check out an asset.
        Parameters:
        asset - Asset
        Throws:
        java.lang.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

        java.lang.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 java.lang.IllegalStateException
        Check in an asset.
        Parameters:
        asset - Asset
        Throws:
        java.lang.IllegalStateException - if the asset is not checked out or cannot be checked in by the current user.