public void refresh() { Properties props = getWebAppsProperties(); props.forEach( (k, v) -> { File f = new File((String) v); Project p = FileOwnerQuery.getOwner(FileUtil.toFileObject(f)); WebModule wm = WebModule.getWebModule(p.getProjectDirectory()); String cp = wm.getContextPath(); }); }
public List<FileObject> getWebAppFileObjects() { List<FileObject> list = new ArrayList<>(); Properties props = getWebAppsProperties(); props.forEach( (k, v) -> { FileObject fo = FileUtil.toFileObject(new File((String) v)); if (fo != null) { Project p = FileOwnerQuery.getOwner(fo); if (p != null) { list.add(fo); } } }); return list; }
protected static void saveInstanceProperties(Properties props) { BaseUtil.out("--- 1 SuiteManager : saveInstanceProperties()"); String uri = props.getProperty(BaseConstants.URL_PROP); String projDir = props.getProperty(BaseConstants.SERVER_LOCATION_PROP); if (uri == null) { BaseUtil.out("--- 2 SuiteManager : saveInstanceProperties() uri == null"); return; } BaseUtil.out("--- 3 SuiteManager : saveInstanceProperties() uri = " + uri); InstancePreferences prefs = getNbInstanceProperties(projDir, uri); props.forEach( (k, v) -> { BaseUtil.out( "--- 4 SuiteManager : saveInstanceProperties() key = " + k + "; value = " + v); prefs.setProperty((String) k, (String) v); }); }
protected static void updateInstanceRegistry(Properties props) { Path dirpath = Paths.get("d:\\Netbeans_810_Plugins\\TestApps\\AMEmbServer04"); NbDirectoryPreferences ppp = new NbDirectoryPreferences(dirpath, "uid-025c0287-3243-4a16-837e-94be30ecfc19"); int l = ppp.childrenNames().length; BaseUtil.out( "--- 0000001 SuiteManager : updateInstanceRegistry I test NbDirectoryPreferences lengt=" + l); BaseUtil.out("--- 1 SuiteManager : updateInstanceRegistry(Properties)"); String serverLocation = props.getProperty(BaseConstants.SERVER_LOCATION_PROP); BaseUtil.out( "--- 2 SuiteManager : updateInstanceRegistry(Properties) serverLocation = " + serverLocation); InstancePreferences prefs = getInstanceProperties(serverLocation); props.forEach( (k, v) -> { BaseUtil.out( "--- 2 SuiteManager : updateInstanceRegistry(Properties) key = " + k + "; value = " + v); prefs.setProperty((String) k, (String) v); }); String shutdownPort = props.getProperty(BaseConstants.SHUTDOWN_PORT_PROP); if (shutdownPort == null) { // Cannot be shutdownPort = String.valueOf(Integer.MAX_VALUE); prefs.setProperty(BaseConstants.SHUTDOWN_PORT_PROP, shutdownPort); } }