1 15 package org.apache.tapestry.workbench.tree.examples.fsmodel; 16 17 import org.apache.hivemind.impl.DefaultClassResolver; 18 import org.apache.hivemind.util.ClasspathResource; 19 import org.apache.tapestry.asset.PrivateAsset; 20 21 26 public class AssetsHolder 27 { 28 29 private String m_strOpenAssetsURL; 30 private String m_strCloseAssetsURL; 31 private PrivateAsset m_objOpenAsset = null; 32 private PrivateAsset m_objCloseAsset = null; 33 36 public AssetsHolder(String strOpenAssetsURL, String strCloseAssetsURL) 37 { 38 super(); 39 m_strOpenAssetsURL = strOpenAssetsURL; 40 m_strCloseAssetsURL = strCloseAssetsURL; 41 } 42 43 public PrivateAsset getAssetForOpenNode() 44 { 45 if (m_objOpenAsset == null) 46 { 47 m_objOpenAsset = 49 new PrivateAsset( 50 new ClasspathResource(new DefaultClassResolver(), m_strOpenAssetsURL), 51 null); 52 } 53 return m_objOpenAsset; 54 } 55 public PrivateAsset getAssetForCloseNode() 56 { 57 if (m_objCloseAsset == null) 58 { 59 m_objCloseAsset = 61 new PrivateAsset( 62 new ClasspathResource(new DefaultClassResolver(), m_strCloseAssetsURL), 63 null); 64 } 65 return m_objCloseAsset; 66 } 67 68 } 69 | Popular Tags |