PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/razpub/src/com/razie/pub/assets/JavaAssetInventory.java

http://razpub.googlecode.com/
Java | 52 lines | 17 code | 12 blank | 23 comment | 0 complexity | d2f8d1de77ee9a48c55bf3c19933bd90 MD5 | raw file
 1package com.razie.pub.assets;
 2
 3import razie.assets.AssetBrief;
 4import razie.assets.AssetKey;
 5import razie.assets.AssetLocation;
 6import razie.assets.AssetMap;
 7import razie.assets.Meta;
 8import razie.assets.QueryCriteria;
 9import razie.base.ActionItem;
10import razie.base.ScriptContext;
11
12
13/**
14 * inventories manage entities - we need invnetories to GET entities from a key, or QUERY/FIND
15 * entities
16 * 
17 * invnetories are indexed by managed entity types in the AssetMgr
18 * 
19 * inventories manage entities - basic functionality is locating assets
20 * 
21 * inventories should not be accessed directly, but via the AssetMgr.
22 * 
23 */
24public interface JavaAssetInventory extends razie.assets.AssetInventory {
25   
26   //----------------------- restate the base inherited methods, for java-only folk
27   
28    /** get an asset by key - it should normally be AssetBase or SdkAsset */
29    public Object getAsset(AssetKey ref);
30
31    /**
32     * get/make the brief for an asset given its key. The idea around briefs is that I don't always
33     * need the full asset - often i can get around by just a proxy brief
34     */
35    public AssetBrief getBrief(AssetKey ref);
36
37    /** execute command on asset. the asset can be local or remote */
38    public Object doAction(String cmd, AssetKey ref, ScriptContext ctx);
39
40    public ActionItem[] getSupportedActions(AssetKey ref);
41
42    /** initialize this instance for use with this Meta */
43    public void init (Meta meta);
44
45    //--------------------- add the java version for finder
46    
47//    /** list all assets of the given type at the given location */
48//    public Map<AssetKey, AssetBrief> find(String type, AssetLocation env, boolean recursive);
49    /** queries can run in the background, they are multithreaded safe etc */
50    public AssetMap query(QueryCriteria criteria, AssetLocation env, boolean recurse, AssetMap toUse);
51
52}