Return-Path: Delivered-To: apmail-portals-jetspeed-dev-archive@www.apache.org Received: (qmail 53369 invoked from network); 27 Jan 2010 23:31:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Jan 2010 23:31:08 -0000 Received: (qmail 42062 invoked by uid 500); 27 Jan 2010 23:31:08 -0000 Delivered-To: apmail-portals-jetspeed-dev-archive@portals.apache.org Received: (qmail 42016 invoked by uid 500); 27 Jan 2010 23:31:07 -0000 Mailing-List: contact jetspeed-dev-help@portals.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jetspeed Developers List" Delivered-To: mailing list jetspeed-dev@portals.apache.org Received: (qmail 42005 invoked by uid 99); 27 Jan 2010 23:31:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jan 2010 23:31:07 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jan 2010 23:31:06 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2A55C2388906; Wed, 27 Jan 2010 23:30:46 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: 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... Date: Wed, 27 Jan 2010 23:30:45 -0000 To: jetspeed-dev@portals.apache.org From: taylor@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100127233046.2A55C2388906@eris.apache.org> 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 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 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 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 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 listLinks(Space space); - List listSpaces(); - List 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 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 +{ + /** + *

Default Constructor.

+ */ + public SpacesException() + { + super(); + } + + /** + *

Constructor with exception message.

+ * @param message The exception message. + */ + public SpacesException(String message) + { + super(message); + } + + /** + *

Constructor with nested exception.

+ * @param nested Nested exception. + */ + public SpacesException(Throwable nested) + { + super(nested); + } + + /** + *

Constructor with exception message and nested exception.

+ * @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 @@ - + --------------------------------------------------------------------- To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org For additional commands, e-mail: jetspeed-dev-help@portals.apache.org