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 2006/01/22 06:35:52 UTC
svn commit: r371204 - in
/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed:
administration/AdministrationEmailException.java
administration/PortalAdministration.java
administration/RegistrationException.java page/PageManager.java
Author: taylor
Date: Sat Jan 21 21:35:50 2006
New Revision: 371204
URL: http://svn.apache.org/viewcvs?rev=371204&view=rev
Log:
http://issues.apache.org/jira/browse/JS2-476
Create user pages from a user's roles
API changes to PageManager
new API: createUserHomePagesFromRoles
public Page getUserPage(String userName, String pageName)
throws PageNotFoundException, NodeException;
public Folder getUserFolder(String userName)
throws FolderNotFoundException, InvalidFolderException, NodeException;
public boolean folderExists(String folderName);
public boolean pageExists(String pageName);
public boolean linkExists(String linkName);
public boolean userFolderExists(String userName);
public boolean userPageExists(String userName, String pageName);
I don;t have a use case for it, but i could also see deepMergeFolder being a public api
Modified:
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/administration/AdministrationEmailException.java
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/administration/PortalAdministration.java
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/administration/RegistrationException.java
portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/page/PageManager.java
Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/administration/AdministrationEmailException.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/administration/AdministrationEmailException.java?rev=371204&r1=371203&r2=371204&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/administration/AdministrationEmailException.java (original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/administration/AdministrationEmailException.java Sat Jan 21 21:35:50 2006
@@ -26,41 +26,33 @@
*/
public class AdministrationEmailException extends JetspeedException
{
-
public AdministrationEmailException()
{
super();
- // TODO Auto-generated constructor stub
}
public AdministrationEmailException(KeyedMessage keyedMessage, Throwable nested)
{
super(keyedMessage, nested);
- // TODO Auto-generated constructor stub
}
public AdministrationEmailException(KeyedMessage typedMessage)
{
super(typedMessage);
- // TODO Auto-generated constructor stub
}
public AdministrationEmailException(String msg, Throwable nested)
{
super(msg, nested);
- // TODO Auto-generated constructor stub
}
public AdministrationEmailException(String message)
{
super(message);
- // TODO Auto-generated constructor stub
}
public AdministrationEmailException(Throwable nested)
{
super(nested);
- // TODO Auto-generated constructor stub
}
-
}
Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/administration/PortalAdministration.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/administration/PortalAdministration.java?rev=371204&r1=371203&r2=371204&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/administration/PortalAdministration.java (original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/administration/PortalAdministration.java Sat Jan 21 21:35:50 2006
@@ -15,12 +15,14 @@
*/
package org.apache.jetspeed.administration;
+import java.security.Principal;
import java.util.List;
import java.util.Map;
import javax.portlet.PortletConfig;
import javax.portlet.PortletRequest;
import javax.portlet.PortletResponse;
+import javax.security.auth.Subject;
import org.apache.jetspeed.security.User;
@@ -139,6 +141,6 @@
* @param guid the ID which will be removed from the storage when the info is no longer valid
*/
public void removeNewLoginInfo(String guid);
-
+
}
Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/administration/RegistrationException.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/administration/RegistrationException.java?rev=371204&r1=371203&r2=371204&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/administration/RegistrationException.java (original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/administration/RegistrationException.java Sat Jan 21 21:35:50 2006
@@ -26,41 +26,33 @@
*/
public class RegistrationException extends JetspeedException
{
-
public RegistrationException()
{
super();
- // TODO Auto-generated constructor stub
}
public RegistrationException(KeyedMessage keyedMessage, Throwable nested)
{
super(keyedMessage, nested);
- // TODO Auto-generated constructor stub
}
public RegistrationException(KeyedMessage typedMessage)
{
super(typedMessage);
- // TODO Auto-generated constructor stub
}
public RegistrationException(String msg, Throwable nested)
{
super(msg, nested);
- // TODO Auto-generated constructor stub
}
public RegistrationException(String message)
{
super(message);
- // TODO Auto-generated constructor stub
}
public RegistrationException(Throwable nested)
{
super(nested);
- // TODO Auto-generated constructor stub
}
-
}
Modified: portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/page/PageManager.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/page/PageManager.java?rev=371204&r1=371203&r2=371204&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/page/PageManager.java (original)
+++ portals/jetspeed-2/trunk/jetspeed-api/src/java/org/apache/jetspeed/page/PageManager.java Sat Jan 21 21:35:50 2006
@@ -16,6 +16,8 @@
package org.apache.jetspeed.page;
+import javax.security.auth.Subject;
+
import org.apache.jetspeed.exception.JetspeedException;
import org.apache.jetspeed.om.common.SecurityConstraint;
import org.apache.jetspeed.om.common.SecurityConstraints;
@@ -446,5 +448,79 @@
*/
public void deepCopyFolder(Folder srcFolder, String destinationPath, String owner)
throws JetspeedException, PageNotUpdatedException;
+
+ /**
+ * Retrieve a page for the given user name and page name
+ *
+ * @param userName
+ * @param pageName
+ * @return
+ * @throws PageNotFoundException
+ * @throws NodeException
+ */
+ public Page getUserPage(String userName, String pageName)
+ throws PageNotFoundException, NodeException;
+
+ /**
+ * Retrieve a user's folder
+ *
+ * @param userName
+ * @return
+ * @throws FolderNotFoundException
+ * @throws InvalidFolderException
+ * @throws NodeException
+ */
+ public Folder getUserFolder(String userName)
+ throws FolderNotFoundException, InvalidFolderException, NodeException;
+
+ /**
+ * Check if a folder exists for the given folder name
+ *
+ * @param folderName
+ * @return
+ */
+ public boolean folderExists(String folderName);
+
+ /**
+ * Check if a page exists for the given page name
+ *
+ * @param pageName
+ * @return
+ */
+ public boolean pageExists(String pageName);
+
+ /**
+ * Check if a link exists for the given link name
+ *
+ * @param linkName
+ * @return
+ */
+ public boolean linkExists(String linkName);
+
+ /**
+ * Check if the root folder exists for a given user
+ *
+ * @param userName
+ * @return
+ */
+ public boolean userFolderExists(String userName);
+ /**
+ * Check if a page exists for the given user
+ *
+ * @param userName
+ * @param pageName
+ * @return
+ */
+ public boolean userPageExists(String userName, String pageName);
+
+ /**
+ * Creates a user's home page from the roles of the current user.
+ * The use case: when a portal is setup to use shared pages, but then
+ * the user attempts to customize. At this point, we create the new page(s) for the user.
+ *
+ * @param subject The full user Java Security subject.
+ */
+ public void createUserHomePagesFromRoles(Subject subject)
+ throws JetspeedException;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org