Author: jalkanen
Date: Sun May 10 18:14:55 2009
New Revision: 773377
URL: http://svn.apache.org/viewvc?rev=773377&view=rev
Log:
Minor reshuffling of constructor parameters and javadocs.
Modified:
incubator/jspwiki/trunk/src/java/org/apache/wiki/JCRWikiPage.java
Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/JCRWikiPage.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/JCRWikiPage.java?rev=773377&r1=773376&r2=773377&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/JCRWikiPage.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/JCRWikiPage.java Sun May
10 18:14:55 2009
@@ -79,14 +79,39 @@
m_jcrPath = ContentManager.getJCRPath( name );
}
+ /**
+ * Creates a JCRWikiPage using the default path.
+ *
+ * @param engine
+ * @param node
+ * @throws RepositoryException
+ * @throws ProviderException
+ */
public JCRWikiPage(WikiEngine engine, Node node)
throws RepositoryException, ProviderException
{
+ this( engine, ContentManager.getWikiPath( node.getPath() ), node );
+ }
+
+ /**
+ * Creates a WikiPage with a given Node. This constructor
+ * can be used when you wish to put create a WikiPage outside the
+ * default page hierarchy, for example when you need to create
+ * a temporary storage for workflows.
+ *
+ * @param engine
+ * @param name
+ * @param node
+ * @throws RepositoryException
+ */
+ public JCRWikiPage(WikiEngine engine, WikiPath name, Node node)
+ throws RepositoryException
+ {
m_engine = engine;
m_jcrPath = node.getPath();
- m_name = ContentManager.getWikiPath( node.getPath() );
+ m_name = name;
}
-
+
public Node getJCRNode() throws RepositoryException
{
return m_engine.getContentManager().getJCRNode(m_jcrPath);