Interface AssetCheckoutService


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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean canCheckIn​(Asset asset)
      Return a flag indicating whether the current user can check in the asset.
      boolean canCheckIn​(Asset asset, javax.jcr.security.Privilege[] privileges)
      Return a flag indicating whether the current user can check in the asset.
      boolean canCheckOut​(Asset asset)
      Return a flag indicating whether the current user can check out the asset.
      boolean canCheckOut​(Asset asset, javax.jcr.security.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.
      java.lang.String getCheckedOutBy​(Asset asset)
      Return the user who has checked out the asset.
      boolean isCheckedOut​(Asset asset)
      Checks if this asset is checked out.
    • 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,
                           javax.jcr.security.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,
                            javax.jcr.security.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.