You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2010/01/28 00:30:45 UTC

svn commit: r903904 [2/2] - in /portals/jetspeed-2/portal/trunk: applications/jetspeed/src/main/webapp/WEB-INF/min-pages/ applications/jetspeed/src/main/webapp/WEB-INF/min-pages/Administrative/security/ applications/jetspeed/src/main/webapp/WEB-INF/min...

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Spaces.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Spaces.java?rev=903904&r1=903903&r2=903904&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Spaces.java (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/Spaces.java Wed Jan 27 23:30:43 2010
@@ -18,6 +18,7 @@
 
 import java.util.List;
 
+import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.page.Link;
 import org.apache.jetspeed.om.page.Page;
 
@@ -29,15 +30,170 @@
  */
 public interface Spaces
 {
+	public static final String ENVIRONMENTS_LOCATION = "/_environments/";	
+	public static final String DEFAULT_ENVIRONMENT = "default-environment";
+	public static final String DEFAULT_SPACE = "default-space";
+	
+	/**
+	 * List all environments in the portal
+	 * 
+	 * @return a list of zero or more environment objects
+	 */
     List<Environment> listEnvironments();
-    Environment addEnvironment(Environment env);
-    void removeEnvironment(Environment env);    
+    
+    /**
+     * Creates an environment object and persists it
+     * 
+     * @param envName the unique name of the environment to create
+     * @return a new environment object, not yet persisted
+     * @throws a SpacesException in case the object could not be persisted
+     */
+    Environment createEnvironment(String envName, String owner) throws SpacesException;
+    
+    /**
+     * Store an environment to the portal
+     * 
+     * @param env the environment object to be persisted
+     * @throws a SpacesException in case the object could not be persisted
+     */
+    void storeEnvironment(Environment env) throws SpacesException;
+    
+    /**
+     * Deletes an environment object given the unique key envName from the persistence store
+     * 
+     * @param env the environment object to delete
+     * @throws a SpacesException in case the object could not be deleted
+     */
+    void deleteEnvironment(Environment env) throws SpacesException;
+
+    /**
+     * Looks up an environment object given the unique key envName from the persistence store
+     * 
+     * @param envName the unique name of the environment object to lookup
+     * @return the found environment object from the persistent store, or null if not found
+     */
+    Environment lookupEnvironment(String envName);
+    
+    
+    /**
+     * Lists all unique spaces in the portal, regardless of environment
+     *  
+     * @return the list of all spaces in the portal 
+     */
+    List<Space> listSpaces();
+    
+    /**
+     * Lists all spaces for a given environment
+     * 
+     * @param envName filter the space list result by the envName 
+     * @return a list of spaces for the given environment name
+     */
+    List<Space> listSpaces(String envName);
+
+    /**
+     * Setup and create a new space folder area
+     * 
+     * @param spaceName the name of the space to create (not the path to the space)
+     * @param templateFolder the template to use to create the space folder from
+     * @param owner the owner (user) of the space
+     * @return a newly created space representing the space folder
+     * @throws a SpacesException in case the object could not be persisted
+     */
+    Space createSpace(String spaceName, Folder templateFolder, String owner) throws SpacesException;
+
+    /**
+     * Creates a space without a template
+     * 
+     * @param spaceName the name of the space to create (not the path to the space)
+     * @param owner the owner (user) of the space
+     * @return a newly created space representing the space folder
+     * @throws a SpacesException in case the object could not be persisted
+     */
+    Space createSpace(String spaceName, String owner)  throws SpacesException;
+    
+    /**
+     * Stores a space to the portal
+     * 
+     * @param space the space object to be persisted
+     * @return the space object with any updated persistence state
+     * @throws a SpacesException in case the object could not be persisted
+     */
+    void storeSpace(Space space) throws SpacesException;
+        
+    /**
+     * Deletes a space object given the unique key spaceName from the persistence store
+     * 
+     * @param space the space object to delete
+     * @throws a SpacesException in case the object could not be deleted
+     */
+    void deleteSpace(Space space) throws SpacesException;
+
+    /**
+     * Looks up a space object given the unique key spaceName from the persistence store
+     * 
+     * @param spaceName the unique name of the space object to lookup
+     * @return the found space object from the persistent store, or null if not found
+     */
+    Space lookupSpace(String spaceName);
+    
+    /**
+     * Adds a space to the list of spaces for the given environment
+     * A space can exist in zero or more environments
+     * 
+     * @param space
+     * @param env
+     * @throws a SpacesException in case the object could not be added
+     */
+    void addSpaceToEnvironment(Space space, Environment env) throws SpacesException;
+
+    /**
+     * Removes a space from the list of spaces for the given environment
+     * 
+     * @param space
+     * @param env
+     * @throws a SpacesException in case the object could not be added
+     */
+    void removeSpaceFromEnvironment(Space space, Environment env) throws SpacesException;
+
+    /**
+     * Determines if a space is a member of the set of spaces for a given environment
+     * @param space
+     * @param env
+     * @return true if the space is a member of the environment, false if it is not
+     */
+    boolean isSpaceInEnvironment(Space space, Environment env);
+        
+    /**
+     * Deletes a page 
+     * 
+     * @param page the page to be deleted
+     * @throws a SpacesException in case the object could not be deleted
+     */
+    void deletePage(Page page) throws SpacesException;
+    
+    /**
+     * List all pages in the given space
+     *  
+     * @param space the space to filter the set of pages by
+     * @return a list of zero or more page objects found in the given space
+     */
     List<Page> listPages(Space space);
+    
+    /**
+     * List all links in the given space
+     *  
+     * @param space the space to filter the set of links by
+     * @return a list of zero or more links objects found in the given space
+     */
     List<Link> listLinks(Space space);
-    List<Space> listSpaces();    
-    List<Space> listSpaces(Environment env);    
-    Space addSpace(Environment env, Space space);
-    void removeSpace(Environment env, Space space);
-    Space addPage(Space space, Page page);
-    void removePage(Space space, Page page);
+
+    /**
+     * List all folders in the given space
+     *  
+     * @param space the space to filter the set of folders by
+     * @return a list of zero or more folder objects found in the given space
+     */
+    List<Folder> listFolders(Space space);
+
+    
 }

Added: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/SpacesException.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/SpacesException.java?rev=903904&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/SpacesException.java (added)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/spaces/SpacesException.java Wed Jan 27 23:30:43 2010
@@ -0,0 +1,60 @@
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.spaces;
+
+import org.apache.jetspeed.exception.JetspeedException;
+
+public class SpacesException extends JetspeedException 
+{ 
+   /**
+    * <p>Default Constructor.</p>
+    */
+   public SpacesException()
+   {
+       super();
+   }
+
+   /**
+    * <p>Constructor with exception message.</p>
+    * @param message The exception message.
+    */
+   public SpacesException(String message)
+   {
+       super(message);
+   }
+
+   /**
+    * <p>Constructor with nested exception.</p>
+    * @param nested Nested exception.
+    */
+   public SpacesException(Throwable nested)
+   {
+       super(nested);
+   }
+
+   /**
+    * <p>Constructor with exception message and nested exception.</p>
+    * @param msg The exception message.
+    * @param nested Nested exception.
+    */
+   public SpacesException(String msg, Throwable nested)
+   {
+       super(msg, nested);
+   }
+}
+

Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties?rev=903904&r1=903903&r2=903904&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties Wed Jan 27 23:30:43 2010
@@ -283,7 +283,7 @@
 # default page name (currently handled by PM)
 psml.page.default = default-page.psml    
 # PSML Folder Template to copy during new user creation and registration
-psml.template.folder = /_user/template/
+psml.template.folder = /_template/new-user/
 # default path to (XML) PSML pages root folder
 psml.pages.path = ${applicationRoot}/WEB-INF/pages
 

Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/seed/j2-seed.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/seed/j2-seed.xml?rev=903904&r1=903903&r2=903904&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/seed/j2-seed.xml (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/seed/j2-seed.xml Wed Jan 27 23:30:43 2010
@@ -400,7 +400,7 @@
 				<Rule locator="page" rule="subsite-by-hostname"/>
 			</Rules>
 		</User>
-	<User name="tomcat" userTemplate='/_user/template/' subsite='_hostname/localhost'>
+	<User name="tomcat" userTemplate='/_template/new-user/' subsite='_hostname/localhost'>
 			<credentials password="tomcat" enabled="TRUE" requiresUpdate="FALSE"/>
 			<roles></roles>
 			<groups></groups>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org