Package com.day.cq.dam.api.checkout
Interface AssetCheckoutService
- 
public interface AssetCheckoutServiceOSGi service that allows to check in and check out assets. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanCheckIn(Asset asset)Return a flag indicating whether the current user can check in the asset.booleancanCheckIn(Asset asset, javax.jcr.security.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, javax.jcr.security.Privilege[] privileges)Return a flag indicating whether the current user can check out the asset.voidcheckIn(Asset asset)Check in an asset.voidcheckOut(Asset asset)Check out an asset.java.lang.StringgetCheckedOutBy(Asset asset)Return the user who has checked out the asset.booleanisCheckedOut(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:
 trueif the asset can be checked out;falseotherwise
 
- 
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:
 trueif 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; 
nullif 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:
 trueif the asset can be checked in;falseotherwise
 
- 
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- Assetprivileges- Privileges array- Returns:
 trueif the asset can be checked in;falseotherwise
 
- 
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- Assetprivileges- Privileges array- Returns:
 trueif the asset can be checked out;falseotherwise
 
- 
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.
 
 - 
 
 -