Class AssetStoreUtil
- java.lang.Object
-
- org.oa4mp.client.api.storage.AssetStoreUtil
-
public class AssetStoreUtil extends Object
A utility that contains a couple of useful idioms.Created by Jeff Gaynor
on 1/28/13 at 2:27 PM
-
-
Constructor Summary
Constructors Constructor Description AssetStoreUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static edu.uiuc.ncsa.security.core.Identifier
createID()
Create an identifier with a random id plus timestamp.static Asset
get(String identifier, AssetStore assetStore)
Retrieves the asset with the identifier from the store.protected static SecureRandom
getRandom()
static void
save(String identifier, Asset asset, AssetStore assetStore)
Saves the asset with the given identifier to the store.
-
-
-
Method Detail
-
getRandom
protected static SecureRandom getRandom()
-
createID
public static edu.uiuc.ncsa.security.core.Identifier createID()
Create an identifier with a random id plus timestamp.- Returns:
-
get
public static Asset get(String identifier, AssetStore assetStore)
Retrieves the asset with the identifier from the store.- Parameters:
identifier
-assetStore
-- Returns:
-
save
public static void save(String identifier, Asset asset, AssetStore assetStore)
Saves the asset with the given identifier to the store. Note that this will first check if the identifier already exists in the store and replace it if it does. It will also set the id of the asset to the one supplied and coarry out the save by the token.- Parameters:
identifier
-asset
-assetStore
-
-
-