File Source: SharedThemeTemplate.java

         /* 
    P/P   *  Method: org.apache.roller.weblogger.business.themes.SharedThemeTemplate__static_init
          */
     1  /*
     2   * Licensed to the Apache Software Foundation (ASF) under one or more
     3   *  contributor license agreements.  The ASF licenses this file to You
     4   * under the Apache License, Version 2.0 (the "License"); you may not
     5   * use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   *
     8   *     http://www.apache.org/licenses/LICENSE-2.0
     9   *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.  For additional information regarding
    15   * copyright in this work, please see the NOTICE file in the top level
    16   * directory of this distribution.
    17   */
    18  
    19  package org.apache.roller.weblogger.business.themes;
    20  
    21  import java.io.Serializable;
    22  import java.util.Date;
    23  import org.apache.roller.weblogger.WebloggerException;
    24  import org.apache.roller.weblogger.pojos.ThemeTemplate;
    25  
    26  
    27  /**
    28   * A Theme based implementation of a Template.  A ThemeTemplate represents a
    29   * template which is part of a shared Theme.
    30   */
    31  public class SharedThemeTemplate implements ThemeTemplate, Serializable {
    32      
    33      private String id = null;
    34      private String action = null;
    35      private String name = null;
    36      private String description = null;
    37      private String contents = null;
    38      private String link = null;
    39      private Date lastModified = null;
    40      private String templateLanguage = null;
    41      private boolean hidden = false;
    42      private boolean navbar = false;
    43      private String  outputContentType = null;
    44      
    45      private SharedTheme myTheme = null;
    46      
    47      
             /* 
    P/P       *  Method: void org.apache.roller.weblogger.business.themes.SharedThemeTemplate()
              * 
              *  Postconditions:
              *    this.action == null
              *    this.contents == null
              *    this.description == null
              *    this.id == null
              *    this.lastModified == null
              *    this.link == null
              *    this.myTheme == null
              *    this.name == null
              *    this.outputContentType == null
              *    this.templateLanguage == null
              *    ...
              */
    48      public SharedThemeTemplate() {}
    49      
    50      public SharedThemeTemplate(SharedTheme theme, String id, String action, String name, 
    51              String desc, String contents, String link, Date date, 
                     /* 
    P/P               *  Method: void org.apache.roller.weblogger.business.themes.SharedThemeTemplate(SharedTheme, String, String, String, String, String, String, Date, String, bool, bool)
                      * 
                      *  Postconditions:
                      *    this.action == action
                      *    init'ed(this.action)
                      *    this.contents == contents
                      *    init'ed(this.contents)
                      *    this.description == desc
                      *    init'ed(this.description)
                      *    this.hidden == hid
                      *    init'ed(this.hidden)
                      *    this.id == id
                      *    init'ed(this.id)
                      *    ...
                      */
    52              String tempLang, boolean hid, boolean navbar) {
    53          
    54          this.myTheme = theme;
    55          this.id = id;
    56          this.action = action;
    57          this.name = name;
    58          this.description = desc;
    59          this.contents = contents;
    60          this.link = link;
    61          this.lastModified = date;
    62          this.templateLanguage = tempLang;
    63          this.hidden = hid;
    64          this.navbar = navbar;
    65      }
    66      
    67      
    68      // NOTE: decorators are deprecated as of 4.0 but we leave this here because
    69      //       they need to be left in place for backwards compatability
    70      public ThemeTemplate getDecorator() {
                 /* 
    P/P           *  Method: ThemeTemplate getDecorator()
                  * 
                  *  Postconditions:
                  *    return_value == null
                  */
    71          return null;
    72      }
    73      
    74      public String getId() {
                 /* 
    P/P           *  Method: String getId()
                  * 
                  *  Preconditions:
                  *    init'ed(this.id)
                  * 
                  *  Postconditions:
                  *    return_value == this.id
                  *    init'ed(return_value)
                  */
    75          return id;
    76      }
    77  
    78      public void setId(String id) {
                 /* 
    P/P           *  Method: void setId(String)
                  * 
                  *  Postconditions:
                  *    this.id == id
                  *    init'ed(this.id)
                  */
    79          this.id = id;
    80      }
    81  
    82      public String getName() {
                 /* 
    P/P           *  Method: String getName()
                  * 
                  *  Preconditions:
                  *    init'ed(this.name)
                  * 
                  *  Postconditions:
                  *    return_value == this.name
                  *    init'ed(return_value)
                  */
    83          return name;
    84      }
    85  
    86      public void setName(String name) {
                 /* 
    P/P           *  Method: void setName(String)
                  * 
                  *  Postconditions:
                  *    this.name == name
                  *    init'ed(this.name)
                  */
    87          this.name = name;
    88      }
    89  
    90      public String getDescription() {
                 /* 
    P/P           *  Method: String getDescription()
                  * 
                  *  Preconditions:
                  *    init'ed(this.description)
                  * 
                  *  Postconditions:
                  *    return_value == this.description
                  *    init'ed(return_value)
                  */
    91          return description;
    92      }
    93  
    94      public void setDescription(String description) {
                 /* 
    P/P           *  Method: void setDescription(String)
                  * 
                  *  Postconditions:
                  *    this.description == description
                  *    init'ed(this.description)
                  */
    95          this.description = description;
    96      }
    97  
    98      public String getContents() {
                 /* 
    P/P           *  Method: String getContents()
                  * 
                  *  Preconditions:
                  *    init'ed(this.contents)
                  * 
                  *  Postconditions:
                  *    return_value == this.contents
                  *    init'ed(return_value)
                  */
    99          return contents;
   100      }
   101  
   102      public void setContents(String contents) {
                 /* 
    P/P           *  Method: void setContents(String)
                  * 
                  *  Postconditions:
                  *    this.contents == contents
                  *    init'ed(this.contents)
                  */
   103          this.contents = contents;
   104      }
   105  
   106      public Date getLastModified() {
                 /* 
    P/P           *  Method: Date getLastModified()
                  * 
                  *  Preconditions:
                  *    init'ed(this.lastModified)
                  * 
                  *  Postconditions:
                  *    return_value == this.lastModified
                  *    init'ed(return_value)
                  */
   107          return lastModified;
   108      }
   109  
   110      public void setLastModified(Date lastModified) {
                 /* 
    P/P           *  Method: void setLastModified(Date)
                  * 
                  *  Postconditions:
                  *    this.lastModified == lastModified
                  *    init'ed(this.lastModified)
                  */
   111          this.lastModified = lastModified;
   112      }
   113  
   114      public String getLink() {
                 /* 
    P/P           *  Method: String getLink()
                  * 
                  *  Preconditions:
                  *    init'ed(this.link)
                  * 
                  *  Postconditions:
                  *    return_value == this.link
                  *    init'ed(return_value)
                  */
   115          return link;
   116      }
   117  
   118      public void setLink(String link) {
                 /* 
    P/P           *  Method: void setLink(String)
                  * 
                  *  Postconditions:
                  *    this.link == link
                  *    init'ed(this.link)
                  */
   119          this.link = link;
   120      }
   121  
   122      public String getTemplateLanguage() {
                 /* 
    P/P           *  Method: String getTemplateLanguage()
                  * 
                  *  Preconditions:
                  *    init'ed(this.templateLanguage)
                  * 
                  *  Postconditions:
                  *    return_value == this.templateLanguage
                  *    init'ed(return_value)
                  */
   123          return templateLanguage;
   124      }
   125  
   126      public void setTemplateLanguage(String templateLanguage) {
                 /* 
    P/P           *  Method: void setTemplateLanguage(String)
                  * 
                  *  Postconditions:
                  *    this.templateLanguage == templateLanguage
                  *    init'ed(this.templateLanguage)
                  */
   127          this.templateLanguage = templateLanguage;
   128      }
   129  
   130      public boolean isHidden() {
                 /* 
    P/P           *  Method: bool isHidden()
                  * 
                  *  Preconditions:
                  *    init'ed(this.hidden)
                  * 
                  *  Postconditions:
                  *    return_value == this.hidden
                  *    init'ed(return_value)
                  */
   131          return hidden;
   132      }
   133  
   134      public void setHidden(boolean isHidden) {
                 /* 
    P/P           *  Method: void setHidden(bool)
                  * 
                  *  Postconditions:
                  *    this.hidden == isHidden
                  *    init'ed(this.hidden)
                  */
   135          this.hidden = isHidden;
   136      }
   137  
   138      public boolean isNavbar() {
                 /* 
    P/P           *  Method: bool isNavbar()
                  * 
                  *  Preconditions:
                  *    init'ed(this.navbar)
                  * 
                  *  Postconditions:
                  *    return_value == this.navbar
                  *    init'ed(return_value)
                  */
   139          return navbar;
   140      }
   141  
   142      public void setNavbar(boolean navbar) {
                 /* 
    P/P           *  Method: void setNavbar(bool)
                  * 
                  *  Postconditions:
                  *    this.navbar == navbar
                  *    init'ed(this.navbar)
                  */
   143          this.navbar = navbar;
   144      }
   145  
   146      public String getDecoratorName() {
                 /* 
    P/P           *  Method: String getDecoratorName()
                  * 
                  *  Postconditions:
                  *    return_value == null
                  */
   147          return null;
   148      }
   149  
   150      public void setDecoratorName(String decorator) {
   151          // no-op
             /* 
    P/P       *  Method: void setDecoratorName(String)
              */
   152      }
   153  
   154      public String getOutputContentType() {
                 /* 
    P/P           *  Method: String getOutputContentType()
                  * 
                  *  Preconditions:
                  *    init'ed(this.outputContentType)
                  * 
                  *  Postconditions:
                  *    return_value == this.outputContentType
                  *    init'ed(return_value)
                  */
   155          return outputContentType;
   156      }
   157  
   158      public void setOutputContentType(String outputContentType) {
                 /* 
    P/P           *  Method: void setOutputContentType(String)
                  * 
                  *  Postconditions:
                  *    this.outputContentType == outputContentType
                  *    init'ed(this.outputContentType)
                  */
   159          this.outputContentType = outputContentType;
   160      }
   161      
   162      public String toString() {
                 /* 
    P/P           *  Method: String toString()
                  * 
                  *  Preconditions:
                  *    init'ed(this.contents)
                  *    init'ed(this.description)
                  *    init'ed(this.id)
                  *    init'ed(this.lastModified)
                  *    init'ed(this.link)
                  *    init'ed(this.name)
                  * 
                  *  Postconditions:
                  *    java.lang.StringBuilder:toString(...)._tainted == this.lastModified._tainted | this.link._tainted | this.description._tainted | this.id._tainted | this.name._tainted | One-of{this.lastModified._tainted | this.link._tainted | this.description._tainted | this.id._tainted | this.name._tainted, this.contents....
                  *    init'ed(java.lang.StringBuilder:toString(...)._tainted)
                  *    return_value == &java.lang.StringBuilder:toString(...)
                  */
   163          return (id + "," + name + "," + description + "," + link + "," + 
   164                  lastModified + "\n\n" + contents + "\n");
   165      }
   166  
   167      public String getAction() {
                 /* 
    P/P           *  Method: String getAction()
                  * 
                  *  Preconditions:
                  *    init'ed(this.action)
                  * 
                  *  Postconditions:
                  *    return_value == this.action
                  *    init'ed(return_value)
                  */
   168          return action;
   169      }
   170  
   171      public void setAction(String action) {
                 /* 
    P/P           *  Method: void setAction(String)
                  * 
                  *  Postconditions:
                  *    this.action == action
                  *    init'ed(this.action)
                  */
   172          this.action = action;
   173      }
   174      
   175  }








SofCheck Inspector Build Version : 2.18479
SharedThemeTemplate.java 2009-Jan-02 14:25:14
SharedThemeTemplate.class 2009-Sep-04 03:12:31