Exemplo n.º 1
0
  /**
   * gsDesignClient & gsDesignServer are not synchronized!!! (to speed up)
   *
   * @param pId
   * @param pName
   * @param pStyle
   * @param pGroups
   * @param pWindow
   * @param pCopyright
   * @param pComment
   */
  public Design(
      String pId,
      String pName,
      Hashtable pStyle,
      Vector pGroups,
      boolean pWindow,
      String pCopyright,
      String pComment) {
    if (!gsInit) init();

    gId = pId;
    gName = pName;
    if (pName.indexOf(":") != -1) {
      gPath = pId;
      gFile = new File(gName + File.separator + "design.xsl"); // File-->URL
      // ERROR - Path conflict
    } else {
      if (pName.charAt(0) == '/') {
        gPath = pId;
        gFile =
            new File(
                SystemInformation.getBaseDir()
                    + pId.replace('/', File.separatorChar)
                    + File.separator
                    + "design.xsl"); // File-->URL
      } else {
        /*
         * String lDesignClient, lDesignServer;
         * synchronized(LOCK_DESIGN) { lDesignClient=gsDesignClient;
         * lDesignServer=gsDesignServer; }
         * gPath=lDesignClient+File.separator+pPath; gFile=new
         * File(lDesignServer+File.separator+pPath.replace('/',File.separatorChar)+File.separator+pName+".xsl");
         */
        gPath = gsDesignClient + File.separator + pId;
        gFile =
            new File(
                gsDesignServer
                    + File.separator
                    + pId.replace('/', File.separatorChar)
                    + File.separator
                    + "design.xsl");
      }
    }
    gStyle = pStyle;
    gGroups = pGroups;
    gWindow = pWindow;
    gCopyright = pCopyright;
    gComment = pComment;
  }
Exemplo n.º 2
0
 public static synchronized void reload() {
   synchronized (LOCK_DESIGN) {
     gsInit = false;
     init();
   }
 }