1 19 20 package org.netbeans.core.startup.layers; 21 22 import java.beans.PropertyVetoException ; 23 import java.io.IOException ; 24 import java.net.URL ; 25 import java.util.List ; 26 import org.openide.filesystems.FileSystem; 27 import org.openide.filesystems.XMLFileSystem; 28 29 34 final class NonCacheManager extends LayerCacheManager { 35 36 public NonCacheManager() { 37 super(null); 38 } 39 40 public boolean cacheExists() { 41 return false; 42 } 43 44 public void cleanupCache() throws IOException { 45 } 47 48 public boolean supportsLoad() { 49 return true; 50 } 51 52 public FileSystem createEmptyFileSystem() throws IOException { 53 return new XMLFileSystem(); 54 } 55 56 public void load(FileSystem fs) throws IOException { 57 throw new IllegalStateException (); 58 } 59 60 public void store(FileSystem fs, List <URL > urls) throws IOException { 61 try { 62 ((XMLFileSystem)fs).setXmlUrls(urls.toArray(new URL [urls.size()])); 63 } catch (PropertyVetoException pve) { 64 throw (IOException ) new IOException (pve.toString()).initCause(pve); 65 } 66 } 67 68 } 69 | Popular Tags |