Skip to content
Browse files

Fixed up templates to match new site design, added a few methods to t…

…he stack: isTransient, move, and modified some methods to do deep removal as an option. All improvements in this commit.
  • Loading branch information...
1 parent d650fe5 commit e87cdb74255174c93bd14a7a986090238627d5fa @ncb000gt ncb000gt committed Mar 3, 2009
View
84 .classpath
@@ -1,42 +1,42 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/java"/>
- <classpathentry kind="src" path="utils/jsdoc-toolkit/java/src"/>
- <classpathentry kind="lib" path="lib/activation.jar"/>
- <classpathentry kind="lib" path="lib/axiom-lucene.jar"/>
- <classpathentry kind="lib" path="lib/axiom.jar"/>
- <classpathentry kind="lib" path="lib/commons-codec.jar"/>
- <classpathentry kind="lib" path="lib/commons-fileupload.jar"/>
- <classpathentry kind="lib" path="lib/commons-httpclient-3.0.1.jar"/>
- <classpathentry kind="lib" path="lib/commons-io.jar"/>
- <classpathentry kind="lib" path="lib/commons-logging.jar"/>
- <classpathentry kind="lib" path="lib/concurrent.jar"/>
- <classpathentry kind="lib" path="lib/ehcache.jar"/>
- <classpathentry kind="lib" path="lib/h2.jar"/>
- <classpathentry kind="lib" path="lib/jacob.jar"/>
- <classpathentry kind="lib" path="lib/jai_codec.jar"/>
- <classpathentry kind="lib" path="lib/jai_core.jar"/>
- <classpathentry kind="lib" path="lib/jetty-util.jar"/>
- <classpathentry kind="lib" path="lib/jetty.jar"/>
- <classpathentry kind="lib" path="lib/jimi.jar"/>
- <classpathentry kind="lib" path="lib/jmxri.jar"/>
- <classpathentry kind="lib" path="lib/js.jar"/>
- <classpathentry kind="lib" path="lib/jtidy-r8.jar"/>
- <classpathentry kind="lib" path="lib/junit-4.1.jar"/>
- <classpathentry kind="lib" path="lib/ldap.jar"/>
- <classpathentry kind="lib" path="lib/mail.jar"/>
- <classpathentry kind="lib" path="lib/netcomponents.jar"/>
- <classpathentry kind="lib" path="lib/PDFBox-0.7.2.jar"/>
- <classpathentry kind="lib" path="lib/poi-3.0-alpha2-20060616.jar"/>
- <classpathentry kind="lib" path="lib/poi-scratchpad-3.0-alpha2-20060616.jar"/>
- <classpathentry kind="lib" path="lib/servlet.jar"/>
- <classpathentry kind="lib" path="lib/Wrapper.jar"/>
- <classpathentry kind="lib" path="lib/xmlrpc.jar"/>
- <classpathentry kind="lib" path="utils/jsdoc-toolkit/java/classes/js.jar"/>
- <classpathentry kind="lib" path="utils/jsdoc-toolkit/jsdebug.jar"/>
- <classpathentry kind="lib" path="utils/jsdoc-toolkit/jsrun.jar"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="lib/mime-util.jar"/>
- <classpathentry kind="lib" path="C:/Program Files/Java/jdk1.6.0_07/lib/tools.jar"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/java"/>
+ <classpathentry kind="src" path="utils/jsdoc-toolkit/java/src"/>
+ <classpathentry kind="lib" path="lib/activation.jar"/>
+ <classpathentry kind="lib" path="lib/axiom-lucene.jar"/>
+ <classpathentry kind="lib" path="lib/axiom.jar"/>
+ <classpathentry kind="lib" path="lib/commons-codec.jar"/>
+ <classpathentry kind="lib" path="lib/commons-fileupload.jar"/>
+ <classpathentry kind="lib" path="lib/commons-httpclient-3.0.1.jar"/>
+ <classpathentry kind="lib" path="lib/commons-io.jar"/>
+ <classpathentry kind="lib" path="lib/commons-logging.jar"/>
+ <classpathentry kind="lib" path="lib/concurrent.jar"/>
+ <classpathentry kind="lib" path="lib/ehcache.jar"/>
+ <classpathentry kind="lib" path="lib/h2.jar"/>
+ <classpathentry kind="lib" path="lib/jacob.jar"/>
+ <classpathentry kind="lib" path="lib/jai_codec.jar"/>
+ <classpathentry kind="lib" path="lib/jai_core.jar"/>
+ <classpathentry kind="lib" path="lib/jetty-util.jar"/>
+ <classpathentry kind="lib" path="lib/jetty.jar"/>
+ <classpathentry kind="lib" path="lib/jimi.jar"/>
+ <classpathentry kind="lib" path="lib/jmxri.jar"/>
+ <classpathentry kind="lib" path="lib/js.jar" sourcepath="/home/ncampbell/Downloads/rhino1_7R1/xmlimplsrc"/>
+ <classpathentry kind="lib" path="lib/jtidy-r8.jar"/>
+ <classpathentry kind="lib" path="lib/junit-4.1.jar"/>
+ <classpathentry kind="lib" path="lib/ldap.jar"/>
+ <classpathentry kind="lib" path="lib/mail.jar"/>
+ <classpathentry kind="lib" path="lib/netcomponents.jar"/>
+ <classpathentry kind="lib" path="lib/PDFBox-0.7.2.jar"/>
+ <classpathentry kind="lib" path="lib/poi-3.0-alpha2-20060616.jar"/>
+ <classpathentry kind="lib" path="lib/poi-scratchpad-3.0-alpha2-20060616.jar"/>
+ <classpathentry kind="lib" path="lib/servlet.jar"/>
+ <classpathentry kind="lib" path="lib/Wrapper.jar"/>
+ <classpathentry kind="lib" path="lib/xmlrpc.jar"/>
+ <classpathentry kind="lib" path="utils/jsdoc-toolkit/java/classes/js.jar"/>
+ <classpathentry kind="lib" path="utils/jsdoc-toolkit/jsdebug.jar"/>
+ <classpathentry kind="lib" path="utils/jsdoc-toolkit/jsrun.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="lib/mime-util.jar"/>
+ <classpathentry kind="lib" path="C:/Program Files/Java/jdk1.6.0_07/lib/tools.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
View
11 src/java/axiom/objectmodel/INode.java
@@ -27,6 +27,7 @@
import axiom.framework.IPathElement;
import axiom.objectmodel.db.DbMapping;
+import axiom.objectmodel.db.Transactor;
import axiom.scripting.rhino.MultiValue;
import axiom.scripting.rhino.Reference;
@@ -241,6 +242,12 @@
public boolean remove();
/**
+ *
+ *
+ */
+ public boolean remove(boolean deep);
+
+ /**
*
*
* @param node ...
@@ -396,4 +403,8 @@
public void setMultiValue(String name, MultiValue value);
public void setXML(String name, Object value);
+
+ public boolean isTransient();
+
+ public Transactor getLock();
}
View
15 src/java/axiom/objectmodel/TransientNode.java
@@ -26,6 +26,7 @@
import axiom.framework.IPathElement;
import axiom.objectmodel.db.DbMapping;
import axiom.objectmodel.db.Relation;
+import axiom.objectmodel.db.Transactor;
import axiom.scripting.rhino.MultiValue;
import axiom.scripting.rhino.Reference;
import axiom.util.*;
@@ -480,7 +481,11 @@ public boolean remove() {
return true;
}
-
+
+ public boolean remove(boolean deep) {
+ return this.remove();
+ }
+
/**
*
*
@@ -1009,4 +1014,12 @@ public void setMultiValue(String propname, MultiValue value) {
public void setXML(String propname, Object value) {
// do nothing for now
}
+
+ public Transactor getLock() {
+ return null;
+ }
+
+ public boolean isTransient() {
+ return true;
+ }
}
View
27 src/java/axiom/objectmodel/db/Node.java
@@ -1542,16 +1542,28 @@ protected Node getGroupbySubnode(String sid, boolean create) {
}
/**
+ * Remove a node including it's children.
+ *
+ * @return {Boolean} True if successful.
+ */
+ public boolean remove() {
+ return this.remove(true);
+ }
+
+ /**
*
*
* @return ...
*/
- public boolean remove() {
+ public boolean remove(boolean deep) {
INode parent = getParent();
if (parent != null) {
parent.removeNode(this);
}
- deepRemoveNode();
+
+ if (deep) {
+ deepRemoveNode();
+ }
return true;
}
@@ -3543,4 +3555,15 @@ protected void updateLayersOnReferences(int layer) {
}
}
+ public boolean isTransient() {
+ if (state == TRANSIENT) {
+ return true;
+ }
+
+ return false;
+ }
+
+ public Transactor getLock() {
+ return lock;
+ }
}
View
28 src/java/axiom/scripting/rhino/AxiomObject.java
@@ -340,6 +340,15 @@ protected void checkNode() {
}
/**
+ * Check whether the AxiomObject is transient or persisted.
+ *
+ * @return {Boolean} True if transient
+ */
+ public boolean jsFunction_isTransient() {
+ return node.isTransient();
+ }
+
+ /**
* Get the URL of this object within the application.
*
* @param {String} [action] The action name, or null/undefined for the "main" action
@@ -3173,7 +3182,11 @@ public static final String getModeStr(Key k) {
*/
public boolean jsFunction_del() throws Exception{
- boolean success = this.node.remove();
+ return jsFunction_del(true);
+ }
+
+ public boolean jsFunction_del(boolean deep) throws Exception{
+ boolean success = this.node.remove(deep);
if (success) {
String name;
@@ -3183,12 +3196,21 @@ public boolean jsFunction_del() throws Exception{
} else if ((name = node.getName()) != null &&
(parent = (AxiomObject) this.getInternalProperty("_parent")) != null) {
parent.calcComputedProps(name);
- }
+ }
this.calcComputedProps("_parent");
}
return success;
}
-
+ /**
+ * Move takes the current object and moves it from the current parent to the specified parent
+ *
+ *
+ * @param {Object} The new parent object
+ * @returns {Boolean} Whether the operation was a success or not
+ */
+ public boolean jsFunction_move(Object parent) throws Exception {
+ return this.setParent(parent);
+ }
}
View
46 src/java/axiom/scripting/rhino/LuceneQueryDispatcher.java
@@ -84,6 +84,7 @@
public class LuceneQueryDispatcher extends QueryDispatcher {
public static final String PATH_FIELD = "path";
+ static final String EXTENDS_FIELD = "extend";
static final String RECURSE_PATH_MARKER = "**";
public LuceneQueryDispatcher(){
@@ -99,6 +100,11 @@ public ArrayList executeQuery(ArrayList prototypes, IFilter filter,
SortObject sort = getSortObject((Scriptable)options);
ArrayList opaths = getPaths((Scriptable)options);
int _layer = getLayer((Scriptable) options);
+ boolean ext = extendPrototypes((Scriptable) options);
+
+ if (ext) {
+ prototypes = getAllPrototypes(prototypes);
+ }
ArrayList results = new ArrayList();
IndexSearcher searcher = null;
@@ -1315,6 +1321,46 @@ private ArrayList getPaths(Object options) throws Exception{
}
+ private ArrayList<String> getAllPrototypes(ArrayList prototypes) {
+ ArrayList<String> newPrototypes = new ArrayList<String>(prototypes);
+ for (Object p : prototypes) {
+ String proto = p.toString();
+ Prototype childPrototypes = app.typemgr.getPrototype(proto);
+ if (childPrototypes != null) {
+ for (Prototype prototype : childPrototypes.getChildPrototypes()) {
+ newPrototypes.add(prototype.getName());
+ }
+ }
+ }
+ return newPrototypes;
+ }
+
+ private boolean extendPrototypes(Object options) throws Exception {
+ try {
+ boolean ext = false;
+ if (options != null) {
+ Object value = null;
+ if (options instanceof Scriptable) {
+ value = ((Scriptable) options).get(EXTENDS_FIELD, (Scriptable) options);
+ } else if (options instanceof Map) {
+ value = ((Map) options).get(EXTENDS_FIELD);
+ }
+ if (value != null) {
+ if (value instanceof Scriptable) {
+ ext = ScriptRuntime.toBoolean(value);
+ } else if (value instanceof Boolean) {
+ ext = ((Boolean) value).booleanValue();
+ } else if (value instanceof String) {
+ ext = Boolean.parseBoolean((String) value);
+ }
+ }
+ }
+ return ext;
+ } catch (Exception e) {
+ throw e;
+ }
+ }
+
public Object hits(ArrayList prototypes, IFilter filter, Object options) throws Exception {
Object results = null;
View
24 utils/jsdoc-toolkit/templates/jsdoc/class.tmpl
@@ -33,23 +33,21 @@
<a href="http://www.axiomstack.com/company/">COMPANY</a>
</li>
</ul>
- </div>
-
-
- <div class="headlines">
- <h1>Documentation</h1>
- <h2>tutorials, references and technical specifications</h2>
- </div>
-
<form action="http://www.axiomstack.com/search" class="search" method="GET" name="search">
<fieldset>
<input id="q" name="q" type="text"/>
</fieldset>
<fieldset>
- <input type="submit" value="Search"/>
+ <input type="submit" value=""/>
</fieldset>
</form>
+ </div>
+
+ <div class="headlines">
+ <h1>Documentation</h1>
+ <h2>tutorials, references and technical specifications</h2>
+ </div>
</div>
<div class="navwrap">
@@ -584,13 +582,5 @@
<div class="legal">&copy; 2008 Axiom Software, Inc. All Rights Reserved</div>
</div>
- <script type="text/javascript">
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
- document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-
- var pageTracker = _gat._getTracker("UA-796842-3");
- pageTracker._initData();
- pageTracker._trackPageview();
- </script>
</body>
</html>
View
26 utils/jsdoc-toolkit/templates/jsdoc/hooks_index.tmpl
@@ -15,7 +15,7 @@
<div class="header contentwrap">
<div class="global_header">
<div class="logo">
- <a href="http://www.axiomstack.com/"><img alt="Axiom Stack" src="images/logo.png" title="Axiom Stack"/></a>
+ <a href="http://www.axiomstack.com/"><img alt="Axiom Stack" src="images/logo.gif" title="Axiom Stack"/></a>
</div>
<ul class="nav">
@@ -33,23 +33,23 @@
<a href="http://www.axiomstack.com/company/">COMPANY</a>
</li>
</ul>
- </div>
-
-
- <div class="headlines">
- <h1>Documentation</h1>
- <h2>tutorials, references and technical specifications</h2>
- </div>
<form action="http://www.axiomstack.com/search" class="search" method="GET" name="search">
<fieldset>
<input id="q" name="q" type="text"/>
</fieldset>
<fieldset>
- <input type="submit" value="Search"/>
+ <input type="submit" value=""/>
</fieldset>
</form>
+ </div>
+
+
+ <div class="headlines">
+ <h1>Documentation</h1>
+ <h2>tutorials, references and technical specifications</h2>
+ </div>
</div>
<div class="navwrap">
@@ -267,13 +267,5 @@
<div class="legal">&copy; 2008 Axiom Software, Inc. All Rights Reserved</div>
</div>
</div>
- <script type="text/javascript">
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
- document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-
- var pageTracker = _gat._getTracker("UA-796842-3");
- pageTracker._initData();
- pageTracker._trackPageview();
- </script>
</body>
</html>
View
30 utils/jsdoc-toolkit/templates/jsdoc/index.tmpl
@@ -15,7 +15,7 @@
<div class="header contentwrap">
<div class="global_header">
<div class="logo">
- <a href="http://www.axiomstack.com/"><img alt="Axiom Stack" src="images/logo.png" title="Axiom Stack"/></a>
+ <a href="http://www.axiomstack.com/"><img alt="Axiom Stack" src="images/logo.gif" title="Axiom Stack"/></a>
</div>
<ul class="nav">
@@ -33,23 +33,23 @@
<a href="http://www.axiomstack.com/company/">COMPANY</a>
</li>
</ul>
+
+ <form action="http://www.axiomstack.com/search" class="search" method="GET" name="search">
+ <fieldset>
+ <input id="q" name="q" type="text"/>
+
+ </fieldset>
+ <fieldset>
+ <input type="submit" value=""/>
+ </fieldset>
+ </form>
</div>
<div class="headlines">
<h1>Documentation</h1>
<h2>tutorials, references and technical specifications</h2>
</div>
-
- <form action="http://www.axiomstack.com/search" class="search" method="GET" name="search">
- <fieldset>
- <input id="q" name="q" type="text"/>
-
- </fieldset>
- <fieldset>
- <input type="submit" value="Search"/>
- </fieldset>
- </form>
</div>
<div class="navwrap">
@@ -112,13 +112,5 @@
<div class="legal">&copy; 2008 Axiom Software, Inc. All Rights Reserved</div>
</div>
</div>
- <script type="text/javascript">
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
- document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-
- var pageTracker = _gat._getTracker("UA-796842-3");
- pageTracker._initData();
- pageTracker._trackPageview();
- </script>
</body>
</html>
View
30 utils/jsdoc-toolkit/templates/jsdoc/static/css/global.css
@@ -15,17 +15,20 @@ h5 {margin-bottom: 5px;}
.header {margin-top:20px; margin-bottom:20px; overflow:hidden;}
.header .global_header {padding-bottom: 15px; overflow:hidden;}
-.header .nav {margin: 0; list-style: none; float:right; text-align:right; color:#acd579; font-size:0.8em; text-transform:uppercase; font-weight:bold; font-family:"Trebuchet MS", sans-serif;}
+.header .navigation {float:right;}
+.header .nav {margin: 4px 0 0 0; list-style: none; float:left; text-align:right; color:#acd579; font-size:0.8em; text-transform:uppercase; font-weight:bold; font-family:"Trebuchet MS", sans-serif;}
.header .nav li {display: inline;}
.header .nav a{color:#3f3f3f;}
.header .nav a.current {color:#7aaa37;}
.header .logo {float:left;}
-.header .headlines {margin:0; float:left; clear:both; }
-.header h1, .header h2 {margin:0; padding:0; font-weight:normal; letter-spacing:0px; }
-.header .headlines h1 {font-size:1.75em; color:#666;}
-.header .headlines h2 {font-size:1.25em; color:#999;}
-.header .search {float:right;}
-.header .search fieldset {border:none; float:left;}
+.header .headlines {margin:0; float:left; clear:both;}
+.header h1, .header h2 {margin:0; padding:0; font-weight:normal; letter-spacing:0px;display:inline;}
+.header .headlines h1 {font-size:1.75em; color:#666;margin-right:20px;}
+.header .headlines h2 {font-size:1.15em; color:#999;}
+.header .search {float:right;margin-left:15px;}
+.header .search fieldset {border:none; float:left;margin:0;padding:0;}
+.header .search input {width:60px;border:1px solid #7f9db9;height:18px;}
+.header .search input[type="submit"] {background:url(http://www.axiomstack.com/static/images/search_icon.png) 0 0 no-repeat;border:none;width:25px;height:21px;}
#footer {background:#669933; padding:20px 0; font-weight:bold;}
#footer .nav {text-align: center; padding:0 0 14px 0; overflow:hidden; margin:0 auto;}
@@ -42,13 +45,12 @@ h5 {margin-bottom: 5px;}
#footer .legal span {padding:0 15px;}
#footer .legal a {color:#000;}
-.navwrap {background:#669933; padding:15px 0 0 0; margin-bottom:25px;}
-.sub_nav {text-transform:uppercase; font-weight:bold; font-family:"Trebuchet MS", sans-serif; font-size:.85em;}
-.sub_nav li {list-style:none; float:left;}
-.sub_nav li a {margin:0; padding:0 15px; color:#fff; width:100%;}
-.sub_nav li.current {background:#fff url(http://www.axiomstack.com/static/images/homepage/rounded_left_nav.png) 0 0 no-repeat;}
-.sub_nav li.current a {color:#669933; background:url(http://www.axiomstack.com/static/images/homepage/rounded_right_nav.png) 100% 0 no-repeat;}
-.sub_nav li.last {border-right:none;}
+.navwrap {padding:15px 0 0 0; margin-bottom:25px;}
+.sub_nav {text-transform:uppercase; font-weight:bold; font-family:"Trebuchet MS", sans-serif; font-size:.85em;border-bottom:1px solid #a8c58a;overflow:visible;}
+.sub_nav li {list-style:none;width:auto;margin:0;padding:0;display:inline;}
+.sub_nav li a {margin:0; padding:0 15px; color:#fff; width:100%;color:#666;text-decoration:none;}
+.sub_nav li.current a {width:auto;border:1px solid #a8c58a;border-width:1px 1px 0;background:#fff;color:#669933;position:relative;bottom:-1px;}
+.sub_nav li.first a {border-left:none;}
.page_content {padding:0; color:#666;}
.page_content .feature, .release_notes div {overflow:hidden; padding:10px 30px 25px 10px; background:url(http://www.axiomstack.com/static/images/homepage/divider.jpg) 25% 100% no-repeat; margin-bottom: 25px;}
View
BIN utils/jsdoc-toolkit/templates/jsdoc/static/images/logo.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN utils/jsdoc-toolkit/templates/jsdoc/static/images/logo.png
Deleted file not rendered
View
BIN utils/jsdoc-toolkit/templates/jsdoc/static/images/search_icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e87cdb7

Please sign in to comment.
Something went wrong with that request. Please try again.