Interface CockpitCelumDelegate
-
- All Known Implementing Classes:
DefaultCockpitCelumDelegate
public interface CockpitCelumDelegate
Cockpit Celum Business delegate. Provides the Cockpit framework with miscellaneous MAM/Celum functionality.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
createSynchPopup(org.zkoss.zk.ui.Component button, TypedObject celumAsset, EditorListener listener)
Creates a Celum Asset Synchronization popup dialog to be used in a Cockpit.java.lang.Integer
getCelumAssetId(ItemModel asset)
java.lang.String
getCelumLink(ItemModel item, java.lang.String celumAssetId, java.util.Map<java.lang.String,java.lang.String> params)
Returns a link to be used when opening Celum Imagine from within a Cockpit application.java.lang.String
getCelumLink(java.lang.String celumAssetId, java.util.Map<java.lang.String,java.lang.String> params)
Returns a link to be used when opening Celum Imagine from within a Cockpit application.java.lang.String
getLocalMediaUrl(TypedObject celumAsset)
Returns the URL of the local version of the Celum asset.java.lang.String
getMediaUrl(TypedObject celumAsset)
Returns the URL of the current Celum version of the Celum asset.java.lang.String
getOriginalMediaFormat()
Gets the original media format.boolean
isCelumAssetValid(TypedObject celumAsset)
Checks if is celum asset valid.boolean
isCelumAvailable()
Returns whether Celum is available and ready to be used.boolean
isSynchronized(TypedObject celumAsset)
Checks if is synchronized.void
synchronize(TypedObject celumAsset)
Synchronize celum asset with current image in celum.void
unSynchronize(TypedObject celumAsset)
Un synchronize.
-
-
-
Method Detail
-
isCelumAvailable
boolean isCelumAvailable()
Returns whether Celum is available and ready to be used.- Returns:
true
if Celum is available,false
otherwise
-
getCelumLink
java.lang.String getCelumLink(ItemModel item, java.lang.String celumAssetId, java.util.Map<java.lang.String,java.lang.String> params) throws CelumNotAvailableException
Returns a link to be used when opening Celum Imagine from within a Cockpit application. Note: Make sure to callisCelumAvailable()
before calling this method.- Parameters:
item
- default search parameters for this item type will be included in returned link (leavenull
if no search parameters should be included)celumAssetId
- celum asset ID (leavenull
if no ID is available)params
- custom parameters, some of which are echoed back to the Cockpit- Returns:
- the link to be used for opening Celum Imagine
- Throws:
CelumNotAvailableException
- if MAM/Celum is not available
-
getCelumLink
java.lang.String getCelumLink(java.lang.String celumAssetId, java.util.Map<java.lang.String,java.lang.String> params) throws CelumNotAvailableException
Returns a link to be used when opening Celum Imagine from within a Cockpit application. Note: Make sure to callisCelumAvailable()
before calling this method.- Parameters:
celumAssetId
- celum asset ID (leavenull
if no ID is available)params
- custom parameters, some of which are echoed back to the Cockpit- Returns:
- the link to be used for opening Celum Imagine
- Throws:
CelumNotAvailableException
- if MAM/Celum is not available
-
createSynchPopup
void createSynchPopup(org.zkoss.zk.ui.Component button, TypedObject celumAsset, EditorListener listener) throws CelumNotAvailableException, java.lang.IllegalArgumentException
Creates a Celum Asset Synchronization popup dialog to be used in a Cockpit. Note: This method will add an event listener to the button, registered for handling ZK "onClick
events.- Parameters:
button
- the button which should open the synchronization dialogcelumAsset
- the celum assetlistener
- the editor listener- Throws:
CelumNotAvailableException
- if MAM/Celum is not availablejava.lang.IllegalArgumentException
- ifcelumAsset
isnull
-
getMediaUrl
java.lang.String getMediaUrl(TypedObject celumAsset) throws CelumNotAvailableException, java.lang.IllegalArgumentException
Returns the URL of the current Celum version of the Celum asset.- Parameters:
celumAsset
- the celum asset- Returns:
- the URL of the current Celum asset version
- Throws:
CelumNotAvailableException
- if MAM/Celum is not availablejava.lang.IllegalArgumentException
- ifcelumAsset
isnull
- See Also:
getLocalMediaUrl(TypedObject)
-
getLocalMediaUrl
java.lang.String getLocalMediaUrl(TypedObject celumAsset) throws CelumNotAvailableException, java.lang.IllegalArgumentException
Returns the URL of the local version of the Celum asset.- Parameters:
celumAsset
- the celum asset- Returns:
- the URL of the local Celum asset version
- Throws:
CelumNotAvailableException
- if MAM/Celum is not availablejava.lang.IllegalArgumentException
- ifcelumAsset
isnull
- See Also:
getMediaUrl(TypedObject)
-
isSynchronized
boolean isSynchronized(TypedObject celumAsset) throws CelumNotAvailableException, java.lang.IllegalArgumentException
Checks if is synchronized.- Parameters:
celumAsset
- the celum asset- Returns:
- true, if is synchronized
- Throws:
CelumNotAvailableException
- the celum not available exceptionjava.lang.IllegalArgumentException
- the illegal argument exception
-
synchronize
void synchronize(TypedObject celumAsset) throws CelumNotAvailableException, java.lang.IllegalArgumentException
Synchronize celum asset with current image in celum.- Parameters:
celumAsset
- the celum asset- Throws:
CelumNotAvailableException
- the celum not available exceptionjava.lang.IllegalArgumentException
- the illegal argument exception
-
unSynchronize
void unSynchronize(TypedObject celumAsset) throws CelumNotAvailableException, java.lang.IllegalArgumentException
Un synchronize.- Parameters:
celumAsset
- the celum asset- Throws:
CelumNotAvailableException
- the celum not available exceptionjava.lang.IllegalArgumentException
- the illegal argument exception
-
isCelumAssetValid
boolean isCelumAssetValid(TypedObject celumAsset) throws CelumNotAvailableException
Checks if is celum asset valid.- Parameters:
celumAsset
- the celum asset- Returns:
- true, if is celum asset valid
- Throws:
CelumNotAvailableException
- the celum not available exception
-
getOriginalMediaFormat
java.lang.String getOriginalMediaFormat() throws CelumNotAvailableException
Gets the original media format.- Returns:
- the original media format
- Throws:
CelumNotAvailableException
- the celum not available exception
-
getCelumAssetId
java.lang.Integer getCelumAssetId(ItemModel asset)
- Parameters:
asset
- item model which might be celum asset- Returns:
- celum asset id if given item is existing celum asset or null.
-
-