Remaining differences between JPublish core and OFBiz mods
David E Jones <[email protected]> Sat, 8 Mar 2003 00:11:42 -0800
| Newsgroups | gmane.comp.java.jpublish.devel |
|---|---|
| Organization | The Open For Business Project |
| Message-ID | <[email protected]> |
Anthony,
Attached is a diff of the current JPublish CVS code and the modified code that
we are using for OFBiz. I'd appreciate feedback on these changes. Some are
more important than others, and I'm sure you'll get a sense of that as you
look them over.
If you have any questions, let me know.
Later,
-David Jones
========================================
cvs server: Diffing .
cvs server: Diffing org
cvs server: Diffing org/jpublish
Index: org/jpublish/SiteContext.java
===================================================================
RCS file: /cvsroot/jpublish/jpublish/src/org/jpublish/SiteContext.java,v
retrieving revision 1.78
diff -w -r1.78 SiteContext.java
860c860
< log.info("getContent(" + name + ")");
---
> if (log.isDebugEnabled()) log.debug("getContent(" + name + ")");
865c865
< log.info("Looking for template: " + path);
---
> if (log.isDebugEnabled()) log.debug("Looking for template: "
+ path);
872,874c872,873
< log.info("Looking for content: " + path);
< return new RepositoryContent(r.get(path),
< r.getLastModified(path));
---
> if (log.isDebugEnabled()) log.debug("Looking for content: "
+ path);
> return new RepositoryContent(r, path);
cvs server: Diffing org/jpublish/action
Index: org/jpublish/action/ActionManager.java
===================================================================
RCS file:
/cvsroot/jpublish/jpublish/src/org/jpublish/action/ActionManager.java,v
retrieving revision 1.31
diff -w -r1.31 ActionManager.java
100a101,102
> private Map cachedScriptActions = new HashMap();
>
540a543,548
> action = (Action) cachedScriptActions.get(name);
> if (action != null) {
> log.debug("Action found in script actions cache.");
> return action;
> }
>
548a557
> cachedScriptActions.put(name, action);
cvs server: Diffing org/jpublish/component
cvs server: Diffing org/jpublish/error
cvs server: Diffing org/jpublish/page
Index: org/jpublish/page/PageInstance.java
===================================================================
RCS file: /cvsroot/jpublish/jpublish/src/org/jpublish/page/PageInstance.java,v
retrieving revision 1.6
diff -w -r1.6 PageInstance.java
339,341c339,341
< //if(name == null){
< // name = pageActionElement.getValue();
< //}
---
> if(name == null){
> name = pageActionElement.getValue();
> }
cvs server: Diffing org/jpublish/page/db
cvs server: Diffing org/jpublish/page/filesystem
cvs server: Diffing org/jpublish/page/servletcontext
cvs server: Diffing org/jpublish/page/xml
cvs server: Diffing org/jpublish/repository
Index: org/jpublish/repository/RepositoryContent.java
===================================================================
RCS file:
/cvsroot/jpublish/jpublish/src/org/jpublish/repository/RepositoryContent.java,v
retrieving revision 1.1
diff -w -r1.1 RepositoryContent.java
52a53
> import java.io.InputStreamReader;
60a62
> import org.jpublish.Repository;
73c75,77
< private String data;
---
> private Repository repository = null;
> private String path = null;
> private String data = null;
77a82,94
> @param repository The Repository used to load the content
> @param path The path to the content in the repository
> */
>
> public RepositoryContent(Repository repository, String path) {
> this.repository = repository;
> this.path = path;
> this.data = null;
> this.lastModified = -1;
> }
>
> /** Construct a new RepositoryContent object.
>
92a110
> this.snapLastModified(false);
95a114,123
> private void snapLastModified(boolean forceFromRepository) {
> if ((forceFromRepository || this.lastModified == -1) &&
this.repository != null) {
> try {
> this.lastModified =
this.repository.getLastModified(this.path);
> } catch (Exception e) {
> log.warn("Could not getLastModified time from repository
(returning -1): " + e.toString());
> }
> }
> }
>
101a130,140
> //doing an actual read, set the lastModified time
> this.snapLastModified(true);
>
> if (this.repository != null) {
> try {
> return this.repository.getInputStream(this.path);
> } catch (Exception e) {
> log.warn("Could not getInputStream from repository
(returning null): " + e.toString());
> return null;
> }
> }
121a161,173
> //doing an actual read, set the lastModified time
> this.snapLastModified(true);
>
> InputStream repInputStrem = null;
> if (repository != null) {
> try {
> repInputStrem = repository.getInputStream(path);
> } catch (Exception e) {
> log.warn("Could not getInputStream from repository
(returning null): " + e.toString());
> return null;
> }
> }
>
122a175
> if (repository != null) return new
InputStreamReader(repInputStrem);
125a179
> if (repository != null) return new
InputStreamReader(repInputStrem, encoding);
128,129c182,183
< log.warn("Unsupported encoding " + encoding +
< "; using default encoding");
---
> log.warn("Unsupported encoding " + encoding + "; using
default encoding");
> if (repository != null) return new
InputStreamReader(repInputStrem);
134a189,198
> public boolean equals(Object obj) {
> Content passed = (Content) obj;
> long thisLastModified = this.getLastModified();
> long passedLastModified = passed.getLastModified();
> if (thisLastModified == passedLastModified) {
> return true;
> }
> if (log.isDebugEnabled()) log.debug("Passed content not equal:
thisLastModified=" + thisLastModified + ", passedLastModified=" +
passedLastModified);
> return false;
> }
cvs server: Diffing org/jpublish/repository/db
cvs server: Diffing org/jpublish/repository/filesystem
cvs server: Diffing org/jpublish/repository/servletcontext
cvs server: Diffing org/jpublish/repository/web
cvs server: Diffing org/jpublish/resource
cvs server: Diffing org/jpublish/resource/filesystem
cvs server: Diffing org/jpublish/servlet
cvs server: Diffing org/jpublish/template
Index: org/jpublish/template/TemplateContent.java
===================================================================
RCS file:
/cvsroot/jpublish/jpublish/src/org/jpublish/template/TemplateContent.java,v
retrieving revision 1.1
diff -w -r1.1 TemplateContent.java
132a133,142
> public boolean equals(Object obj) {
> Content passed = (Content) obj;
> long thisLastModified = this.getLastModified();
> long passedLastModified = passed.getLastModified();
> if (thisLastModified == passedLastModified) {
> return true;
> }
> if (log.isDebugEnabled()) log.debug("Passed content not equal:
thisLastModified=" + thisLastModified + ", passedLastModified=" +
passedLastModified);
> return false;
> }
cvs server: Diffing org/jpublish/template/filesystem
cvs server: Diffing org/jpublish/util
cvs server: Diffing org/jpublish/util/vfs
cvs server: Diffing org/jpublish/util/vfs/provider
cvs server: Diffing org/jpublish/util/vfs/provider/filesystem
cvs server: Diffing org/jpublish/view
cvs server: Diffing org/jpublish/view/freemarker
Index: org/jpublish/view/freemarker/FreeMarkerViewRenderer.java
===================================================================
RCS file:
/cvsroot/jpublish/jpublish/src/org/jpublish/view/freemarker/FreeMarkerViewRenderer.java,v
retrieving revision 1.6
diff -w -r1.6 FreeMarkerViewRenderer.java
84,86c84,86
< private SiteContext siteContext;
< private JPublishTemplateLoader templateLoader;
< private freemarker.template.Configuration fmConfig;
---
> protected SiteContext siteContext;
> protected JPublishTemplateLoader templateLoader;
> protected freemarker.template.Configuration fmConfig;
Index: org/jpublish/view/freemarker/JPublishTemplateLoader.java
===================================================================
RCS file:
/cvsroot/jpublish/jpublish/src/org/jpublish/view/freemarker/JPublishTemplateLoader.java,v
retrieving revision 1.3
diff -w -r1.3 JPublishTemplateLoader.java
97c97
< log.debug("findTemplateSource(" + name + ")");
---
> if (log.isDebugEnabled()) log.debug("findTemplateSource(" + name +
")");
100c100
< log.debug("findTemplateSource() content: " + content);
---
> if (log.isDebugEnabled()) log.debug("findTemplateSource() content: "
+ content);
cvs server: Diffing org/jpublish/view/raw
cvs server: Diffing org/jpublish/view/velocity
cvs server: Diffing org/jpublish/view/webmacro
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com