1 19 20 package org.netbeans.modules.javawebstart; 21 22 import java.io.IOException ; 23 import org.openide.filesystems.FileObject; 24 import org.openide.loaders.DataObjectExistsException; 25 import org.openide.loaders.MultiDataObject; 26 import org.openide.loaders.UniFileLoader; 27 import org.openide.util.NbBundle; 28 29 public class JnlpDataLoader extends UniFileLoader { 30 31 public static final String REQUIRED_MIME = "text/x-jnlp+xml"; 32 33 private static final long serialVersionUID = 1L; 34 35 public JnlpDataLoader() { 36 super("org.netbeans.modules.javawebstart.JnlpDataObject"); 37 } 38 39 protected String defaultDisplayName() { 40 return NbBundle.getMessage(JnlpDataLoader.class, "LBL_Jnlp_loader_name"); 41 } 42 43 protected void initialize() { 44 super.initialize(); 45 getExtensions().addMimeType(REQUIRED_MIME); 46 } 47 48 protected MultiDataObject createMultiObject(FileObject primaryFile) throws DataObjectExistsException, IOException { 49 return new JnlpDataObject(primaryFile, this); 50 } 51 52 protected String actionsContext() { 53 return "Loaders/" + REQUIRED_MIME + "/Actions"; 54 } 55 56 } 57 | Popular Tags |