Changeset 3758 in main


Ignore:
Timestamp:
04/27/12 13:06:36 (10 years ago)
Author:
Garth Braithwaite
Message:

java & view - Updated the FileStoredDocument?.java to NOT verify the "saved" file via disk/class path first. This is because this code really isn't needed - can't write to a jar/war/ear and if doing classpath based file storage then you know what you're doing and you can specify the path via another mechanism.

Location:
trunk/src/main
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/main/java/org/ibisph/indicatorprofile/modelmap/IndicatorProfileFromIndicatorView.java

    r3743 r3758  
    6666
    6767  /**
    68    * Loads the supplied query definition element with the criteria from the
    69    * query module that exists in the user's session.
    70    *
    71    * @param request HttpServletRequest that the query module (user session) is
    72    *   retrieved from.
    73    * @return the fully loaded query definition xml element object.
     68   * Loads the associated indicator view's IP document into the map.
    7469   */
    7570  public void processModelMap(Map<String, Object> modelMap, HttpServletRequest request) throws Exception {
  • trunk/src/main/java/org/ibisph/indicatorprofile/modelmap/IndicatorViewsFromIndicatorProfile.java

    r3748 r3758  
    7373
    7474  /**
    75    * Loads the supplied query definition element with the criteria from the
    76    * query module that exists in the user's session.
    77    *
    78    * @param request HttpServletRequest that the query module (user session) is
    79    *   retrieved from.
    80    * @return the fully loaded query definition xml element object.
     75   * Creates an INDICATOR_VIEWS container with ALL of the associated indicator's
     76   * view elements.
    8177   */
    8278  public void processModelMap(Map<String, Object> modelMap, HttpServletRequest request) throws Exception {
  • trunk/src/main/java/org/ibisph/xml/service/FileStoredDocument.java

    r3743 r3758  
    2525 */
    2626public class FileStoredDocument extends AbstractDocument implements org.ibisph.xml.service.Document {
    27 
    2827
    2928  /**
     
    5352  public org.dom4j.Document get(String xmlPathAndFilename) throws DocumentException {
    5453    String s = getVerifiedPathAndFilename(xmlPathAndFilename);
    55     File file = new File(s);
    56     return(get(file));
     54    if(StrLib.isSomething(s)) {
     55      File file = new File(s);
     56      return(get(file));
     57    }
     58    return(null);
    5759  } //-------------------------- End of Method ------------------------------
    5860
     
    8183  /**
    8284   * Core save method - sends the XML document to the specified output stream.
    83    * If no exceptions were thrown then operation was successful.
     85   * If no exceptions were thrown then operation was successful.  Note that
     86   * you can NOT save a file to an EAR/WAR/JAR file so any path locating code
     87   * should be done before calling one of these save methods.
    8488   *
    8589   * @param document Source - document to be streamed out.
     
    118122  public void save(
    119123    org.dom4j.Document document,
     124    String xmlPathAndFilename
     125  ) throws IOException, UnsupportedEncodingException {
     126    save(document, xmlPathAndFilename, this.outputFormat);
     127  } //-------------------------- End of Method ------------------------------
     128  public void save(
     129    org.dom4j.Document document,
    120130    String xmlPathAndFilename,
    121131    OutputFormat outputFormat
     
    126136  public void save(
    127137    org.dom4j.Document document,
    128     String xmlPathAndFilename
    129   ) throws IOException, UnsupportedEncodingException {
    130     save(
    131       document,
    132       getVerifiedPathAndFilename(xmlPathAndFilename),
    133       this.outputFormat
    134     );
    135   } //-------------------------- End of Method ------------------------------
    136 
    137   public void save(
    138     org.dom4j.Document document,
    139138    File file,
    140139    OutputFormat outputFormat
     
    148147  ) throws IOException, UnsupportedEncodingException {
    149148    FileLib.createDir(file.getParent());
    150     save(document, new java.io.FileOutputStream(file), outputFormat);
     149    save(document, new java.io.FileOutputStream(file), this.outputFormat);
    151150  } //-------------------------- End of Method ------------------------------
    152151
  • trunk/src/main/webapps/ibisph-view/xslt/html/secure/query/SiteSpecific.xslt

    r3225 r3758  
    1111
    1212        <ibis:doc>
    13                 <name>html/query/SiteSpecific</name>
     13                <name>html/secure/query/SiteSpecific</name>
    1414                <summary>Provides 'query' core site specific template overrides</summary>
    1515                <description>
Note: See TracChangeset for help on using the changeset viewer.