edu.uiuc.ncsa.myproxy.oa4mp.client.storage
Class AssetStoreUtil

java.lang.Object
  extended by edu.uiuc.ncsa.myproxy.oa4mp.client.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
AssetStoreUtil()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssetStoreUtil

public AssetStoreUtil()
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

Parameters:
identifier -
asset -
assetStore -


Copyright © 2013. All Rights Reserved.