Exemplo n.º 1
0
 public static NGProj readProjAbsolutePath(File theFile) throws Exception {
   NGPage newPage = NGPage.readPageAbsolutePath(theFile);
   if (!(newPage instanceof NGProj)) {
     throw new Exception(
         "Attempt to create an NGProj when there is already a NGPage at "
             + theFile
             + ".  Are you trying to create a NGProj INSIDE the NGPage data folder?");
   }
   return (NGProj) newPage;
 }
Exemplo n.º 2
0
  @Override
  protected void migrateKeyValue(File theFile) throws Exception {
    if (theFile.getName().equalsIgnoreCase("ProjInfo.xml")) {
      File cogFolder = theFile.getParentFile();
      for (File child : cogFolder.listFiles()) {
        String childName = child.getName();
        if (childName.startsWith("key_")) {
          String fileKey = SectionUtil.sanitize(childName.substring(4));
          setKey(fileKey);
        }
      }
    } else if (theFile.getName().endsWith(".sp")) {
      super.migrateKeyValue(theFile);
    } else {
      throw new Exception("don't know how to make key for " + theFile);
    }

    // debug code to identify why projects are becoming named pageinfo
    if (getKey().equalsIgnoreCase("pageinfo")) {
      throw new Exception(
          "for some reason this page is STILL called pageinfo ... should not be: " + theFile);
    }
  }
Exemplo n.º 3
0
 public void saveFile(AuthRequest ar, String comment) throws Exception {
   super.saveFile(ar, comment);
   assureLaunchingPad(ar);
 }