Package com.day.cq.dam.api.checkout
Interface AssetCheckoutService
public interface AssetCheckoutService
OSGi service that allows to check in and check out assets.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanCheckIn(Asset asset) Return a flag indicating whether the current user can check in the asset.booleancanCheckIn(Asset asset, Privilege[] privileges) Return a flag indicating whether the current user can check in the asset.booleancanCheckOut(Asset asset) Return a flag indicating whether the current user can check out the asset.booleancanCheckOut(Asset asset, Privilege[] privileges) Return a flag indicating whether the current user can check out the asset.voidCheck in an asset.voidCheck out an asset.getCheckedOutBy(Asset asset) Return the user who has checked out the asset.booleanisCheckedOut(Asset asset) Checks if this asset is checked out.
-
Method Details
-
canCheckOut
Return a flag indicating whether the current user can check out the asset.- Parameters:
asset- Asset- Returns:
trueif the asset can be checked out;falseotherwise
-
checkOut
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
Checks if this asset is checked out.- Parameters:
asset- Asset- Returns:
trueif this asset is checked out.
-
getCheckedOutBy
Return the user who has checked out the asset.- Parameters:
asset- Asset- Returns:
- Checkout user;
nullif the asset is not checked out
-
canCheckIn
Return a flag indicating whether the current user can check in the asset.- Parameters:
asset- Asset- Returns:
trueif the asset can be checked in;falseotherwise
-
canCheckIn
Return a flag indicating whether the current user can check in the asset.- Parameters:
asset- Assetprivileges- Privileges array- Returns:
trueif the asset can be checked in;falseotherwise
-
canCheckOut
Return a flag indicating whether the current user can check out the asset.- Parameters:
asset- Assetprivileges- Privileges array- Returns:
trueif the asset can be checked out;falseotherwise
-
checkIn
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.
-