weaver 2004/09/03 06:24:06
Modified: jetspeed-api/src/java/org/apache/jetspeed/page
PageManager.java PageNotFoundException.java
jetspeed-api/src/java/org/apache/jetspeed/profiler
Profiler.java
jetspeed-api/src/java/org/apache/jetspeed/om/page Page.java
BaseElement.java
jetspeed-api/src/java/org/apache/jetspeed/om/folder
Folder.java FolderMetaData.java
jetspeed-api/src/java/org/apache/jetspeed/om/common
GenericMetadata.java
Added: jetspeed-api/src/java/org/apache/jetspeed/page/document
FailedToDeleteDocumentException.java
DocumentException.java NodeException.java
DocumentHandler.java DocumentNotFoundException.java
DocumentHandlerFactory.java NodeSet.java
FolderHandler.java
UnsupportedDocumentTypeException.java
DocumentTypeAlreadyRegisteredException.java
FailedToUpdateDocumentException.java Node.java
jetspeed-api/src/java/org/apache/jetspeed/om/page
Document.java Link.java
jetspeed-api/src/java/org/apache/jetspeed/om/folder
InvalidFolderException.java
FolderNotFoundException.java
Removed: jetspeed-api/src/java/org/apache/jetspeed/om/page
PageSet.java
jetspeed-api/src/java/org/apache/jetspeed/om/folder
FolderSet.java ChildNode.java
Log:
see http://nagoya.apache.org/jira/browse/JS2-69#action_39524
Revision Changes Path
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/page/document/FailedToDeleteDocumentException.java
Index: FailedToDeleteDocumentException.java
===================================================================
/*
* Copyright 2000-2001,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.page.document;
/**
* <p>
* FailedToDeleteDocument
* </p>
* <p>
*
* </p>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id: FailedToDeleteDocumentException.java,v 1.1 2004/09/03 13:24:05
weaver Exp $
*
*/
public class FailedToDeleteDocumentException extends DocumentException
{
/**
*
*/
public FailedToDeleteDocumentException()
{
super();
// TODO Auto-generated constructor stub
}
/**
* @param message
*/
public FailedToDeleteDocumentException( String message )
{
super(message);
// TODO Auto-generated constructor stub
}
/**
* @param nested
*/
public FailedToDeleteDocumentException( Throwable nested )
{
super(nested);
// TODO Auto-generated constructor stub
}
/**
* @param msg
* @param nested
*/
public FailedToDeleteDocumentException( String msg, Throwable nested )
{
super(msg, nested);
// TODO Auto-generated constructor stub
}
}
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/page/document/DocumentException.java
Index: DocumentException.java
===================================================================
/*
* Copyright 2000-2001,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.page.document;
/**
* <p>
* DocumentException
* </p>
* <p>
*
* </p>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id: DocumentException.java,v 1.1 2004/09/03 13:24:05 weaver Exp $
*
*/
public class DocumentException extends NodeException
{
/**
*
*/
public DocumentException()
{
super();
// TODO Auto-generated constructor stub
}
/**
* @param message
*/
public DocumentException( String message )
{
super(message);
// TODO Auto-generated constructor stub
}
/**
* @param nested
*/
public DocumentException( Throwable nested )
{
super(nested);
// TODO Auto-generated constructor stub
}
/**
* @param msg
* @param nested
*/
public DocumentException( String msg, Throwable nested )
{
super(msg, nested);
// TODO Auto-generated constructor stub
}
}
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/page/document/NodeException.java
Index: NodeException.java
===================================================================
/*
* Created on Sep 2, 2004
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Generation - Code and Comments
*/
package org.apache.jetspeed.page.document;
import org.apache.jetspeed.exception.JetspeedException;
/**
* <p>
* NodeException
* </p>
* <p>
*
* </p>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id: NodeException.java,v 1.1 2004/09/03 13:24:05 weaver Exp $
*
*/
public class NodeException extends JetspeedException
{
/**
*
*/
public NodeException()
{
super();
// TODO Auto-generated constructor stub
}
/**
* @param message
*/
public NodeException( String message )
{
super(message);
// TODO Auto-generated constructor stub
}
/**
* @param nested
*/
public NodeException( Throwable nested )
{
super(nested);
// TODO Auto-generated constructor stub
}
/**
* @param msg
* @param nested
*/
public NodeException( String msg, Throwable nested )
{
super(msg, nested);
// TODO Auto-generated constructor stub
}
}
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/page/document/DocumentHandler.java
Index: DocumentHandler.java
===================================================================
/*
* Copyright 2000-2001,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.page.document;
import org.apache.jetspeed.om.page.Document;
/**
* <p>
* DocumentHandler
* </p>
* <p>
*
* </p>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id: DocumentHandler.java,v 1.1 2004/09/03 13:24:05 weaver Exp $
*
*/
public interface DocumentHandler
{
Document getDocument(String name) throws DocumentNotFoundException,
NodeException;
Document getDocument(String name, boolean fromCahe) throws
DocumentNotFoundException, NodeException;
void updateDocument(Document document) throws FailedToUpdateDocumentException;
void removeDocument(Document document) throws DocumentNotFoundException,
FailedToDeleteDocumentException;
String getType();
}
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/page/document/DocumentNotFoundException.java
Index: DocumentNotFoundException.java
===================================================================
/*
* Copyright 2000-2001,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.page.document;
/**
* <p>
* DocumentNotFound
* </p>
* <p>
*
* </p>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id: DocumentNotFoundException.java,v 1.1 2004/09/03 13:24:05 weaver Exp
$
*
*/
public class DocumentNotFoundException extends DocumentException
{
/**
*
*/
public DocumentNotFoundException()
{
super();
// TODO Auto-generated constructor stub
}
/**
* @param message
*/
public DocumentNotFoundException( String message )
{
super(message);
// TODO Auto-generated constructor stub
}
/**
* @param nested
*/
public DocumentNotFoundException( Throwable nested )
{
super(nested);
// TODO Auto-generated constructor stub
}
/**
* @param msg
* @param nested
*/
public DocumentNotFoundException( String msg, Throwable nested )
{
super(msg, nested);
// TODO Auto-generated constructor stub
}
}
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/page/document/DocumentHandlerFactory.java
Index: DocumentHandlerFactory.java
===================================================================
/*
* Copyright 2000-2001,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.page.document;
/**
* <p>
* DocumentHandlerFactory
* </p>
* <p>
* Factory for generating <code>DocumentHandlers</code> for specific document types
* </p>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id: DocumentHandlerFactory.java,v 1.1 2004/09/03 13:24:05 weaver Exp $
*
*/
public interface DocumentHandlerFactory
{
/**
*
* <p>
* getDocumentHandler
* </p>
*
* @param documentType document type to retreive a handler for. Examples:
.psml, .link
* @return DocumentHanlder for the <code>documentType</code> indicated. Never
returns <code>null.</code>
* @throws UnsupportedDocumentTypeException If no handler has been registered
for the
* <code>documentType</code> argument.
*/
DocumentHandler getDocumentHandler(String documentType) throws
UnsupportedDocumentTypeException;
/**
*
* <p>
* getDocumentHandlerForPath
* </p>
*
* @param documentPath
* @return
* @throws UnsupportedDocumentTypeException
*/
DocumentHandler getDocumentHandlerForPath( String documentPath) throws
UnsupportedDocumentTypeException;
/**
*
* <p>
* addDocumentHandler
* </p>
*
* @param documentHandler
*/
void registerDocumentHandler(DocumentHandler documentHandler) throws
DocumentTypeAlreadyRegisteredException;
}
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/page/document/NodeSet.java
Index: NodeSet.java
===================================================================
/*
* Copyright 2000-2001,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.page.document;
import java.util.Iterator;
/**
* <p>
* NodeSet
* </p>
* <p>
*
* </p>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id: NodeSet.java,v 1.1 2004/09/03 13:24:05 weaver Exp $
*
*/
public interface NodeSet
{
void add(Node node);
/**
* <p>
* getNode
* </p>
* Returns a Node based on <code>name</code>. <code>name</code>
* can either be the fully quallified path,
<code>folder1/folder2/myPage.psml</code>
* as returned by Node.getPath(), or the page name relative the
<code>Node.getParent().getPath()</code>
* as return by Node.getName()that this DocumentSet was generated for.
*
* @param name
* @return
*/
Node get(String name);
Iterator iterator();
NodeSet subset(String type);
int size();
}
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/page/document/FolderHandler.java
Index: FolderHandler.java
===================================================================
/*
* Copyright 2000-2001,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.page.document;
import org.apache.jetspeed.om.folder.Folder;
import org.apache.jetspeed.om.folder.FolderNotFoundException;
import org.apache.jetspeed.om.folder.InvalidFolderException;
/**
* <p>
* FolderHandler
* </p>
* <p>
*
* </p>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id: FolderHandler.java,v 1.1 2004/09/03 13:24:05 weaver Exp $
*
*/
public interface FolderHandler
{
/**
*
* <p>
* getFolder
* </p>
* <p>
* Locates a folder given using the <code>path</code> argument. This should
behave
* as <code>getFolder("folder/subfolder, true);</code>
* </p>
*
* @param path fully-quallified path to a folder
* @return Folder represented by the <code>path</code> argument. Never returns
<code>null</code>
* @throws DocumentException if there was an error processing the request.
* @throws InvalidFolderException
* @throws NodeException
* @throws DocumentNotFoundException If there is no folder at the
<code>path</code> specified.
*/
Folder getFolder(String path) throws FolderNotFoundException,
InvalidFolderException, NodeException;
/**
*
* <p>
* getFolder
* </p>
* <p>
* Locates a folder given using the <code>path</code> argument.
* </p>
*
* @param path fully-quallified path to a folder
* @param fromCache whether or not to check the cache first before checking the
underlying folder
* repository.
* @return Folder represented by the <code>path</code> argument. Never returns
<code>null</code>
* @throws DocumentException if there was an error processing the request.
* @throws InvalidFolderException
* @throws NodeException
* @throws DocumentNotFoundException If there is no folder at the
<code>path</code> specified.
*/
Folder getFolder(String path, boolean fromCache) throws FolderNotFoundException,
InvalidFolderException, NodeException;
/**
*
* <p>
* getFolders
* </p>
*
* @param path Path from which to locate child folders
* @return NodeSet of sub-folders located under the <code>path</code> argument.
* @throws FolderNotFoundException if folder under the <code>path</code> does
not actually
* exist
* @throws DocumentException if an error is encountered reading the folders.
* @throws InvalidFolderException
* @throws NodeException
*/
NodeSet getFolders( String path ) throws FolderNotFoundException,
InvalidFolderException, NodeException;
/**
*
* <p>
* list
* </p>
* <p>
* generates a list of document names, relative to the <code>folderPath</code>
argument
* of the type indicated by the <code>documentType</code> argument.
* </p>
* @param folderPath folder path to search under
* @param documentType document type to filter on.
* @return a <code>String[]</code> of child document names relative to the
<code>folderPath</code>
* argument and matching the <code>documentType</code> argument.
* @throws FolderNotFoundException if the <code>folderPath</code> does not exsit.
*/
String[] list(String folderPath, String documentType) throws
FolderNotFoundException;
String[] listAll(String folderPath) throws FolderNotFoundException;
}
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/page/document/UnsupportedDocumentTypeException.java
Index: UnsupportedDocumentTypeException.java
===================================================================
/*
* Copyright 2000-2001,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.page.document;
/**
* <p>
* UnsupportedDocumentTypeException
* </p>
* <p>
*
* </p>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id: UnsupportedDocumentTypeException.java,v 1.1 2004/09/03 13:24:05
weaver Exp $
*
*/
public class UnsupportedDocumentTypeException extends DocumentException
{
/**
*
*/
public UnsupportedDocumentTypeException()
{
super();
// TODO Auto-generated constructor stub
}
/**
* @param message
*/
public UnsupportedDocumentTypeException( String message )
{
super(message);
// TODO Auto-generated constructor stub
}
/**
* @param nested
*/
public UnsupportedDocumentTypeException( Throwable nested )
{
super(nested);
// TODO Auto-generated constructor stub
}
/**
* @param msg
* @param nested
*/
public UnsupportedDocumentTypeException( String msg, Throwable nested )
{
super(msg, nested);
// TODO Auto-generated constructor stub
}
}
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/page/document/DocumentTypeAlreadyRegisteredException.java
Index: DocumentTypeAlreadyRegisteredException.java
===================================================================
/*
* Copyright 2000-2001,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.page.document;
/**
* <p>
* DocumentTypeAlreadyRegisteredException
* </p>
* <p>
*
* </p>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id: DocumentTypeAlreadyRegisteredException.java,v 1.1 2004/09/03
13:24:05 weaver Exp $
*
*/
public class DocumentTypeAlreadyRegisteredException extends DocumentException
{
/**
*
*/
public DocumentTypeAlreadyRegisteredException()
{
super();
// TODO Auto-generated constructor stub
}
/**
* @param message
*/
public DocumentTypeAlreadyRegisteredException( String message )
{
super(message);
// TODO Auto-generated constructor stub
}
/**
* @param nested
*/
public DocumentTypeAlreadyRegisteredException( Throwable nested )
{
super(nested);
// TODO Auto-generated constructor stub
}
/**
* @param msg
* @param nested
*/
public DocumentTypeAlreadyRegisteredException( String msg, Throwable nested )
{
super(msg, nested);
// TODO Auto-generated constructor stub
}
}
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/page/document/FailedToUpdateDocumentException.java
Index: FailedToUpdateDocumentException.java
===================================================================
/*
* Copyright 2000-2001,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.page.document;
/**
* <p>
* FailedToUpdateDocumentException
* </p>
* <p>
*
* </p>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id: FailedToUpdateDocumentException.java,v 1.1 2004/09/03 13:24:05
weaver Exp $
*
*/
public class FailedToUpdateDocumentException extends DocumentException
{
/**
*
*/
public FailedToUpdateDocumentException()
{
super();
// TODO Auto-generated constructor stub
}
/**
* @param message
*/
public FailedToUpdateDocumentException( String message )
{
super(message);
// TODO Auto-generated constructor stub
}
/**
* @param nested
*/
public FailedToUpdateDocumentException( Throwable nested )
{
super(nested);
// TODO Auto-generated constructor stub
}
/**
* @param msg
* @param nested
*/
public FailedToUpdateDocumentException( String msg, Throwable nested )
{
super(msg, nested);
// TODO Auto-generated constructor stub
}
}
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/page/document/Node.java
Index: Node.java
===================================================================
/*
* Copyright 2000-2001,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.page.document;
import java.util.Locale;
import org.apache.jetspeed.om.common.GenericMetadata;
import org.apache.jetspeed.om.page.BaseElement;
/**
* <p>
* Node
* </p>
* <p>
*
* </p>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id: Node.java,v 1.1 2004/09/03 13:24:05 weaver Exp $
*
*/
public interface Node extends BaseElement
{
/**
*
* <p>
* getParent
* </p>
*
* @return
*/
Node getParent();
/**
*
* <p>
* setParent
* </p>
*
* @param parent
*/
void setParent(Node parent);
/**
*
* <p>
* getPath
* </p>
*
* @return
*/
String getPath();
/**
*
* <p>
* getName
* </p>
*
* Returns the name of this node relative to
* <code>Node.getParent().getPath()</code>
*
* @return Name, relative to the parent node.
*/
String getName();
/**
*
* <p>
* setPath
* </p>
* Sets the full-qualified path of this node.
*
* @param path
*/
void setPath(String path);
/**
*
* <p>
* getMetadata
* </p>
*
* @return
*/
GenericMetadata getMetadata();
/**
*
* <p>
* getTitle
* </p>
* Returns the title for the specified locale.
*
* @param locale
* @return localized title of this Node.
*/
String getTitle(Locale locale);
/**
*
* <p>
* getType
* </p>
*
* @return
*/
String getType();
/**
*
* <p>
* getUrl
* </p>
*
* @return
*/
String getUrl();
}
1.6 +24 -17
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/page/PageManager.java
Index: PageManager.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/page/PageManager.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- PageManager.java 24 Aug 2004 14:17:05 -0000 1.5
+++ PageManager.java 3 Sep 2004 13:24:05 -0000 1.6
@@ -16,14 +16,18 @@
package org.apache.jetspeed.page;
-import java.io.IOException;
-import java.util.List;
-
import org.apache.jetspeed.exception.JetspeedException;
import org.apache.jetspeed.om.folder.Folder;
+import org.apache.jetspeed.om.folder.FolderNotFoundException;
+import org.apache.jetspeed.om.folder.InvalidFolderException;
import org.apache.jetspeed.om.page.Fragment;
+import org.apache.jetspeed.om.page.Link;
import org.apache.jetspeed.om.page.Page;
import org.apache.jetspeed.om.page.Property;
+import org.apache.jetspeed.page.document.DocumentException;
+import org.apache.jetspeed.page.document.DocumentNotFoundException;
+import org.apache.jetspeed.page.document.NodeException;
+import org.apache.jetspeed.page.document.UnsupportedDocumentTypeException;
import org.apache.jetspeed.profiler.ProfileLocator;
/**
@@ -36,7 +40,7 @@
{
/** The name of the service */
public String SERVICE_NAME = "PageManager";
- static final String PAGE_SUFFIX = ".psml";
+
/**
* Creates a new empty Page instance
@@ -69,8 +73,11 @@
*
* @param locator The locator descriptor of the document to be retrieved.
* @throws PageNotFoundException if the page cannot be found
+ * @throws NodeException
*/
- public Page getPage(String id) throws PageNotFoundException;
+ public Page getPage(String id) throws PageNotFoundException, NodeException;
+
+ public Link getLink(String name) throws DocumentNotFoundException,
UnsupportedDocumentTypeException, FolderNotFoundException, NodeException;
/**
*
@@ -81,8 +88,12 @@
* @param folderPath
* @return <code>Folder</code> object represented by the
<code>folderPath</code> or
* <code>null</code> if no such folder exists.
+ * @throws DocumentException
+ * @throws FolderNotFoundException
+ * @throws NodeException
+ * @throws InvalidFolderException
*/
- Folder getFolder(String folderPath) throws IOException;
+ Folder getFolder(String folderPath) throws FolderNotFoundException,
InvalidFolderException, NodeException;
/**
*
@@ -93,16 +104,10 @@
* @param locator
* @return
* @throws PageNotFoundException if the page cannot be found.
+ * @throws DocumentException
+ * @throws NodeException
*/
- public Page getPage(ProfileLocator locator) throws PageNotFoundException;
-
- /** Query for a collection of profiles given a profile locator criteria.
- *
- * @param locator The profile locator criteria.
- *
- * @return A collection of profiles that match the criteria specified in the
locator.
- */
- public List listPages();
+ public Page getPage(ProfileLocator locator) throws PageNotFoundException,
DocumentException, NodeException;
/** Store the PSML document on disk, using its locator
*
@@ -120,8 +125,10 @@
/** Remove a document.
*
* @param locator The description of the profile to be removed.
+ * @throws UnsupportedDocumentTypeException
+ * @throws FailedToDeleteDocumentException
+ * @throws DocumentNotFoundException
*/
- public void removePage(Page page) throws PageNotRemovedException;
}
1.2 +4 -3
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/page/PageNotFoundException.java
Index: PageNotFoundException.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/page/PageNotFoundException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PageNotFoundException.java 21 Jul 2004 13:38:21 -0000 1.1
+++ PageNotFoundException.java 3 Sep 2004 13:24:05 -0000 1.2
@@ -15,7 +15,8 @@
*/
package org.apache.jetspeed.page;
-import org.apache.jetspeed.exception.JetspeedException;
+import org.apache.jetspeed.page.document.DocumentNotFoundException;
+
/**
* <p>
@@ -28,7 +29,7 @@
* @version $Id$
*
*/
-public class PageNotFoundException extends JetspeedException
+public class PageNotFoundException extends DocumentNotFoundException
{
/**
1.3 +4 -2
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/profiler/Profiler.java
Index: Profiler.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/profiler/Profiler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Profiler.java 21 Jul 2004 13:38:21 -0000 1.2
+++ Profiler.java 3 Sep 2004 13:24:05 -0000 1.3
@@ -22,6 +22,7 @@
import org.apache.jetspeed.om.page.Fragment;
import org.apache.jetspeed.om.page.Page;
import org.apache.jetspeed.page.PageNotFoundException;
+import org.apache.jetspeed.page.document.NodeException;
import org.apache.jetspeed.profiler.rules.ProfilingRule;
import org.apache.jetspeed.request.RequestContext;
@@ -78,8 +79,9 @@
* @param locator
* @return
* @throws PageNotFoundException
+ * @throws NodeException
*/
- Page getPage(ProfileLocator locator) throws PageNotFoundException;
+ Page getPage(ProfileLocator locator) throws PageNotFoundException,
NodeException;
/**
* @param locator
1.4 +3 -20
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/page/Page.java
Index: Page.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/page/Page.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Page.java 24 Aug 2004 21:33:57 -0000 1.3
+++ Page.java 3 Sep 2004 13:24:05 -0000 1.4
@@ -15,10 +15,6 @@
*/
package org.apache.jetspeed.om.page;
-import java.util.Locale;
-
-import org.apache.jetspeed.om.common.GenericMetadata;
-import org.apache.jetspeed.om.folder.ChildNode;
/**
* This interface represents a complete page document used by Jetspeed
@@ -26,23 +22,10 @@
*
* @version $Id$
*/
-public interface Page extends BaseElement, java.io.Serializable, Cloneable,
ChildNode
+public interface Page extends Document, java.io.Serializable, Cloneable
{
+ String DOCUMENT_TYPE = ".psml";
- /**
- *
- * <p>
- * getTitle
- * </p>
- *
- * @param locale
- * @return Title for the specified Locale
- */
- String getTitle(Locale locale);
-
- public GenericMetadata getMetadata();
-
- public void setMetadata(GenericMetadata metadata);
/**
* Returns the name of the default skin that applies to this
1.2 +4 -21
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/page/BaseElement.java
Index: BaseElement.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/page/BaseElement.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BaseElement.java 28 May 2004 18:51:56 -0000 1.1
+++ BaseElement.java 3 Sep 2004 13:24:05 -0000 1.2
@@ -15,13 +15,15 @@
*/
package org.apache.jetspeed.om.page;
+import org.apache.jetspeed.om.common.SecuredResource;
+
/**
* BaseElement
*
* @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
* @version $Id$
*/
-public interface BaseElement
+public interface BaseElement extends SecuredResource
{
/**
* Returns the unique Id of this element. This id is guaranteed to be unique
@@ -53,24 +55,5 @@
*/
public void setTitle(String title);
- /**
- * Returns the name of the default ACL that applies to this
- * element. This name should reference an entry in the Securtiy
- * registry
- *
- * @return the page default acl
- */
- public String getAcl();
-
- /**
- * Modifies the default ACL for this element.
- * This new acl must reference an entry in the Security
- * registry.
- * Additionnally, replacing the default ACL will not affect any
- * children fragments with their own specific ACLs
- *
- * @param aclName the name of the new ACL for the element
- */
- public void setAcl(String aclName);
}
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/page/Document.java
Index: Document.java
===================================================================
/*
* Copyright 2000-2001,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.om.page;
import org.apache.jetspeed.page.document.Node;
/**
* <p>
* Document
* </p>
* <p>
*
* </p>
*
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver </a>
* @version $Id: Document.java,v 1.1 2004/09/03 13:24:05 weaver Exp $
*
*/
public interface Document extends Node
{
}
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/page/Link.java
Index: Link.java
===================================================================
/*
* Copyright 2000-2001,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.om.page;
/**
* <p>
* Link
* </p>
* <p>
*
* </p>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id: Link.java,v 1.1 2004/09/03 13:24:05 weaver Exp $
*
*/
public interface Link extends Document
{
String DOCUMENT_TYPE = ".link";
/**
* @return Returns the target.
*/
String getTarget();
/**
* @param target The target to set.
*/
void setTarget( String target );
}
1.5 +76 -24
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/folder/Folder.java
Index: Folder.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/folder/Folder.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Folder.java 24 Aug 2004 14:16:48 -0000 1.4
+++ Folder.java 3 Sep 2004 13:24:05 -0000 1.5
@@ -15,12 +15,13 @@
*/
package org.apache.jetspeed.om.folder;
-import java.io.IOException;
-import org.apache.jetspeed.om.common.SecuredResource;
import org.apache.jetspeed.om.page.Page;
-import org.apache.jetspeed.om.page.PageSet;
import org.apache.jetspeed.page.PageNotFoundException;
+import org.apache.jetspeed.page.document.DocumentException;
+import org.apache.jetspeed.page.document.Node;
+import org.apache.jetspeed.page.document.NodeException;
+import org.apache.jetspeed.page.document.NodeSet;
/**
* Folder
@@ -29,33 +30,62 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Jeremy Ford</a>
* @version $Id$
*/
-public interface Folder extends SecuredResource, ChildNode
+public interface Folder extends Node
{
+ String FOLDER_TYPE = "folder";
+
/**
- * Gets the unique name of this desktop
*
- * @return The unique name of the desktop
+ * <p>
+ * getDefaultPage
+ * </p>
+ *
+ * @return A String representing the default psml page for this folder
*/
- String getName();
+ String getDefaultPage();
/**
- * Sets the unique name of this desktop
*
- * @param name The name of the desktop
+ * <p>
+ * setDefaultPage
+ * </p>
+ *
+ * @param defaultPage
*/
- void setName(String name);
-
- String getDefaultPage();
-
void setDefaultPage(String defaultPage);
+ /**
+ *
+ * <p>
+ * getDefaultTheme
+ * </p>
+ *
+ * @return A String representing the default theme for this Folder
+ */
String getDefaultTheme();
+ /**
+ *
+ * <p>
+ * setDefaultTheme
+ * </p>
+ *
+ * @param defaultTheme
+ */
void setDefaultTheme(String defaultTheme);
- FolderSet getFolders() throws IOException;
-
- void setFolders(FolderSet folders);
+ /**
+ *
+ * <p>
+ * getFolders
+ * </p>
+ *
+ * @return A <code>NodeSet</code> containing all sub-folders directly under
+ * this folder.
+ * @throws FolderNotFoundException
+ * @throws DocumentException
+ */
+ NodeSet getFolders() throws FolderNotFoundException, DocumentException;
/**
*
@@ -63,15 +93,13 @@
* getPages
* </p>
*
- * @return PageSet of all the Pages referenced by this Folder.
+ * @return NodeSet of all the Pages referenced by this Folder.
+ * @throws NodeException
* @throws PageNotFoundException if any of the Pages referenced by this Folder
* could not be found.
*/
- PageSet getPages() throws PageNotFoundException;
-
- void setPages(PageSet pages);
+ NodeSet getPages() throws NodeException;
-
/**
*
* <p>
@@ -80,8 +108,32 @@
*
* @param name
. * @throws PageNotFoundException if the Page requested could not be found.
+ * @throws DocumentException
+ * @throws NodeException
*/
- Page getPage(String name) throws PageNotFoundException;
+ Page getPage(String name) throws PageNotFoundException, NodeException;
- FolderMetaData getMetaData();
+ /**
+ *
+ * <p>
+ * getLinks
+ * </p>
+ *
+ * @return
+ * @throws DocumentException
+ * @throws NodeException
+ */
+ NodeSet getLinks() throws NodeException;
+
+ /**
+ *
+ * <p>
+ * getAllNodes
+ * </p>
+ *
+ * @return All Nodes immediatley under this Folder.
+ * @throws DocumentException
+ * @throws FolderNotFoundException
+ */
+ NodeSet getAllNodes() throws FolderNotFoundException, DocumentException;
}
1.2 +9 -5
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/folder/FolderMetaData.java
Index: FolderMetaData.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/folder/FolderMetaData.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FolderMetaData.java 24 Aug 2004 14:16:48 -0000 1.1
+++ FolderMetaData.java 3 Sep 2004 13:24:05 -0000 1.2
@@ -15,7 +15,9 @@
*/
package org.apache.jetspeed.om.folder;
-import java.util.Locale;
+import java.util.Vector;
+
+import org.apache.jetspeed.om.page.Document;
/**
* <p>
@@ -28,10 +30,12 @@
* @version $Id$
*
*/
-public interface FolderMetaData
+public interface FolderMetaData extends Document
{
- String getTitle();
+ String DOCUMENT_TYPE = "folder.metadata";
+
+ Vector getDocumentOrder();
- String getTitle(Locale locale);
+ void setDocumentOrder(Vector docIndexes);
}
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/folder/InvalidFolderException.java
Index: InvalidFolderException.java
===================================================================
/*
* Copyright 2000-2001,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.om.folder;
import org.apache.jetspeed.page.document.NodeException;
/**
* <p>
* InvalidFolderException
* </p>
* <p>
* Thrown when there is an attempt to represent a node as folder when
* it is actually not a folder.
* </p>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id: InvalidFolderException.java,v 1.1 2004/09/03 13:24:05 weaver Exp $
*
*/
public class InvalidFolderException extends NodeException
{
/**
*
*/
public InvalidFolderException()
{
super();
// TODO Auto-generated constructor stub
}
/**
* @param message
*/
public InvalidFolderException( String message )
{
super(message);
// TODO Auto-generated constructor stub
}
/**
* @param nested
*/
public InvalidFolderException( Throwable nested )
{
super(nested);
// TODO Auto-generated constructor stub
}
/**
* @param msg
* @param nested
*/
public InvalidFolderException( String msg, Throwable nested )
{
super(msg, nested);
// TODO Auto-generated constructor stub
}
}
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/folder/FolderNotFoundException.java
Index: FolderNotFoundException.java
===================================================================
/*
* Copyright 2000-2001,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.om.folder;
import org.apache.jetspeed.page.document.NodeException;
/**
* <p>
* FolderNotFoundException
* </p>
* <p>
*
* </p>
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id: FolderNotFoundException.java,v 1.1 2004/09/03 13:24:05 weaver Exp $
*
*/
public class FolderNotFoundException extends NodeException
{
/**
*
*/
public FolderNotFoundException()
{
super();
// TODO Auto-generated constructor stub
}
/**
* @param message
*/
public FolderNotFoundException( String message )
{
super(message);
// TODO Auto-generated constructor stub
}
/**
* @param nested
*/
public FolderNotFoundException( Throwable nested )
{
super(nested);
// TODO Auto-generated constructor stub
}
/**
* @param msg
* @param nested
*/
public FolderNotFoundException( String msg, Throwable nested )
{
super(msg, nested);
// TODO Auto-generated constructor stub
}
}
1.2 +75 -13
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/common/GenericMetadata.java
Index: GenericMetadata.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/common/GenericMetadata.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- GenericMetadata.java 5 Jun 2004 05:10:16 -0000 1.1
+++ GenericMetadata.java 3 Sep 2004 13:24:06 -0000 1.2
@@ -18,22 +18,84 @@
import java.util.Locale;
/**
- * GenericMetadata
- * <br/>
- * Interface that allows retrieving localized information
+ * GenericMetadata <br/>Interface that allows retrieving localized information
*
- * @author <a href="mailto:[EMAIL PROTECTED]">Jeremy Ford</a>
+ * @author <a href="mailto:[EMAIL PROTECTED]">Jeremy Ford </a>
* @version $Id$
*/
-public interface GenericMetadata {
-
- public void addField(Locale locale, String name, String value);
- public void addField(LocalizedField field);
- public Collection getFields(String name);
- public void setFields(String name, Collection values);
+public interface GenericMetadata
+{
+ /**
+ *
+ * <p>
+ * addField
+ * </p>
+ *
+ * @param locale
+ * @param name
+ * @param value
+ */
+ public void addField( Locale locale, String name, String value );
+ /**
+ *
+ * <p>
+ * addField
+ * </p>
+ *
+ * @param field
+ */
+ public void addField( LocalizedField field );
+
+ /**
+ *
+ * <p>
+ * getFields
+ * </p>
+ *
+ * @param name
+ * @return
+ */
+ public Collection getFields( String name );
+
+ /**
+ *
+ * <p>
+ * setFields
+ * </p>
+ *
+ * @param name
+ * @param values
+ */
+ public void setFields( String name, Collection values );
+
+ /**
+ *
+ * <p>
+ * getFields
+ * </p>
+ *
+ * @return
+ */
public Collection getFields();
- public void setFields(Collection fields);
+ /**
+ *
+ * <p>
+ * setFields
+ * </p>
+ *
+ * @param fields
+ */
+ public void setFields( Collection fields );
+
+ /**
+ *
+ * <p>
+ * createLocalizedField
+ * </p>
+ *
+ * @return
+ */
LocalizedField createLocalizedField();
-}
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]