info.magnolia.dam
Class DamIdParser

java.lang.Object
  extended by info.magnolia.dam.DamIdParser

public class DamIdParser
extends Object

Parse the Asset or AssetFolder Identifier in order to retrieve the correct:
AssetProvider identifier
Asset identifier
The Identifier is the concatenation of the 'providerId and 'assetId' (for an internal asset: jcr:assetNodeIdentifier).


Field Summary
static String ASSET_ID_DELIMITER
           
 
Constructor Summary
DamIdParser()
           
 
Method Summary
static String createCompositeId(String assetProviderIdentifier, String assetIdentifier)
          Create a composite Id String.
static String getAssetIdentifier(String compositeId)
          Retrieve the Asset Id from the provided composite Id.
static String getAssetProviderIdentifier(String compositeId)
          Retrieve the Provider Id from the provided composite Id.
static boolean isCompositeId(String compositeId)
          Check if the specified 'compositeId' contains a AssetIdentifier and an AssetProvider identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASSET_ID_DELIMITER

public static String ASSET_ID_DELIMITER
Constructor Detail

DamIdParser

public DamIdParser()
Method Detail

createCompositeId

public static String createCompositeId(String assetProviderIdentifier,
                                       String assetIdentifier)
Create a composite Id String.


getAssetProviderIdentifier

public static String getAssetProviderIdentifier(String compositeId)
Retrieve the Provider Id from the provided composite Id.

Returns:
null if not a valid composite Id.

getAssetIdentifier

public static String getAssetIdentifier(String compositeId)
Retrieve the Asset Id from the provided composite Id.

Returns:
null if not a valid composite Id.

isCompositeId

public static boolean isCompositeId(String compositeId)
Check if the specified 'compositeId' contains a AssetIdentifier and an AssetProvider identifier.

Returns:
true if AssetIdentifier and AssetProviderIdentifier are part of the 'compositeId'.


Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.