を実行して、PALポータルを起動してください。起動後、http://localhost:8080/palportal にアクセスして、PALポータルのトップページが表示されることを確認してください。
PALポータルのアンインストールは、インストールしたディレクトリを削除するだけで完了します。
端末エミュレータ上で
+
PALポータルのアンインストールは、インストールしたディレクトリを削除するだけで完了します。
DOS窓上などで
+
pom.xml は、Maven 2 のプロジェクトファイルです。
そして、それ以外のファイルが、ポートレットを構築・実行する上で必要になるファイルになります。
@@ -66,6 +70,7 @@
ポートレット用にビルドするために、依存関係に portlet-api を指定しておけば、ポートレットを作成することができます。
今回の helloworld ポートレットでは、ビューに JSP を利用して、JSTL を利用しているので、それに必要な依存関係を追加します。
もし、独自にポートレットを作成する場合には、必要なライブラリがあれば、追加してください。
+
@@ -380,6 +387,7 @@
ビルド方法は、非常に簡単です。
ここでは、Maven 2 を実行できる環境が用意済みであることを想定しています。
Maven 2 のインストール方法については、http://maven.apache.org/ を参照してください。
+
+
通常の Maven 2 のビルドと同様、mvn install を実行します。
このことからも、基本的には、普通の Web アプリケーションと同じであることがわかると思います。
ビルドに成功していると、target ディレクトリの下に helloworld.war が作成されます。
+
-
これで、JSR 168 に準拠しているポートレットを作成できたことになります。
これを、JSR 168 に準拠しているポータルサーバー上に持っていき、そのポータルサーバーの配備手順に従って、配備すれば、動作させることができます。
Modified: pal-portal/trunk/docs/ja/portlet-developers-guide/xdocs/guide-teeda-based-portlet.xml
===================================================================
--- pal-portal/trunk/docs/ja/portlet-developers-guide/xdocs/guide-teeda-based-portlet.xml 2007-05-31 21:00:49 UTC (rev 170)
+++ pal-portal/trunk/docs/ja/portlet-developers-guide/xdocs/guide-teeda-based-portlet.xml 2007-05-31 21:05:51 UTC (rev 171)
@@ -55,6 +55,7 @@
次に、portlet.xml ですが、これは JSR 168 で定義されているポートレット配備子です。 ポータルサーバー上に表示するポートレットの情報を記述します。 たとえば、以下のような内容をこのファイルに記述します。
+
+
まず、portlet-name 要素の値には、ポータルにより利用される一意なポートレット名が入ります。 display-name 要素の値はポータルにより表示される(たとえば、ユーザーがポートレット一覧からポートレットを選択するときなど)ポートレットの名前で、次の description 要素の値がその説明になります。 portlet-class 要素と init-param 要素にある portlet-class および portlet-filters は変更する必要はありません。 init-param 要素の view-page の値は、表示モードでアクセスされたときにデフォルトで表示されるページのパスを記述します(編集モードで表示するページは、edit-page で指定します)。ポートレットで表示されるポートレットには、表示モードや編集モードなどいくつかのモードがあり、たとえば、ポートレットの小窓の右上にある編集ボタンを押すと、編集モードが呼ばれます。 サポートされるポートレットモードは、supports 要素の portlet-mode 要素としてサポートするモードを指定できます。あとは、potlet-info 要素の title、short-title、keywords 要素を変更してください。 title 要素はポートレットの小窓のバーなどに表示されるタイトルで、short-title はその短いタイトルで、ポータルがモバイル環境で表示されるときに短いタイトルが必要なときに表示されます。 keywords 要素は、そのポートレットのキーワードで , 区切りで複数指定できます。 ポータルのポートレット一覧で検索するときなどに利用されます。必要な場所を変更して、portlet.xml として、WEB-INF の下に保存してください(他にもいろいろな要素がありますが、必要に応じて、追加してください)。
From svnnotify @ sourceforge.jp Fri Jun 1 17:04:47 2007
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Fri, 1 Jun 2007 17:04:47 +0900
Subject: [pal-cvs 2440] [172] sync up with j2.
Message-ID: <20070601080447.2B1362AC024@users.sourceforge.jp>
Revision: 172
http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=172
Author: shinsuke
Date: 2007-06-01 17:04:46 +0900 (Fri, 01 Jun 2007)
Log Message:
-----------
sync up with j2. you might need to build portal bridge or remove RC jar files before building j2..
Modified Paths:
--------------
pal-portal/trunk/build.properties
-------------- next part --------------
Modified: pal-portal/trunk/build.properties
===================================================================
--- pal-portal/trunk/build.properties 2007-05-31 21:05:51 UTC (rev 171)
+++ pal-portal/trunk/build.properties 2007-06-01 08:04:46 UTC (rev 172)
@@ -63,7 +63,7 @@
org.apache.jetspeed.portal.currentVersion=${portal.version}
# Jetspeed SVN revision
-jetspeed2.revision=539124
+jetspeed2.revision=543176
# Dependencies for Jetspeed
jetspeed.version=2.2-dev_pal-${portal.version}
From svnnotify @ sourceforge.jp Thu Jun 7 17:47:41 2007
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Thu, 7 Jun 2007 17:47:41 +0900
Subject: [pal-cvs 2441] [173] added page path pipeline.
Message-ID: <20070607084741.0C2EF2AC024@users.sourceforge.jp>
Revision: 173
http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=173
Author: shinsuke
Date: 2007-06-07 17:47:40 +0900 (Thu, 07 Jun 2007)
Log Message:
-----------
added page path pipeline.
Modified Paths:
--------------
pal-portal/trunk/build.properties
pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/pipelines.xml
pal-portal/trunk/portal/patches/src/webapp/WEB-INF/web.xml
Added Paths:
-----------
pal-portal/trunk/portal/files/components/
pal-portal/trunk/portal/files/components/portal/
pal-portal/trunk/portal/files/components/portal/src/
pal-portal/trunk/portal/files/components/portal/src/java/
pal-portal/trunk/portal/files/components/portal/src/java/org/
pal-portal/trunk/portal/files/components/portal/src/java/org/apache/
pal-portal/trunk/portal/files/components/portal/src/java/org/apache/jetspeed/
pal-portal/trunk/portal/files/components/portal/src/java/org/apache/jetspeed/profiler/
pal-portal/trunk/portal/files/components/portal/src/java/org/apache/jetspeed/profiler/impl/
pal-portal/trunk/portal/files/components/portal/src/java/org/apache/jetspeed/profiler/impl/PagePathValveImpl.java
-------------- next part --------------
Modified: pal-portal/trunk/build.properties
===================================================================
--- pal-portal/trunk/build.properties 2007-06-01 08:04:46 UTC (rev 172)
+++ pal-portal/trunk/build.properties 2007-06-07 08:47:40 UTC (rev 173)
@@ -182,6 +182,7 @@
src/webapp/WEB-INF/templates/login/html/login.jsp,\
src/webapp/WEB-INF/templates/layout/html/columns/layout.vm,\
src/webapp/WEB-INF/templates/layout/html/maximized/layout.vm,\
+src/webapp/WEB-INF/web.xml,\
src/webapp/decorations/portlet/decorator.vm,\
project.properties,\
jetspeed-api/src/java/org/apache/jetspeed/security/spi/UserSecurityHandler.java,\
Added: pal-portal/trunk/portal/files/components/portal/src/java/org/apache/jetspeed/profiler/impl/PagePathValveImpl.java
===================================================================
--- pal-portal/trunk/portal/files/components/portal/src/java/org/apache/jetspeed/profiler/impl/PagePathValveImpl.java 2007-06-01 08:04:46 UTC (rev 172)
+++ pal-portal/trunk/portal/files/components/portal/src/java/org/apache/jetspeed/profiler/impl/PagePathValveImpl.java 2007-06-07 08:47:40 UTC (rev 173)
@@ -0,0 +1,407 @@
+package org.apache.jetspeed.profiler.impl;
+
+import java.io.IOException;
+import java.security.Principal;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.security.auth.Subject;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.jetspeed.PortalReservedParameters;
+import org.apache.jetspeed.decoration.PageActionAccess;
+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.ContentPageImpl;
+import org.apache.jetspeed.om.page.Page;
+import org.apache.jetspeed.page.PageNotFoundException;
+import org.apache.jetspeed.page.document.NodeException;
+import org.apache.jetspeed.page.document.NodeNotFoundException;
+import org.apache.jetspeed.pipeline.PipelineException;
+import org.apache.jetspeed.pipeline.valve.AbstractValve;
+import org.apache.jetspeed.pipeline.valve.PageProfilerValve;
+import org.apache.jetspeed.pipeline.valve.ValveContext;
+import org.apache.jetspeed.portalsite.PortalSite;
+import org.apache.jetspeed.portalsite.PortalSiteRequestContext;
+import org.apache.jetspeed.portalsite.PortalSiteSessionContext;
+import org.apache.jetspeed.profiler.ProfileLocator;
+import org.apache.jetspeed.profiler.Profiler;
+import org.apache.jetspeed.profiler.ProfilerException;
+import org.apache.jetspeed.request.RequestContext;
+import org.apache.jetspeed.security.SecurityHelper;
+import org.apache.jetspeed.security.UserPrincipal;
+
+public class PagePathValveImpl extends AbstractValve implements PageProfilerValve
+{
+ protected Log log = LogFactory.getLog(PagePathValveImpl.class);
+
+ /**
+ * PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY - session portal site context attribute key
+ */
+ public static final String PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY = "org.apache.jetspeed.portalsite.PortalSiteSessionContext";
+
+ /**
+ * PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY - request portal site context attribute key
+ */
+ public static final String PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY = "org.apache.jetspeed.portalsite.PortalSiteRequestContext";
+
+ /**
+ * PROFILED_PAGE_CONTEXT_ATTR_KEY - legacy request portal site context attribute key
+ */
+ public static final String PROFILED_PAGE_CONTEXT_ATTR_KEY = "org.apache.jetspeed.profiledPageContext";
+
+ /**
+ * session key for storing map of PageActionAccess instances
+ */
+ private static final String PAGE_ACTION_ACCESS_MAP_SESSION_ATTR_KEY = "org.apache.jetspeed.profiler.pageActionAccessMap";
+
+ /**
+ * profiler - profiler component
+ */
+ private Profiler profiler;
+
+ /**
+ * portalSite - portal site component
+ */
+ private PortalSite portalSite;
+
+ /**
+ * requestFallback - flag indicating whether request should fallback to root folder
+ * if locators do not select a page or access is forbidden
+ */
+ private boolean requestFallback;
+
+ /**
+ * useHistory - flag indicating whether to use visited page
+ * history to select default page per site folder
+ */
+ private boolean useHistory;
+
+ /**
+ * ProfilerValveImpl - constructor
+ *
+ * @param profiler profiler component reference
+ * @param portalSite portal site component reference
+ * @param requestFallback flag to enable root folder fallback
+ * @param useHistory flag to enable selection of last visited folder page
+ */
+ public PagePathValveImpl(Profiler profiler, PortalSite portalSite, boolean requestFallback, boolean useHistory)
+ {
+ this.profiler = profiler;
+ this.portalSite = portalSite;
+ this.requestFallback = requestFallback;
+ this.useHistory = useHistory;
+ }
+
+ /**
+ * ProfilerValveImpl - constructor
+ *
+ * @param profiler profiler component reference
+ * @param portalSite portal site component reference
+ * @param requestFallback flag to enable root folder fallback
+ */
+ public PagePathValveImpl(Profiler profiler, PortalSite portalSite, boolean requestFallback)
+ {
+ this(profiler, portalSite, requestFallback, true);
+ }
+
+ /**
+ * ProfilerValveImpl - constructor
+ *
+ * @param profiler profiler component reference
+ * @param portalSite portal site component reference
+ */
+ public PagePathValveImpl(Profiler profiler, PortalSite portalSite)
+ {
+ this(profiler, portalSite, true, true);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jetspeed.pipeline.valve.Valve#invoke(org.apache.jetspeed.request.RequestContext,
+ * org.apache.jetspeed.pipeline.valve.ValveContext)
+ */
+ public void invoke(RequestContext request, ValveContext context) throws PipelineException
+ {
+ try
+ {
+ // get profiler locators for request subject/principal using the profiler
+ Subject subject = request.getSubject();
+ if (subject == null)
+ {
+ throw new ProfilerException("Missing subject for request: " + request.getPath());
+ }
+ Principal principal = SecurityHelper.getBestPrincipal(subject, UserPrincipal.class);
+ if (principal == null)
+ {
+ throw new ProfilerException("Missing principal for request: " + request.getPath());
+ }
+
+ // get request specific profile locators if required
+ Map locators = null;
+ String locatorName = (String) request.getAttribute(PROFILE_LOCATOR_REQUEST_ATTR_KEY);
+ if (locatorName != null)
+ {
+ ProfileLocator locator = profiler.getProfile(request, locatorName);
+ if (locator != null)
+ {
+ locators = new HashMap();
+ locators.put(ProfileLocator.PAGE_LOCATOR, locator);
+ }
+ }
+
+ // get specified or default locators for the current user,
+ // falling back to global defaults and, if necessary, explicity
+ // fallback to 'page' profile locators
+ if (locators == null)
+ {
+ locators = profiler.getProfileLocators(request, principal);
+ }
+ if (locators.size() == 0)
+ {
+ locators = profiler.getDefaultProfileLocators(request);
+ }
+ if (locators.size() == 0)
+ {
+ locators.put(ProfileLocator.PAGE_LOCATOR, profiler.getProfile(request, ProfileLocator.PAGE_LOCATOR));
+ }
+
+ // get profiled page using the profiler, page manager,
+ // and portal site components
+ if (locators != null)
+ {
+ // get or create portalsite session context; the session
+ // context maintains the user view of the site and is
+ // searched against to locate the requested page and
+ // used to build site menus from its extent; this is
+ // cached in the session because locators seldom change
+ // during the session so the session view of the site can
+ // be cached unless locators do change; if the context
+ // is invalid, (perhaps because the session was persisted
+ // and is now being reloaded in a new server), it must be
+ // replaced with a newly created session context
+ PortalSiteSessionContext sessionContext = (PortalSiteSessionContext) request
+ .getSessionAttribute(PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY);
+ if ((sessionContext == null) || !sessionContext.isValid())
+ {
+ sessionContext = portalSite.newSessionContext();
+ request.setSessionAttribute(PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY, sessionContext);
+ }
+
+ // construct and save a new portalsite request context
+ // using session context, locators map, fallback, and
+ // folder page histories; the request context uses the
+ // locators to initialize or resets the session context if
+ // locators have changed for this request; the request
+ // context also acts as a short term request cache for the
+ // selected page and built menus; however, creating the
+ // request context here does not select the page or build
+ // menus: that is done when the request context is
+ // accessed subsequently
+ PortalSiteRequestContext requestContext = sessionContext.newRequestContext(locators, requestFallback, useHistory);
+ request.setAttribute(PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY, requestContext);
+
+ // additionally save request context under legacy key
+ // to support existing decorator access
+ request.setAttribute(PROFILED_PAGE_CONTEXT_ATTR_KEY, requestContext);
+
+ // get profiled page from portalsite request context
+ // and save profile locators map; accessing the request
+ // context here and in subsequent valves/decorators
+ // latently selects the page and builds menus from the
+ // user site view using the request context locators;
+ // the managed page accesed here is the raw selected page
+ // as returned by the PageManager component; accessing
+ // the managed page here selects the current page for the
+ // request
+ // request.setPage(new ContentPageImpl(requestContext.getManagedPage()));
+ Page page = getRequestedPage(request);
+ if (page != null)
+ {
+ request.setPage(new ContentPageImpl(page));
+ }
+ else
+ {
+ request.setPage(new ContentPageImpl(requestContext.getManagedPage()));
+ }
+
+ request.setProfileLocators(requestContext.getLocators());
+
+ request.setAttribute(PortalReservedParameters.PAGE_EDIT_ACCESS_ATTRIBUTE, getPageActionAccess(request));
+ }
+
+ // continue
+ context.invokeNext(request);
+ }
+ catch (SecurityException se)
+ {
+ // fallback to portal root folder/default page if
+ // no user is available and request path is not
+ // already attempting to access the root folder;
+ // this is rarely the case since the anonymous
+ // user is normally defined unless the default
+ // security system has been replaced/overridden
+ if (request.getRequest().getUserPrincipal() == null && request.getPath() != null && !request.getPath().equals("/"))
+ {
+ try
+ {
+ request.getResponse().sendRedirect(request.getRequest().getContextPath());
+ }
+ catch (IOException ioe)
+ {
+ }
+ return;
+ }
+
+ // return standard HTTP 403 - FORBIDDEN status
+ log.error(se.getMessage(), se);
+ try
+ {
+ request.getResponse().sendError(HttpServletResponse.SC_FORBIDDEN, se.getMessage());
+ }
+ catch (IOException ioe)
+ {
+ log.error("Failed to invoke HttpServletReponse.sendError: " + ioe.getMessage(), ioe);
+ }
+ }
+ catch (NodeNotFoundException nnfe)
+ {
+ // return standard HTTP 404 - NOT FOUND status
+ log.error(nnfe.getMessage(), nnfe);
+ try
+ {
+ request.getResponse().sendError(HttpServletResponse.SC_NOT_FOUND, nnfe.getMessage());
+ }
+ catch (IOException ioe)
+ {
+ log.error("Failed to invoke HttpServletReponse.sendError: " + ioe.getMessage(), ioe);
+ }
+ }
+ catch (Exception e)
+ {
+ log.error("Exception in request pipeline: " + e.getMessage(), e);
+ throw new PipelineException(e.toString(), e);
+ }
+ }
+
+ /**
+ * Returns the PageActionAccess
for the current user request.
+ * @see PageActionAccess
+ * @param requestContext RequestContext of the current portal request.
+ * @return PageActionAccess for the current user request.
+ */
+ protected PageActionAccess getPageActionAccess(RequestContext requestContext)
+ {
+ Page page = requestContext.getPage();
+ String key = page.getId();
+ boolean loggedOn = requestContext.getRequest().getUserPrincipal() != null;
+ boolean anonymous = !loggedOn;
+ PageActionAccess pageActionAccess = null;
+
+ Map sessionActions = null;
+ synchronized (this)
+ {
+ sessionActions = (Map) requestContext.getSessionAttribute(PAGE_ACTION_ACCESS_MAP_SESSION_ATTR_KEY);
+ if (sessionActions == null)
+ {
+ sessionActions = new HashMap();
+ requestContext.setSessionAttribute(PAGE_ACTION_ACCESS_MAP_SESSION_ATTR_KEY, sessionActions);
+ }
+ else
+ {
+ pageActionAccess = (PageActionAccess) sessionActions.get(key);
+ }
+ }
+ synchronized (sessionActions)
+ {
+ if (pageActionAccess == null)
+ {
+ pageActionAccess = new PageActionAccess(anonymous, page);
+ sessionActions.put(key, pageActionAccess);
+ }
+ else
+ {
+ pageActionAccess.checkReset(anonymous, page);
+ }
+ }
+
+ return pageActionAccess;
+ }
+
+ public String toString()
+ {
+ return "ProfilerValve";
+ }
+
+ protected Page getRequestedPage(RequestContext request)
+ {
+ String path = request.getPath();
+ if (path == null)
+ {
+ return null;
+ }
+
+ PortalSiteSessionContext sessionContext = (PortalSiteSessionContext) request
+ .getSessionAttribute(PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY);
+ if (path.endsWith(Page.DOCUMENT_TYPE))
+ {
+ try
+ {
+ return sessionContext.getPageManager().getPage(path);
+ }
+ catch (PageNotFoundException e)
+ {
+ log.warn("Exception in request pipeline: " + e.getMessage(), e);
+ }
+ catch (NodeException e)
+ {
+ log.warn("Exception in request pipeline: " + e.getMessage(), e);
+ }
+ catch (Exception e)
+ {
+ log.warn("Exception in request pipeline: " + e.getMessage(), e);
+ }
+ return null;
+ }
+
+ try
+ {
+ Folder folder = sessionContext.getPageManager().getFolder(path);
+ if (folder != null)
+ {
+ String defaultPage = folder.getDefaultPage();
+ if (defaultPage != null)
+ {
+ return folder.getPage(defaultPage);
+ }
+ //TODO
+ }
+ }
+ catch (PageNotFoundException e)
+ {
+ log.warn("Exception in request pipeline: " + e.getMessage(), e);
+ }
+ catch (FolderNotFoundException e)
+ {
+ log.warn("Exception in request pipeline: " + e.getMessage(), e);
+ }
+ catch (InvalidFolderException e)
+ {
+ log.warn("Exception in request pipeline: " + e.getMessage(), e);
+ }
+ catch (NodeException e)
+ {
+ log.warn("Exception in request pipeline: " + e.getMessage(), e);
+ }
+ catch (Exception e)
+ {
+
+ log.warn("Exception in request pipeline: " + e.getMessage(), e);
+ }
+ return null;
+ }
+}
Property changes on: pal-portal/trunk/portal/files/components/portal/src/java/org/apache/jetspeed/profiler/impl/PagePathValveImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/pipelines.xml
===================================================================
--- pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/pipelines.xml 2007-06-01 08:04:46 UTC (rev 172)
+++ pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/pipelines.xml 2007-06-07 08:47:40 UTC (rev 173)
@@ -1,8 +1,72 @@
Index: src/webapp/WEB-INF/assembly/pipelines.xml
===================================================================
---- src/webapp/WEB-INF/assembly/pipelines.xml (リビジョン 539124)
+--- src/webapp/WEB-INF/assembly/pipelines.xml (リビジョン 543176)
+++ src/webapp/WEB-INF/assembly/pipelines.xml (作業コピー)
-@@ -301,6 +301,7 @@
+@@ -106,6 +106,30 @@
+ -->
+ true
+
++
++
++
++
++
++
++
++
++ true
++
++ true
++
+
+
-
- AJAXFilter
- *.ajax
-
--
-
-
- org.apache.jetspeed.webapp.logging.Log4JConfigurator
+@@ -153,6 +153,14 @@
+ /portal/*
+
+
++
++
++ jetspeed
++
++
++ /page/*
++
++
+
+
+ jetspeed
From svnnotify @ sourceforge.jp Fri Jun 8 18:20:15 2007
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Fri, 8 Jun 2007 18:20:15 +0900
Subject: [pal-cvs 2442] [174] removed pagepath pipeline.
Message-ID: <20070608092015.CAF6A2AC02F@users.sourceforge.jp>
Revision: 174
http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=174
Author: shinsuke
Date: 2007-06-08 18:20:15 +0900 (Fri, 08 Jun 2007)
Log Message:
-----------
removed pagepath pipeline. modified logic of profiler valve.
Modified Paths:
--------------
pal-portal/trunk/build.properties
pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/pipelines.xml
Added Paths:
-----------
pal-portal/trunk/portal/patches/components/portal-site/
pal-portal/trunk/portal/patches/components/portal-site/src/
pal-portal/trunk/portal/patches/components/portal-site/src/java/
pal-portal/trunk/portal/patches/components/portal-site/src/java/org/
pal-portal/trunk/portal/patches/components/portal-site/src/java/org/apache/
pal-portal/trunk/portal/patches/components/portal-site/src/java/org/apache/jetspeed/
pal-portal/trunk/portal/patches/components/portal-site/src/java/org/apache/jetspeed/portalsite/
pal-portal/trunk/portal/patches/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/
pal-portal/trunk/portal/patches/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java
pal-portal/trunk/portal/patches/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/
pal-portal/trunk/portal/patches/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteView.java
Removed Paths:
-------------
pal-portal/trunk/portal/files/components/portal/src/java/org/apache/jetspeed/profiler/impl/PagePathValveImpl.java
pal-portal/trunk/portal/patches/src/webapp/WEB-INF/web.xml
-------------- next part --------------
Modified: pal-portal/trunk/build.properties
===================================================================
--- pal-portal/trunk/build.properties 2007-06-07 08:47:40 UTC (rev 173)
+++ pal-portal/trunk/build.properties 2007-06-08 09:20:15 UTC (rev 174)
@@ -63,7 +63,7 @@
org.apache.jetspeed.portal.currentVersion=${portal.version}
# Jetspeed SVN revision
-jetspeed2.revision=543176
+jetspeed2.revision=545114
# Dependencies for Jetspeed
jetspeed.version=2.2-dev_pal-${portal.version}
@@ -164,6 +164,8 @@
components/portal/src/java/org/apache/jetspeed/login/resources/LoginViewResources_ja.properties,\
components/portal/src/java/org/apache/jetspeed/login/resources/LoginViewResources.properties,\
components/portal/src/java/org/apache/jetspeed/login/resources/LoginViewResources_en.properties,\
+components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java,\
+components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteView.java,\
components/security/src/java/org/apache/jetspeed/security/impl/AuthenticationProviderProxyImpl.java,\
components/security/src/java/org/apache/jetspeed/security/spi/impl/LdapUserSecurityHandler.java,\
components/security/src/java/org/apache/jetspeed/security/spi/impl/DefaultUserSecurityHandler.java,\
@@ -182,7 +184,6 @@
src/webapp/WEB-INF/templates/login/html/login.jsp,\
src/webapp/WEB-INF/templates/layout/html/columns/layout.vm,\
src/webapp/WEB-INF/templates/layout/html/maximized/layout.vm,\
-src/webapp/WEB-INF/web.xml,\
src/webapp/decorations/portlet/decorator.vm,\
project.properties,\
jetspeed-api/src/java/org/apache/jetspeed/security/spi/UserSecurityHandler.java,\
Deleted: pal-portal/trunk/portal/files/components/portal/src/java/org/apache/jetspeed/profiler/impl/PagePathValveImpl.java
===================================================================
--- pal-portal/trunk/portal/files/components/portal/src/java/org/apache/jetspeed/profiler/impl/PagePathValveImpl.java 2007-06-07 08:47:40 UTC (rev 173)
+++ pal-portal/trunk/portal/files/components/portal/src/java/org/apache/jetspeed/profiler/impl/PagePathValveImpl.java 2007-06-08 09:20:15 UTC (rev 174)
@@ -1,407 +0,0 @@
-package org.apache.jetspeed.profiler.impl;
-
-import java.io.IOException;
-import java.security.Principal;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.security.auth.Subject;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.jetspeed.PortalReservedParameters;
-import org.apache.jetspeed.decoration.PageActionAccess;
-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.ContentPageImpl;
-import org.apache.jetspeed.om.page.Page;
-import org.apache.jetspeed.page.PageNotFoundException;
-import org.apache.jetspeed.page.document.NodeException;
-import org.apache.jetspeed.page.document.NodeNotFoundException;
-import org.apache.jetspeed.pipeline.PipelineException;
-import org.apache.jetspeed.pipeline.valve.AbstractValve;
-import org.apache.jetspeed.pipeline.valve.PageProfilerValve;
-import org.apache.jetspeed.pipeline.valve.ValveContext;
-import org.apache.jetspeed.portalsite.PortalSite;
-import org.apache.jetspeed.portalsite.PortalSiteRequestContext;
-import org.apache.jetspeed.portalsite.PortalSiteSessionContext;
-import org.apache.jetspeed.profiler.ProfileLocator;
-import org.apache.jetspeed.profiler.Profiler;
-import org.apache.jetspeed.profiler.ProfilerException;
-import org.apache.jetspeed.request.RequestContext;
-import org.apache.jetspeed.security.SecurityHelper;
-import org.apache.jetspeed.security.UserPrincipal;
-
-public class PagePathValveImpl extends AbstractValve implements PageProfilerValve
-{
- protected Log log = LogFactory.getLog(PagePathValveImpl.class);
-
- /**
- * PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY - session portal site context attribute key
- */
- public static final String PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY = "org.apache.jetspeed.portalsite.PortalSiteSessionContext";
-
- /**
- * PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY - request portal site context attribute key
- */
- public static final String PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY = "org.apache.jetspeed.portalsite.PortalSiteRequestContext";
-
- /**
- * PROFILED_PAGE_CONTEXT_ATTR_KEY - legacy request portal site context attribute key
- */
- public static final String PROFILED_PAGE_CONTEXT_ATTR_KEY = "org.apache.jetspeed.profiledPageContext";
-
- /**
- * session key for storing map of PageActionAccess instances
- */
- private static final String PAGE_ACTION_ACCESS_MAP_SESSION_ATTR_KEY = "org.apache.jetspeed.profiler.pageActionAccessMap";
-
- /**
- * profiler - profiler component
- */
- private Profiler profiler;
-
- /**
- * portalSite - portal site component
- */
- private PortalSite portalSite;
-
- /**
- * requestFallback - flag indicating whether request should fallback to root folder
- * if locators do not select a page or access is forbidden
- */
- private boolean requestFallback;
-
- /**
- * useHistory - flag indicating whether to use visited page
- * history to select default page per site folder
- */
- private boolean useHistory;
-
- /**
- * ProfilerValveImpl - constructor
- *
- * @param profiler profiler component reference
- * @param portalSite portal site component reference
- * @param requestFallback flag to enable root folder fallback
- * @param useHistory flag to enable selection of last visited folder page
- */
- public PagePathValveImpl(Profiler profiler, PortalSite portalSite, boolean requestFallback, boolean useHistory)
- {
- this.profiler = profiler;
- this.portalSite = portalSite;
- this.requestFallback = requestFallback;
- this.useHistory = useHistory;
- }
-
- /**
- * ProfilerValveImpl - constructor
- *
- * @param profiler profiler component reference
- * @param portalSite portal site component reference
- * @param requestFallback flag to enable root folder fallback
- */
- public PagePathValveImpl(Profiler profiler, PortalSite portalSite, boolean requestFallback)
- {
- this(profiler, portalSite, requestFallback, true);
- }
-
- /**
- * ProfilerValveImpl - constructor
- *
- * @param profiler profiler component reference
- * @param portalSite portal site component reference
- */
- public PagePathValveImpl(Profiler profiler, PortalSite portalSite)
- {
- this(profiler, portalSite, true, true);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jetspeed.pipeline.valve.Valve#invoke(org.apache.jetspeed.request.RequestContext,
- * org.apache.jetspeed.pipeline.valve.ValveContext)
- */
- public void invoke(RequestContext request, ValveContext context) throws PipelineException
- {
- try
- {
- // get profiler locators for request subject/principal using the profiler
- Subject subject = request.getSubject();
- if (subject == null)
- {
- throw new ProfilerException("Missing subject for request: " + request.getPath());
- }
- Principal principal = SecurityHelper.getBestPrincipal(subject, UserPrincipal.class);
- if (principal == null)
- {
- throw new ProfilerException("Missing principal for request: " + request.getPath());
- }
-
- // get request specific profile locators if required
- Map locators = null;
- String locatorName = (String) request.getAttribute(PROFILE_LOCATOR_REQUEST_ATTR_KEY);
- if (locatorName != null)
- {
- ProfileLocator locator = profiler.getProfile(request, locatorName);
- if (locator != null)
- {
- locators = new HashMap();
- locators.put(ProfileLocator.PAGE_LOCATOR, locator);
- }
- }
-
- // get specified or default locators for the current user,
- // falling back to global defaults and, if necessary, explicity
- // fallback to 'page' profile locators
- if (locators == null)
- {
- locators = profiler.getProfileLocators(request, principal);
- }
- if (locators.size() == 0)
- {
- locators = profiler.getDefaultProfileLocators(request);
- }
- if (locators.size() == 0)
- {
- locators.put(ProfileLocator.PAGE_LOCATOR, profiler.getProfile(request, ProfileLocator.PAGE_LOCATOR));
- }
-
- // get profiled page using the profiler, page manager,
- // and portal site components
- if (locators != null)
- {
- // get or create portalsite session context; the session
- // context maintains the user view of the site and is
- // searched against to locate the requested page and
- // used to build site menus from its extent; this is
- // cached in the session because locators seldom change
- // during the session so the session view of the site can
- // be cached unless locators do change; if the context
- // is invalid, (perhaps because the session was persisted
- // and is now being reloaded in a new server), it must be
- // replaced with a newly created session context
- PortalSiteSessionContext sessionContext = (PortalSiteSessionContext) request
- .getSessionAttribute(PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY);
- if ((sessionContext == null) || !sessionContext.isValid())
- {
- sessionContext = portalSite.newSessionContext();
- request.setSessionAttribute(PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY, sessionContext);
- }
-
- // construct and save a new portalsite request context
- // using session context, locators map, fallback, and
- // folder page histories; the request context uses the
- // locators to initialize or resets the session context if
- // locators have changed for this request; the request
- // context also acts as a short term request cache for the
- // selected page and built menus; however, creating the
- // request context here does not select the page or build
- // menus: that is done when the request context is
- // accessed subsequently
- PortalSiteRequestContext requestContext = sessionContext.newRequestContext(locators, requestFallback, useHistory);
- request.setAttribute(PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY, requestContext);
-
- // additionally save request context under legacy key
- // to support existing decorator access
- request.setAttribute(PROFILED_PAGE_CONTEXT_ATTR_KEY, requestContext);
-
- // get profiled page from portalsite request context
- // and save profile locators map; accessing the request
- // context here and in subsequent valves/decorators
- // latently selects the page and builds menus from the
- // user site view using the request context locators;
- // the managed page accesed here is the raw selected page
- // as returned by the PageManager component; accessing
- // the managed page here selects the current page for the
- // request
- // request.setPage(new ContentPageImpl(requestContext.getManagedPage()));
- Page page = getRequestedPage(request);
- if (page != null)
- {
- request.setPage(new ContentPageImpl(page));
- }
- else
- {
- request.setPage(new ContentPageImpl(requestContext.getManagedPage()));
- }
-
- request.setProfileLocators(requestContext.getLocators());
-
- request.setAttribute(PortalReservedParameters.PAGE_EDIT_ACCESS_ATTRIBUTE, getPageActionAccess(request));
- }
-
- // continue
- context.invokeNext(request);
- }
- catch (SecurityException se)
- {
- // fallback to portal root folder/default page if
- // no user is available and request path is not
- // already attempting to access the root folder;
- // this is rarely the case since the anonymous
- // user is normally defined unless the default
- // security system has been replaced/overridden
- if (request.getRequest().getUserPrincipal() == null && request.getPath() != null && !request.getPath().equals("/"))
- {
- try
- {
- request.getResponse().sendRedirect(request.getRequest().getContextPath());
- }
- catch (IOException ioe)
- {
- }
- return;
- }
-
- // return standard HTTP 403 - FORBIDDEN status
- log.error(se.getMessage(), se);
- try
- {
- request.getResponse().sendError(HttpServletResponse.SC_FORBIDDEN, se.getMessage());
- }
- catch (IOException ioe)
- {
- log.error("Failed to invoke HttpServletReponse.sendError: " + ioe.getMessage(), ioe);
- }
- }
- catch (NodeNotFoundException nnfe)
- {
- // return standard HTTP 404 - NOT FOUND status
- log.error(nnfe.getMessage(), nnfe);
- try
- {
- request.getResponse().sendError(HttpServletResponse.SC_NOT_FOUND, nnfe.getMessage());
- }
- catch (IOException ioe)
- {
- log.error("Failed to invoke HttpServletReponse.sendError: " + ioe.getMessage(), ioe);
- }
- }
- catch (Exception e)
- {
- log.error("Exception in request pipeline: " + e.getMessage(), e);
- throw new PipelineException(e.toString(), e);
- }
- }
-
- /**
- * Returns the PageActionAccess
for the current user request.
- * @see PageActionAccess
- * @param requestContext RequestContext of the current portal request.
- * @return PageActionAccess for the current user request.
- */
- protected PageActionAccess getPageActionAccess(RequestContext requestContext)
- {
- Page page = requestContext.getPage();
- String key = page.getId();
- boolean loggedOn = requestContext.getRequest().getUserPrincipal() != null;
- boolean anonymous = !loggedOn;
- PageActionAccess pageActionAccess = null;
-
- Map sessionActions = null;
- synchronized (this)
- {
- sessionActions = (Map) requestContext.getSessionAttribute(PAGE_ACTION_ACCESS_MAP_SESSION_ATTR_KEY);
- if (sessionActions == null)
- {
- sessionActions = new HashMap();
- requestContext.setSessionAttribute(PAGE_ACTION_ACCESS_MAP_SESSION_ATTR_KEY, sessionActions);
- }
- else
- {
- pageActionAccess = (PageActionAccess) sessionActions.get(key);
- }
- }
- synchronized (sessionActions)
- {
- if (pageActionAccess == null)
- {
- pageActionAccess = new PageActionAccess(anonymous, page);
- sessionActions.put(key, pageActionAccess);
- }
- else
- {
- pageActionAccess.checkReset(anonymous, page);
- }
- }
-
- return pageActionAccess;
- }
-
- public String toString()
- {
- return "ProfilerValve";
- }
-
- protected Page getRequestedPage(RequestContext request)
- {
- String path = request.getPath();
- if (path == null)
- {
- return null;
- }
-
- PortalSiteSessionContext sessionContext = (PortalSiteSessionContext) request
- .getSessionAttribute(PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY);
- if (path.endsWith(Page.DOCUMENT_TYPE))
- {
- try
- {
- return sessionContext.getPageManager().getPage(path);
- }
- catch (PageNotFoundException e)
- {
- log.warn("Exception in request pipeline: " + e.getMessage(), e);
- }
- catch (NodeException e)
- {
- log.warn("Exception in request pipeline: " + e.getMessage(), e);
- }
- catch (Exception e)
- {
- log.warn("Exception in request pipeline: " + e.getMessage(), e);
- }
- return null;
- }
-
- try
- {
- Folder folder = sessionContext.getPageManager().getFolder(path);
- if (folder != null)
- {
- String defaultPage = folder.getDefaultPage();
- if (defaultPage != null)
- {
- return folder.getPage(defaultPage);
- }
- //TODO
- }
- }
- catch (PageNotFoundException e)
- {
- log.warn("Exception in request pipeline: " + e.getMessage(), e);
- }
- catch (FolderNotFoundException e)
- {
- log.warn("Exception in request pipeline: " + e.getMessage(), e);
- }
- catch (InvalidFolderException e)
- {
- log.warn("Exception in request pipeline: " + e.getMessage(), e);
- }
- catch (NodeException e)
- {
- log.warn("Exception in request pipeline: " + e.getMessage(), e);
- }
- catch (Exception e)
- {
-
- log.warn("Exception in request pipeline: " + e.getMessage(), e);
- }
- return null;
- }
-}
Added: pal-portal/trunk/portal/patches/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java
===================================================================
--- pal-portal/trunk/portal/patches/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java 2007-06-07 08:47:40 UTC (rev 173)
+++ pal-portal/trunk/portal/patches/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java 2007-06-08 09:20:15 UTC (rev 174)
@@ -0,0 +1,106 @@
+Index: components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java
+===================================================================
+--- components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java (リビジョン 545114)
++++ components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java (作業コピー)
+@@ -34,9 +34,13 @@
+ import org.apache.commons.logging.Log;
+ import org.apache.commons.logging.LogFactory;
+ 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.ContentPageImpl;
+ import org.apache.jetspeed.om.page.Page;
+ import org.apache.jetspeed.page.PageManager;
+ import org.apache.jetspeed.page.PageManagerEventListener;
++import org.apache.jetspeed.page.PageNotFoundException;
+ import org.apache.jetspeed.page.document.Node;
+ import org.apache.jetspeed.page.document.NodeException;
+ import org.apache.jetspeed.page.document.NodeNotFoundException;
+@@ -47,6 +51,7 @@
+ import org.apache.jetspeed.portalsite.view.SiteViewMenuDefinitionLocator;
+ import org.apache.jetspeed.profiler.ProfileLocator;
+ import org.apache.jetspeed.profiler.ProfileLocatorProperty;
++import org.apache.jetspeed.request.RequestContext;
+ import org.apache.jetspeed.security.JSSubject;
+ import org.apache.jetspeed.security.UserPrincipal;
+
+@@ -208,6 +213,13 @@
+ requestPath = locator.getRequestPath();
+ }
+
++ // Check "/_page/"
++ Page page = getRequestedPage(requestPath);
++ if (page != null)
++ {
++ return page;
++ }
++
+ // attempt to select request page or folder using
+ // profile locators and site view; if fallback
+ // enabled, fallback on missing node or access
+@@ -1254,4 +1266,65 @@
+ log.debug("Session unbound event: clear page manager listener and session context state");
+ }
+ }
++
++ public static final String PAGE_PATH_NAVIGATION = "/_page/";
++
++ protected Page getRequestedPage(String path)
++ {
++ if (path == null || !path.startsWith(PAGE_PATH_NAVIGATION))
++ {
++ return null;
++ }
++
++ Page page = null;
++
++ path = path.substring(PAGE_PATH_NAVIGATION.length() - 1);
++
++ try
++ {
++ if (path.endsWith(Page.DOCUMENT_TYPE))
++ {
++ page = getPageManager().getPage(path);
++ }
++ else
++ {
++ Folder folder = getPageManager().getFolder(path);
++ if (folder != null)
++ {
++ String defaultPage = folder.getDefaultPage();
++ if (defaultPage != null)
++ {
++ page = folder.getPage(defaultPage);
++ }
++ //TODO
++ }
++ }
++ if (page != null)
++ {
++ page.setPath(PAGE_PATH_NAVIGATION + path.substring(1));
++ return page;
++ }
++ }
++ catch (PageNotFoundException e)
++ {
++ log.warn("Exception in request pipeline: " + e.getMessage(), e);
++ }
++ catch (FolderNotFoundException e)
++ {
++ log.warn("Exception in request pipeline: " + e.getMessage(), e);
++ }
++ catch (InvalidFolderException e)
++ {
++ log.warn("Exception in request pipeline: " + e.getMessage(), e);
++ }
++ catch (NodeException e)
++ {
++ log.warn("Exception in request pipeline: " + e.getMessage(), e);
++ }
++ catch (Exception e)
++ {
++ log.warn("Exception in request pipeline: " + e.getMessage(), e);
++ }
++ return null;
++ }
+ }
Property changes on: pal-portal/trunk/portal/patches/components/portal-site/src/java/org/apache/jetspeed/portalsite/impl/PortalSiteSessionContextImpl.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: pal-portal/trunk/portal/patches/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteView.java
===================================================================
--- pal-portal/trunk/portal/patches/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteView.java 2007-06-07 08:47:40 UTC (rev 173)
+++ pal-portal/trunk/portal/patches/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteView.java 2007-06-08 09:20:15 UTC (rev 174)
@@ -0,0 +1,15 @@
+Index: components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteView.java
+===================================================================
+--- components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteView.java (リビジョン 545114)
++++ components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteView.java (作業コピー)
+@@ -1233,6 +1233,10 @@
+ {
+ return pageProxy.getPage();
+ }
++ else if(page instanceof Page)
++ {
++ return page;
++ }
+ return null;
+ }
+ }
Property changes on: pal-portal/trunk/portal/patches/components/portal-site/src/java/org/apache/jetspeed/portalsite/view/SiteView.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/pipelines.xml
===================================================================
--- pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/pipelines.xml 2007-06-07 08:47:40 UTC (rev 173)
+++ pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/pipelines.xml 2007-06-08 09:20:15 UTC (rev 174)
@@ -2,70 +2,6 @@
===================================================================
--- src/webapp/WEB-INF/assembly/pipelines.xml (リビジョン 543176)
+++ src/webapp/WEB-INF/assembly/pipelines.xml (作業コピー)
-@@ -106,6 +106,30 @@
- -->
- true
-
-+
-+
-+
-+
-+
-+
-+
-+
-+ true
-+
-+ true
-+
-
-
Modified: pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/pipelines.xml
===================================================================
--- pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/pipelines.xml 2007-06-09 22:37:40 UTC (rev 182)
+++ pal-portal/trunk/portal/patches/src/webapp/WEB-INF/assembly/pipelines.xml 2007-06-09 22:39:21 UTC (rev 183)
@@ -1,8 +1,8 @@
Index: src/webapp/WEB-INF/assembly/pipelines.xml
===================================================================
---- src/webapp/WEB-INF/assembly/pipelines.xml (リビジョン 543176)
+--- src/webapp/WEB-INF/assembly/pipelines.xml (リビジョン 545568)
+++ src/webapp/WEB-INF/assembly/pipelines.xml (作業コピー)
-@@ -317,6 +367,7 @@
+@@ -327,6 +327,7 @@
From svnnotify @ sourceforge.jp Mon Jun 11 08:42:08 2007
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Mon, 11 Jun 2007 08:42:08 +0900
Subject: [pal-cvs 2452] [184] display title at a min mode.
Message-ID: <20070610234208.83B542AC032@users.sourceforge.jp>
Revision: 184
http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=184
Author: shinsuke
Date: 2007-06-11 08:42:08 +0900 (Mon, 11 Jun 2007)
Log Message:
-----------
display title at a min mode.
Modified Paths:
--------------
pal-wcm/trunk/src/main/java/jp/sf/pal/wcm/portlet/PALWcmPortlet.java
-------------- next part --------------
Modified: pal-wcm/trunk/src/main/java/jp/sf/pal/wcm/portlet/PALWcmPortlet.java
===================================================================
--- pal-wcm/trunk/src/main/java/jp/sf/pal/wcm/portlet/PALWcmPortlet.java 2007-06-09 22:39:21 UTC (rev 183)
+++ pal-wcm/trunk/src/main/java/jp/sf/pal/wcm/portlet/PALWcmPortlet.java 2007-06-10 23:42:08 UTC (rev 184)
@@ -56,8 +56,7 @@
*
* @author Shinsuke Sugaya
*/
-public class PALWcmPortlet extends GenericPortlet
-{
+public class PALWcmPortlet extends GenericPortlet {
/**
* Logger for this class
*/
@@ -68,26 +67,62 @@
/* (non-Javadoc)
* @see javax.portlet.Portlet#init(javax.portlet.PortletConfig)
*/
- public void init(PortletConfig config) throws PortletException
- {
+ public void init(PortletConfig config) throws PortletException {
super.init(config);
// pageManager
pageManager = (PageManager) getPortletContext().getAttribute(
CommonPortletServices.CPS_PAGE_MANAGER_COMPONENT);
- if (null == pageManager)
- {
+ if (null == pageManager) {
throw new PortletException(
"Failed to find the Page Manager on portlet initialization");
}
}
/* (non-Javadoc)
+ * @see javax.portlet.GenericPortlet#doDispatch(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
+ */
+ @Override
+ protected void doDispatch(RenderRequest request, RenderResponse response)
+ throws PortletException, IOException {
+ super.doDispatch(request, response);
+ PortletMode mode = request.getPortletMode();
+ if (mode.equals(PortletMode.VIEW)) {
+ String title = (String) request.getAttribute(PALWcmConstants.TITLE);
+ if (title != null) {
+ response.setTitle(title);
+ } else {
+ Fragment fragment = getCurrentFragment(request);
+
+ Locale currentLocale = request.getLocale();
+ List localeList = getLocaleList(fragment);
+ String localeName = "";
+ String language = currentLocale.getLanguage();
+ String country = currentLocale.getCountry();
+ String variant = currentLocale.getVariant();
+ if (localeList.contains(language + "_" + country + "_"
+ + variant)) {
+ localeName = PALWcmConstants.LOCALE_SEPARETER + language
+ + "_" + country + "_" + variant;
+ } else if (localeList.contains(language + "_" + country)) {
+ localeName = PALWcmConstants.LOCALE_SEPARETER + language
+ + "_" + country;
+ } else if (localeList.contains(language)) {
+ localeName = PALWcmConstants.LOCALE_SEPARETER + language;
+ }
+
+ response.setTitle(getFragmentPreferenceValue(fragment,
+ PALWcmConstants.TITLE + localeName, ""));
+ }
+ }
+ //TODO doHelp
+ }
+
+ /* (non-Javadoc)
* @see javax.portlet.GenericPortlet#doView(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
*/
protected void doView(RenderRequest request, RenderResponse response)
- throws PortletException, IOException
- {
+ throws PortletException, IOException {
response.setContentType("text/html");
Fragment fragment = getCurrentFragment(request);
@@ -98,18 +133,13 @@
String language = currentLocale.getLanguage();
String country = currentLocale.getCountry();
String variant = currentLocale.getVariant();
- if (localeList.contains(language + "_" + country + "_" + variant))
- {
+ if (localeList.contains(language + "_" + country + "_" + variant)) {
localeName = PALWcmConstants.LOCALE_SEPARETER + language + "_"
+ country + "_" + variant;
- }
- else if (localeList.contains(language + "_" + country))
- {
+ } else if (localeList.contains(language + "_" + country)) {
localeName = PALWcmConstants.LOCALE_SEPARETER + language + "_"
+ country;
- }
- else if (localeList.contains(language))
- {
+ } else if (localeList.contains(language)) {
localeName = PALWcmConstants.LOCALE_SEPARETER + language;
}
@@ -118,7 +148,7 @@
String content = getFragmentPreferenceValue(fragment,
PALWcmConstants.CONTENT + localeName, "");
- response.setTitle(title);
+ request.setAttribute(PALWcmConstants.TITLE, title);
request.setAttribute(PALWcmConstants.CONTENT, content);
PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher(
@@ -130,44 +160,33 @@
* @see javax.portlet.GenericPortlet#doEdit(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
*/
protected void doEdit(RenderRequest request, RenderResponse response)
- throws PortletException, IOException
- {
+ throws PortletException, IOException {
response.setContentType("text/html");
String msg = request.getParameter(PALWcmConstants.MESSAGE);
- if (msg != null)
- {
+ if (msg != null) {
request.setAttribute(PALWcmConstants.MESSAGE, msg);
- }
- else
- {
+ } else {
request.setAttribute(PALWcmConstants.MESSAGE, "");
}
storeLoginStatus(request);
String editType = request.getParameter(PALWcmConstants.EDIT_TYPE);
- if (PALWcmConstants.CONTENT_EDIT_TYPE.equals(editType))
- {
+ if (PALWcmConstants.CONTENT_EDIT_TYPE.equals(editType)) {
doContentEdit(request, response);
- }
- else if (PALWcmConstants.PREFERENCES_EDIT_TYPE.equals(editType))
- {
+ } else if (PALWcmConstants.PREFERENCES_EDIT_TYPE.equals(editType)) {
doPreferencesEdit(request, response);
- }
- else
- {
+ } else {
doContentEdit(request, response);
}
}
protected void doContentEdit(RenderRequest request, RenderResponse response)
- throws PortletException, IOException
- {
+ throws PortletException, IOException {
String localeName = getEditLocaleName(request);
String selectedLocale = localeName;
- if (!localeName.equals(""))
- {
+ if (!localeName.equals("")) {
localeName = PALWcmConstants.LOCALE_SEPARETER + localeName;
}
@@ -194,27 +213,23 @@
}
- protected String getEditLocaleName(PortletRequest request)
- {
+ protected String getEditLocaleName(PortletRequest request) {
PortletSession portletSession = request.getPortletSession();
Object locale = portletSession
.getAttribute(PALWcmConstants.EDIT_LOCALE);
- if (locale != null)
- {
+ if (locale != null) {
return locale.toString();
}
return "";
}
- protected void setEditLocaleName(PortletRequest request, String localeName)
- {
+ protected void setEditLocaleName(PortletRequest request, String localeName) {
PortletSession portletSession = request.getPortletSession();
portletSession.setAttribute(PALWcmConstants.EDIT_LOCALE, localeName);
}
protected void doPreferencesEdit(RenderRequest request,
- RenderResponse response) throws PortletException, IOException
- {
+ RenderResponse response) throws PortletException, IOException {
Fragment fragment = getCurrentFragment(request);
String fragmentId = fragment.getId();
@@ -228,16 +243,13 @@
}
- private String getLocaleOptionString(Fragment fragment, String localeName)
- {
+ private String getLocaleOptionString(Fragment fragment, String localeName) {
List locales = getLocaleList(fragment);
StringBuffer localesStr = new StringBuffer();
- for (Iterator ite = locales.iterator(); ite.hasNext();)
- {
+ for (Iterator ite = locales.iterator(); ite.hasNext();) {
String lc = ite.next().toString();
localesStr.append("");
@@ -245,8 +257,7 @@
return localesStr.toString();
}
- private List getLocaleList(Fragment fragment)
- {
+ private List getLocaleList(Fragment fragment) {
List locales = new ArrayList();
// List preferences = fragment.getPreferences();
// for (Iterator ite = preferences.iterator(); ite.hasNext();)
@@ -262,11 +273,9 @@
String localeNames = getFragmentPreferenceValue(fragment,
PALWcmConstants.LOCALE_LIST, null);
- if (localeNames != null)
- {
+ if (localeNames != null) {
StringTokenizer st = new StringTokenizer(localeNames, ",");
- while (st.hasMoreTokens())
- {
+ while (st.hasMoreTokens()) {
locales.add(st.nextToken());
}
}
@@ -277,46 +286,33 @@
* @see javax.portlet.Portlet#processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse)
*/
public void processAction(ActionRequest request, ActionResponse response)
- throws PortletException, IOException
- {
- if (PortletMode.VIEW.equals(request.getPortletMode()))
- {
+ throws PortletException, IOException {
+ if (PortletMode.VIEW.equals(request.getPortletMode())) {
processView(request, response);
- }
- else if (PortletMode.EDIT.equals(request.getPortletMode()))
- {
+ } else if (PortletMode.EDIT.equals(request.getPortletMode())) {
processEdit(request, response);
- }
- else
- {
+ } else {
log.warn("Invalid action prcess.");
}
}
protected void processView(ActionRequest request, ActionResponse response)
- throws PortletException, IOException
- {
+ throws PortletException, IOException {
//nothing
}
protected void processEdit(ActionRequest request, ActionResponse response)
- throws PortletException, IOException
- {
+ throws PortletException, IOException {
String editType = request.getParameter(PALWcmConstants.EDIT_TYPE);
- if (PALWcmConstants.CONTENT_EDIT_TYPE.equals(editType))
- {
+ if (PALWcmConstants.CONTENT_EDIT_TYPE.equals(editType)) {
processContentEdit(request, response);
response.setRenderParameter(PALWcmConstants.EDIT_TYPE,
PALWcmConstants.CONTENT_EDIT_TYPE);
- }
- else if (PALWcmConstants.PREFERENCES_EDIT_TYPE.equals(editType))
- {
+ } else if (PALWcmConstants.PREFERENCES_EDIT_TYPE.equals(editType)) {
processPreferencesEdit(request, response);
response.setRenderParameter(PALWcmConstants.EDIT_TYPE,
PALWcmConstants.PREFERENCES_EDIT_TYPE);
- }
- else
- {
+ } else {
//TODO print error
processContentEdit(request, response);
response.setRenderParameter(PALWcmConstants.EDIT_TYPE,
@@ -325,13 +321,11 @@
}
protected void processContentEdit(ActionRequest request,
- ActionResponse response) throws PortletException, IOException
- {
+ ActionResponse response) throws PortletException, IOException {
String localeName = request.getParameter(PALWcmConstants.EDIT_LOCALE);
setEditLocaleName(request, localeName);
String actionType = request.getParameter(PALWcmConstants.ACTION_TYPE);
- if (PALWcmConstants.CHANGE_LOCALE.equals(actionType))
- {
+ if (PALWcmConstants.CHANGE_LOCALE.equals(actionType)) {
// no save
return;
}
@@ -340,12 +334,9 @@
String content = request.getParameter(PALWcmConstants.CONTENT);
String fragmentId = request.getParameter(PALWcmConstants.FRAGMENT_ID);
- if (localeName == null)
- {
+ if (localeName == null) {
localeName = "";
- }
- else if (!localeName.equals(""))
- {
+ } else if (!localeName.equals("")) {
localeName = PALWcmConstants.LOCALE_SEPARETER + localeName;
}
@@ -359,21 +350,16 @@
setFragmentPreferenceValue(fragment, PALWcmConstants.CONTENT
+ localeName, content);
- try
- {
+ try {
pageManager.updatePage(page);
request.setAttribute(PALWcmConstants.MESSAGE,
"Failed to update data. ");
- }
- catch (PageNotUpdatedException e)
- {
+ } catch (PageNotUpdatedException e) {
log.error("Failed to update data. ", e);
//TODO i18n
request.setAttribute(PALWcmConstants.MESSAGE,
"Failed to update data. ");
- }
- catch (NodeException e)
- {
+ } catch (NodeException e) {
log.error("Failed to update data. ", e);
//TODO i18n
request.setAttribute(PALWcmConstants.MESSAGE,
@@ -382,11 +368,9 @@
}
protected void processPreferencesEdit(ActionRequest request,
- ActionResponse response) throws PortletException, IOException
- {
+ ActionResponse response) throws PortletException, IOException {
String actionType = request.getParameter(PALWcmConstants.ACTION_TYPE);
- if (PALWcmConstants.ADD_LOCALE.equals(actionType))
- {
+ if (PALWcmConstants.ADD_LOCALE.equals(actionType)) {
// add locale
String fragmentId = request
.getParameter(PALWcmConstants.FRAGMENT_ID);
@@ -397,8 +381,7 @@
String targetLocale = request
.getParameter(PALWcmConstants.TARGET_LOCALE);
- if (targetLocale == null || targetLocale.equals(""))
- {
+ if (targetLocale == null || targetLocale.equals("")) {
//TODO i18n
request
.setAttribute(PALWcmConstants.MESSAGE,
@@ -407,8 +390,7 @@
}
List locales = getLocaleList(fragment);
- if (locales.contains(targetLocale))
- {
+ if (locales.contains(targetLocale)) {
//TODO i18n
request
.setAttribute(PALWcmConstants.MESSAGE,
@@ -420,10 +402,8 @@
Object[] objs = locales.toArray();
Arrays.sort(objs);
StringBuffer localeNames = new StringBuffer();
- for (int i = 0; i < objs.length; i++)
- {
- if (i != 0)
- {
+ for (int i = 0; i < objs.length; i++) {
+ if (i != 0) {
localeNames.append(",");
}
localeNames.append(objs[i].toString());
@@ -431,30 +411,23 @@
setFragmentPreferenceValue(fragment, PALWcmConstants.LOCALE_LIST,
localeNames.toString());
- try
- {
+ try {
pageManager.updatePage(page);
//TODO i18n
request.setAttribute(PALWcmConstants.MESSAGE,
"Added the locale. ");
- }
- catch (PageNotUpdatedException e)
- {
+ } catch (PageNotUpdatedException e) {
log.error("Failed to add the locale. ", e);
//TODO i18n
request.setAttribute(PALWcmConstants.MESSAGE,
"Failed to add the locale. ");
- }
- catch (NodeException e)
- {
+ } catch (NodeException e) {
log.error("Failed to add the locale. ", e);
//TODO i18n
request.setAttribute(PALWcmConstants.MESSAGE,
"Failed to add the locale. ");
}
- }
- else if (PALWcmConstants.DELETE_LOCALE.equals(actionType))
- {
+ } else if (PALWcmConstants.DELETE_LOCALE.equals(actionType)) {
// delete locale
String fragmentId = request
.getParameter(PALWcmConstants.FRAGMENT_ID);
@@ -465,8 +438,7 @@
String selectedLocale = request
.getParameter(PALWcmConstants.SELECTED_LOCALE);
- if (selectedLocale == null || selectedLocale.equals(""))
- {
+ if (selectedLocale == null || selectedLocale.equals("")) {
//TODO i18n
request
.setAttribute(PALWcmConstants.MESSAGE,
@@ -475,8 +447,7 @@
}
List locales = getLocaleList(fragment);
- if (!locales.contains(selectedLocale))
- {
+ if (!locales.contains(selectedLocale)) {
//TODO i18n
request
.setAttribute(PALWcmConstants.MESSAGE,
@@ -487,10 +458,8 @@
locales.remove(selectedLocale);
Object[] objs = locales.toArray();
StringBuffer localeNames = new StringBuffer();
- for (int i = 0; i < objs.length; i++)
- {
- if (i != 0)
- {
+ for (int i = 0; i < objs.length; i++) {
+ if (i != 0) {
localeNames.append(",");
}
localeNames.append(objs[i].toString());
@@ -502,22 +471,17 @@
removeFragmentPreferenceValue(fragment, PALWcmConstants.CONTENT
+ PALWcmConstants.LOCALE_SEPARETER + selectedLocale);
- try
- {
+ try {
pageManager.updatePage(page);
//TODO i18n
request.setAttribute(PALWcmConstants.MESSAGE,
"Deleted the locale. ");
- }
- catch (PageNotUpdatedException e)
- {
+ } catch (PageNotUpdatedException e) {
log.error("Failed to delete the locale. ", e);
//TODO i18n
request.setAttribute(PALWcmConstants.MESSAGE,
"Failed to delete the locale. ");
- }
- catch (NodeException e)
- {
+ } catch (NodeException e) {
log.error("Failed to delete the locale. ", e);
//TODO i18n
request.setAttribute(PALWcmConstants.MESSAGE,
@@ -526,39 +490,32 @@
}
}
- private String getPortalContextPath(PortletRequest request)
- {
+ private String getPortalContextPath(PortletRequest request) {
RequestContext requestContext = (RequestContext) request
.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
return requestContext.getRequest().getContextPath();
}
- private ContentPage getCurrentPage(PortletRequest request)
- {
+ private ContentPage getCurrentPage(PortletRequest request) {
RequestContext requestContext = (RequestContext) request
.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
return requestContext.getPage();
}
- private ContentFragment getCurrentFragment(RenderRequest request)
- {
+ private ContentFragment getCurrentFragment(RenderRequest request) {
return (ContentFragment) request
.getAttribute(PortalReservedParameters.FRAGMENT_ATTRIBUTE);
}
private FragmentPreference getFragmentPreferenceByName(Fragment fragment,
- String name)
- {
- if (name == null)
- {
+ String name) {
+ if (name == null) {
return null;
}
List preferences = fragment.getPreferences();
- for (Iterator ite = preferences.iterator(); ite.hasNext();)
- {
+ for (Iterator ite = preferences.iterator(); ite.hasNext();) {
FragmentPreference fp = (FragmentPreference) ite.next();
- if (fp.getName() != null && fp.getName().equals(name))
- {
+ if (fp.getName() != null && fp.getName().equals(name)) {
return fp;
}
}
@@ -566,11 +523,9 @@
}
private void setFragmentPreferenceValue(Fragment fragment, String name,
- String value)
- {
+ String value) {
FragmentPreference fp = getFragmentPreferenceByName(fragment, name);
- if (fp == null)
- {
+ if (fp == null) {
fp = pageManager.newFragmentPreference();
fp.setName(name);
fp.setReadOnly(false);
@@ -578,27 +533,21 @@
list.add(StringEscapeUtils.escapeXml(value));
fp.setValueList(list);
fragment.getPreferences().add(fp);
- }
- else
- {
+ } else {
fp.getValueList().set(0, StringEscapeUtils.escapeXml(value));
}
}
- private void removeFragmentPreferenceValue(Fragment fragment, String name)
- {
+ private void removeFragmentPreferenceValue(Fragment fragment, String name) {
FragmentPreference fp = getFragmentPreferenceByName(fragment, name);
fragment.getPreferences().remove(fp);
}
private String getFragmentPreferenceValue(Fragment fragment, String name,
- String defaultValue)
- {
+ String defaultValue) {
FragmentPreference fp = getFragmentPreferenceByName(fragment, name);
- if (fp != null)
- {
- if (fp.getValueList().size() > 0)
- {
+ if (fp != null) {
+ if (fp.getValueList().size() > 0) {
return StringEscapeUtils.unescapeXml((String) fp.getValueList()
.get(0));
}
@@ -606,18 +555,15 @@
return defaultValue;
}
- protected void storeLoginStatus(PortletRequest request)
- {
+ protected void storeLoginStatus(PortletRequest request) {
PortletSession portletSession = request.getPortletSession();
- if (request.getRemoteUser() != null)
- {
+ if (request.getRemoteUser() != null) {
portletSession.setAttribute(PALWcmConstants.LOGIN_USER_NAME,
request.getRemoteUser(), PortletSession.APPLICATION_SCOPE);
- }
- else
- {
+ } else {
portletSession.removeAttribute(PALWcmConstants.LOGIN_USER_NAME,
PortletSession.APPLICATION_SCOPE);
}
}
+
}
From svnnotify @ sourceforge.jp Mon Jun 11 13:05:18 2007
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Mon, 11 Jun 2007 13:05:18 +0900
Subject: [pal-cvs 2453] [185] fixed typo.
Message-ID: <20070611040518.7F77E2AC036@users.sourceforge.jp>
Revision: 185
http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=185
Author: shinsuke
Date: 2007-06-11 13:05:18 +0900 (Mon, 11 Jun 2007)
Log Message:
-----------
fixed typo.
Modified Paths:
--------------
pal-admin/trunk/src/main/webapp/WEB-INF/template/userreg/email/html/ja/forgottenPasswdEmail.vm
-------------- next part --------------
Modified: pal-admin/trunk/src/main/webapp/WEB-INF/template/userreg/email/html/ja/forgottenPasswdEmail.vm
===================================================================
--- pal-admin/trunk/src/main/webapp/WEB-INF/template/userreg/email/html/ja/forgottenPasswdEmail.vm 2007-06-10 23:42:08 UTC (rev 184)
+++ pal-admin/trunk/src/main/webapp/WEB-INF/template/userreg/email/html/ja/forgottenPasswdEmail.vm 2007-06-11 04:05:18 UTC (rev 185)
@@ -9,7 +9,7 @@
$!{map.get("returnURL")}
-もし、謝ってこのメールを受け取った場合や、パスワードを更新したくない場合は、
+もし、誤ってこのメールを受け取った場合や、パスワードを更新したくない場合は、
上のリンクをクリックしないでください。クリックしなければ、ご利用のアカウントで
現在のパスワードが保持されます。
From svnnotify @ sourceforge.jp Mon Jun 11 13:23:38 2007
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Mon, 11 Jun 2007 13:23:38 +0900
Subject: [pal-cvs 2454] [186] sync up with j2
Message-ID: <20070611042338.5EC1A2AC014@users.sourceforge.jp>
Revision: 186
http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=186
Author: shinsuke
Date: 2007-06-11 13:23:38 +0900 (Mon, 11 Jun 2007)
Log Message:
-----------
sync up with j2
Modified Paths:
--------------
pal-portal/trunk/build.properties
pal-portal/trunk/portal/patches/components/security/src/java/org/apache/jetspeed/security/spi/impl/DefaultUserSecurityHandler.java
-------------- next part --------------
Modified: pal-portal/trunk/build.properties
===================================================================
--- pal-portal/trunk/build.properties 2007-06-11 04:05:18 UTC (rev 185)
+++ pal-portal/trunk/build.properties 2007-06-11 04:23:38 UTC (rev 186)
@@ -63,7 +63,7 @@
org.apache.jetspeed.portal.currentVersion=${portal.version}
# Jetspeed SVN revision
-jetspeed2.revision=545568
+jetspeed2.revision=545987
# Dependencies for Jetspeed
jetspeed.version=2.2-dev_pal-${portal.version}
Modified: pal-portal/trunk/portal/patches/components/security/src/java/org/apache/jetspeed/security/spi/impl/DefaultUserSecurityHandler.java
===================================================================
--- pal-portal/trunk/portal/patches/components/security/src/java/org/apache/jetspeed/security/spi/impl/DefaultUserSecurityHandler.java 2007-06-11 04:05:18 UTC (rev 185)
+++ pal-portal/trunk/portal/patches/components/security/src/java/org/apache/jetspeed/security/spi/impl/DefaultUserSecurityHandler.java 2007-06-11 04:23:38 UTC (rev 186)
@@ -1,8 +1,8 @@
Index: components/security/src/java/org/apache/jetspeed/security/spi/impl/DefaultUserSecurityHandler.java
===================================================================
---- components/security/src/java/org/apache/jetspeed/security/spi/impl/DefaultUserSecurityHandler.java (リビジョン 534972)
+--- components/security/src/java/org/apache/jetspeed/security/spi/impl/DefaultUserSecurityHandler.java (リビジョン 545987)
+++ components/security/src/java/org/apache/jetspeed/security/spi/impl/DefaultUserSecurityHandler.java (作業コピー)
-@@ -89,6 +89,14 @@
+@@ -92,6 +92,14 @@
}
/**
From svnnotify @ sourceforge.jp Wed Jun 20 17:59:11 2007
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Wed, 20 Jun 2007 17:59:11 +0900
Subject: [pal-cvs 2455] [187] sync up with j2
Message-ID: <20070620085911.BF7C52AC022@users.sourceforge.jp>
Revision: 187
http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=187
Author: shinsuke
Date: 2007-06-20 17:59:11 +0900 (Wed, 20 Jun 2007)
Log Message:
-----------
sync up with j2
Modified Paths:
--------------
pal-portal/trunk/build.properties
pal-portal/trunk/portal/patches/project.properties
-------------- next part --------------
Modified: pal-portal/trunk/build.properties
===================================================================
--- pal-portal/trunk/build.properties 2007-06-11 04:23:38 UTC (rev 186)
+++ pal-portal/trunk/build.properties 2007-06-20 08:59:11 UTC (rev 187)
@@ -63,7 +63,7 @@
org.apache.jetspeed.portal.currentVersion=${portal.version}
# Jetspeed SVN revision
-jetspeed2.revision=545987
+jetspeed2.revision=548891
# Dependencies for Jetspeed
jetspeed.version=2.2-dev_pal-${portal.version}
Modified: pal-portal/trunk/portal/patches/project.properties
===================================================================
--- pal-portal/trunk/portal/patches/project.properties 2007-06-11 04:23:38 UTC (rev 186)
+++ pal-portal/trunk/portal/patches/project.properties 2007-06-20 08:59:11 UTC (rev 187)
@@ -1,8 +1,8 @@
Index: project.properties
===================================================================
---- project.properties (リビジョン 545114)
+--- project.properties (リビジョン 548891)
+++ project.properties (作業コピー)
-@@ -51,7 +51,7 @@
+@@ -52,7 +52,7 @@
derby.include=true
maven.mode.online = true
From svnnotify @ sourceforge.jp Thu Jun 21 13:37:54 2007
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Thu, 21 Jun 2007 13:37:54 +0900
Subject: [pal-cvs 2456] [188] added user registration page for public portal.
Message-ID: <20070621043754.16CAC2AC02D@users.sourceforge.jp>
Revision: 188
http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=188
Author: shinsuke
Date: 2007-06-21 13:37:53 +0900 (Thu, 21 Jun 2007)
Log Message:
-----------
added user registration page for public portal.
Modified Paths:
--------------
pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/UserRegistrationService.java
pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/UserRegistrationPage.java
pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label.properties
pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label_ja.properties
pal-admin/trunk/src/main/webapp/WEB-INF/jetspeed-portlet.xml
pal-admin/trunk/src/main/webapp/WEB-INF/portlet.xml
Added Paths:
-----------
pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationCompletedPage.java
pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationPage.java
pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistration.html
pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistrationCompleted.html
-------------- next part --------------
Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/UserRegistrationService.java
===================================================================
--- pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/UserRegistrationService.java 2007-06-20 08:59:11 UTC (rev 187)
+++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/service/UserRegistrationService.java 2007-06-21 04:37:53 UTC (rev 188)
@@ -19,6 +19,8 @@
import jp.sf.pal.admin.util.PortalComponentUtil;
import jp.sf.pal.admin.util.UserRegistrationUtil;
import jp.sf.pal.admin.web.registration.ForgottenPasswordPage;
+import jp.sf.pal.admin.web.registration.PublicPortalRegistrationCompletedPage;
+import jp.sf.pal.admin.web.registration.PublicPortalRegistrationPage;
import jp.sf.pal.admin.web.registration.ResetPasswordPage;
import jp.sf.pal.admin.web.registration.UserRegistrationPage;
import jp.sf.pal.common.CommonException;
@@ -58,18 +60,15 @@
public void register(UserRegistrationPage page) throws CommonException
{
- if (!UserRegistrationUtil
- .getBoolean(PALAdminConstants.FORCE_GENERATED_PASSWORD))
+ if (!UserRegistrationUtil.getBoolean(PALAdminConstants.FORCE_GENERATED_PASSWORD))
{
if (page.getPassword() == null || page.getPassword().equals(""))
{
- throw new CommonException("error.lacking.password",
- "The password is null.");
+ throw new CommonException("error.lacking.password", "The password is null.");
}
}
- if (UserRegistrationUtil
- .getBoolean(PALAdminConstants.FORCE_USE_EMAIL_AS_USERNAME))
+ if (UserRegistrationUtil.getBoolean(PALAdminConstants.FORCE_USE_EMAIL_AS_USERNAME))
{
// force user.name to be same as email
page.setUserName(page.getUserBusinessInfoOnlineEmail());
@@ -87,20 +86,16 @@
if (userIdExistsFlag)
{
- throw new CommonException("error.userid_already_exists",
- "The user id already exists.");
+ throw new CommonException("error.userid_already_exists", "The user id already exists.");
}
- if (UserRegistrationUtil
- .getBoolean(PALAdminConstants.FORCE_UNIQUE_EMAIL))
+ if (UserRegistrationUtil.getBoolean(PALAdminConstants.FORCE_UNIQUE_EMAIL))
{
boolean emailExistsFlag = true;
User user = null;
try
{
- user = PortalComponentUtil.getPortalAdministration()
- .lookupUserFromEmail(
- page.getUserBusinessInfoOnlineEmail());
+ user = PortalComponentUtil.getPortalAdministration().lookupUserFromEmail(page.getUserBusinessInfoOnlineEmail());
}
catch (AdministrationEmailException e)
{
@@ -108,33 +103,28 @@
}
if ((emailExistsFlag) || (user != null))
{
- throw new CommonException("error.email_already_exists",
- "The email already exists.");
+ throw new CommonException("error.email_already_exists", "The email already exists.");
}
}
- if (UserRegistrationUtil
- .getBoolean(PALAdminConstants.FORCE_GENERATED_PASSWORD))
+ if (UserRegistrationUtil.getBoolean(PALAdminConstants.FORCE_GENERATED_PASSWORD))
{
try
{
- String password = PortalComponentUtil.getPortalAdministration()
- .generatePassword();
+ String password = PortalComponentUtil.getPortalAdministration().generatePassword();
page.setPassword(password);
}
catch (Exception e)
{
- throw new CommonException("error.failed_to_add",
- "Could not create password.", e);
+ throw new CommonException("error.failed_to_add", "Could not create password.", e);
}
}
else
{
if (!page.getPassword().equals(page.getVerifyPassword()))
{
- throw new CommonException("error.two_passwords_do_not_match",
- "Two passwords do not match.");
+ throw new CommonException("error.two_passwords_do_not_match", "Two passwords do not match.");
}
}
@@ -143,24 +133,15 @@
try
{
- PortalComponentUtil.getPortalAdministration()
- .registerUser(
- page.getUserName(),
- page.getPassword(),
- UserRegistrationUtil
- .getStringList(PALAdminConstants.ROLES),
- UserRegistrationUtil
- .getStringList(PALAdminConstants.GROUPS),
- userInfo, // note use of only
- // PLT.D values here.
- UserRegistrationUtil
- .getStringMap(PALAdminConstants.RULES),
- null); // passing in null causes use of default
+ PortalComponentUtil.getPortalAdministration().registerUser(page.getUserName(), page.getPassword(),
+ UserRegistrationUtil.getStringList(PALAdminConstants.ROLES),
+ UserRegistrationUtil.getStringList(PALAdminConstants.GROUPS), userInfo, // note use of only
+ // PLT.D values here.
+ UserRegistrationUtil.getStringMap(PALAdminConstants.RULES), null); // passing in null causes use of default
}
catch (RegistrationException e)
{
- throw new CommonException("error.failed_to_add",
- "Could not register a user.", e);
+ throw new CommonException("error.failed_to_add", "Could not register a user.", e);
}
// template
@@ -168,9 +149,7 @@
if (templ == null)
{
- throw new CommonException(
- "error.registration_completed_but_could_not_send",
- "Email template is not available.");
+ throw new CommonException("error.registration_completed_but_could_not_send", "Email template is not available.");
}
if (UserRegistrationUtil.getBoolean(PALAdminConstants.SEND_MAIL))
@@ -183,43 +162,35 @@
try
{
PortalComponentUtil.getPortalAdministration().sendEmail(
- (PortletConfig) page.getFacesContext()
- .getExternalContext().getRequestMap().get(
- "javax.portlet.PortletConfig"),
- page.getUserBusinessInfoOnlineEmail(),
- getUserRegistrationEmailSubject(page.getLabelHelper()),
- templ, userInfo);
+ (PortletConfig) page.getFacesContext().getExternalContext().getRequestMap().get(
+ "javax.portlet.PortletConfig"), page.getUserBusinessInfoOnlineEmail(),
+ getUserRegistrationEmailSubject(page.getLabelHelper()), templ, userInfo);
}
catch (AdministrationEmailException e)
{
- throw new CommonException(
- "error.registration_completed_but_could_not_send",
- "Could not send a registration mail.", e);
+ throw new CommonException("error.registration_completed_but_could_not_send", "Could not send a registration mail.",
+ e);
}
}
}
- public void sendNewPassword(ForgottenPasswordPage page)
- throws CommonException
+ public void sendNewPassword(ForgottenPasswordPage page) throws CommonException
{
User user = null;
try
{
- user = PortalComponentUtil.getPortalAdministration()
- .lookupUserFromEmail(page.getEmail());
+ user = PortalComponentUtil.getPortalAdministration().lookupUserFromEmail(page.getEmail());
}
catch (Exception e)
{
- throw new CommonException("forgotten.email_address_not_found",
- "The email is not found..", e);
+ throw new CommonException("forgotten.email_address_not_found", "The email is not found..", e);
}
String userName = getUserName(user);
- String newPassword = PortalComponentUtil.getPortalAdministration()
- .generatePassword();
+ String newPassword = PortalComponentUtil.getPortalAdministration().generatePassword();
Map userAttributes = new HashMap();
try
@@ -238,15 +209,13 @@
}
catch (BackingStoreException e)
{
- throw new CommonException("failed_to_send",
- "Could not access preferences. ", e);
+ throw new CommonException("failed_to_send", "Could not access preferences. ", e);
}
String urlGUID = makeGUID(userName, newPassword);
// special attributes
- userAttributes.put(CTX_RETURN_URL, generateReturnURL(page
- .getFacesContext(), urlGUID));
+ userAttributes.put(CTX_RETURN_URL, generateReturnURL(page.getFacesContext(), urlGUID));
userAttributes.put(CTX_NEW_PASSWORD, newPassword);
userAttributes.put(CTX_USER_NAME, userName);
@@ -254,25 +223,18 @@
if (templ == null)
{
- throw new CommonException("failed_to_send",
- "Email template is not available.");
+ throw new CommonException("failed_to_send", "Email template is not available.");
}
try
{
- PortalComponentUtil.getPortalAdministration()
- .sendEmail(
- (PortletConfig) page.getFacesContext()
- .getExternalContext().getRequestMap().get(
- "javax.portlet.PortletConfig"),
- page.getEmail(),
- getForgottenPasswordEmailSubject(page
- .getLabelHelper()), templ, userAttributes);
+ PortalComponentUtil.getPortalAdministration().sendEmail(
+ (PortletConfig) page.getFacesContext().getExternalContext().getRequestMap().get("javax.portlet.PortletConfig"),
+ page.getEmail(), getForgottenPasswordEmailSubject(page.getLabelHelper()), templ, userAttributes);
}
catch (AdministrationEmailException e)
{
- throw new CommonException("failed_to_send",
- "Could not send a mail.", e);
+ throw new CommonException("failed_to_send", "Could not send a mail.", e);
}
//TODO this is currently hacked with a hashmap... needs to move to either a DB table
@@ -280,19 +242,16 @@
Map map = new HashMap();
map.put("user.name", userName);
map.put("password", newPassword);
- PortalComponentUtil.getPortalAdministration().putNewLoginInfo(urlGUID,
- map);
+ PortalComponentUtil.getPortalAdministration().putNewLoginInfo(urlGUID, map);
}
public void updatePassword(ResetPasswordPage page) throws CommonException
{
- Map map = PortalComponentUtil.getPortalAdministration()
- .getNewLoginInfo(page.getGuid());
+ Map map = PortalComponentUtil.getPortalAdministration().getNewLoginInfo(page.getGuid());
if (map == null)
{
- throw new CommonException("forgotten.unable_to_update_pw",
- "The login info is null. ");
+ throw new CommonException("forgotten.unable_to_update_pw", "The login info is null. ");
}
String userName = (String) map.get("user.name");
String newPassword = (String) map.get("password");
@@ -300,49 +259,39 @@
// Here's where a break should be. The following code should be put into the RETURN portlet
try
{
- PortalComponentUtil.getUserManager().setPassword(userName, null,
- newPassword);
- PortalComponentUtil.getUserManager().setPasswordUpdateRequired(
- userName, true);
+ PortalComponentUtil.getUserManager().setPassword(userName, null, newPassword);
+ PortalComponentUtil.getUserManager().setPasswordUpdateRequired(userName, true);
}
catch (SecurityException e)
{
- throw new CommonException("forgotten.unable_to_update_pw",
- "Could not update a password.", e);
+ throw new CommonException("forgotten.unable_to_update_pw", "Could not update a password.", e);
}
// if we got here stuff is changed... removed the key from the map
- PortalComponentUtil.getPortalAdministration().removeNewLoginInfo(
- page.getGuid());
+ PortalComponentUtil.getPortalAdministration().removeNewLoginInfo(page.getGuid());
}
protected String getTemplatePath(FacesContext facesContext)
{
- JetspeedTemplateLocator templateLocator = UserRegistrationUtil
- .getTemplateLocator();
- String templateLocation = UserRegistrationUtil
- .getString(PALAdminConstants.EMAIL_TEMPLATE_LOCATION);
- String templateName = UserRegistrationUtil
- .getString(PALAdminConstants.EMAIL_TEMPLATE_NAME);
+ JetspeedTemplateLocator templateLocator = UserRegistrationUtil.getTemplateLocator();
+ String templateLocation = UserRegistrationUtil.getString(PALAdminConstants.EMAIL_TEMPLATE_LOCATION);
+ String templateName = UserRegistrationUtil.getString(PALAdminConstants.EMAIL_TEMPLATE_NAME);
if (templateLocator == null)
{
return templateLocation + PATH_SEPARATOR + templateName;
}
- RequestContext requestContext = (RequestContext) facesContext
- .getExternalContext().getRequestMap().get(
- PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
+ RequestContext requestContext = (RequestContext) facesContext.getExternalContext().getRequestMap().get(
+ PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
Locale locale = facesContext.getViewRoot().getLocale();
try
{
- LocatorDescriptor locator = templateLocator
- .createLocatorDescriptor("email");
+ LocatorDescriptor locator = templateLocator.createLocatorDescriptor("email");
locator.setName(templateName);
locator.setMediaType(requestContext.getMediaType());
locator.setLanguage(locale.getLanguage());
locator.setCountry(locale.getCountry());
- TemplateDescriptor template = templateLocator
- .locateTemplate(locator);
+ TemplateDescriptor template = templateLocator.locateTemplate(locator);
return template.getAppRelativePath();
}
@@ -354,8 +303,7 @@
protected String getUserRegistrationEmailSubject(LabelHelper labelHelper)
{
- String emailSubject = labelHelper
- .getLabelValue(EMAIL_SUBJECT_USER_REGISTRATION);
+ String emailSubject = labelHelper.getLabelValue(EMAIL_SUBJECT_USER_REGISTRATION);
if (emailSubject == null)
emailSubject = "Registration Confirmation";
return emailSubject;
@@ -363,8 +311,7 @@
protected String getForgottenPasswordEmailSubject(LabelHelper labelHelper)
{
- String emailSubject = labelHelper
- .getLabelValue(EMAIL_SUBJECT_FORGOTTEN_PASSWORD);
+ String emailSubject = labelHelper.getLabelValue(EMAIL_SUBJECT_FORGOTTEN_PASSWORD);
if (emailSubject == null)
emailSubject = "Password Notification";
return emailSubject;
@@ -400,16 +347,11 @@
protected String generateReturnURL(FacesContext facesContext, String urlGUID)
{
- String fullPath = UserRegistrationUtil
- .getString(PALAdminConstants.RETURN_PATH)
- + "?guid=" + urlGUID;
+ String fullPath = UserRegistrationUtil.getString(PALAdminConstants.RETURN_PATH) + "?guid=" + urlGUID;
// NOTE: getPortalURL will encode the fullPath for us
- String url = PortalComponentUtil.getPortalAdministration()
- .getPortalURL(
- (PortletRequest) facesContext.getExternalContext()
- .getRequest(),
- (PortletResponse) facesContext.getExternalContext()
- .getResponse(), fullPath);
+ String url = PortalComponentUtil.getPortalAdministration().getPortalURL(
+ (PortletRequest) facesContext.getExternalContext().getRequest(),
+ (PortletResponse) facesContext.getExternalContext().getResponse(), fullPath);
return url;
}
@@ -419,8 +361,7 @@
if (page.getUserBusinessInfoOnlineEmail() != null)
{
- userInfo.put("user.business-info.online.email", page
- .getUserBusinessInfoOnlineEmail());
+ userInfo.put("user.business-info.online.email", page.getUserBusinessInfoOnlineEmail());
}
if (page.getUserName() != null)
{
@@ -472,290 +413,270 @@
}
if (page.getUserHomeInfoPostalName() != null)
{
- userInfo.put("user.home-info.postal.name", page
- .getUserHomeInfoPostalName());
+ userInfo.put("user.home-info.postal.name", page.getUserHomeInfoPostalName());
}
if (page.getUserHomeInfoPostalStreet() != null)
{
- userInfo.put("user.home-info.postal.street", page
- .getUserHomeInfoPostalStreet());
+ userInfo.put("user.home-info.postal.street", page.getUserHomeInfoPostalStreet());
}
if (page.getUserHomeInfoPostalCity() != null)
{
- userInfo.put("user.home-info.postal.city", page
- .getUserHomeInfoPostalCity());
+ userInfo.put("user.home-info.postal.city", page.getUserHomeInfoPostalCity());
}
if (page.getUserHomeInfoPostalStateprov() != null)
{
- userInfo.put("user.home-info.postal.stateprov", page
- .getUserHomeInfoPostalStateprov());
+ userInfo.put("user.home-info.postal.stateprov", page.getUserHomeInfoPostalStateprov());
}
if (page.getUserHomeInfoPostalPostalcode() != null)
{
- userInfo.put("user.home-info.postal.postalcode", page
- .getUserHomeInfoPostalPostalcode());
+ userInfo.put("user.home-info.postal.postalcode", page.getUserHomeInfoPostalPostalcode());
}
if (page.getUserHomeInfoPostalCountry() != null)
{
- userInfo.put("user.home-info.postal.country", page
- .getUserHomeInfoPostalCountry());
+ userInfo.put("user.home-info.postal.country", page.getUserHomeInfoPostalCountry());
}
if (page.getUserHomeInfoPostalOrganization() != null)
{
- userInfo.put("user.home-info.postal.organization", page
- .getUserHomeInfoPostalOrganization());
+ userInfo.put("user.home-info.postal.organization", page.getUserHomeInfoPostalOrganization());
}
if (page.getUserHomeInfoTelecomTelephoneIntcode() != null)
{
- userInfo.put("user.home-info.telecom.telephone.intcode", page
- .getUserHomeInfoTelecomTelephoneIntcode());
+ userInfo.put("user.home-info.telecom.telephone.intcode", page.getUserHomeInfoTelecomTelephoneIntcode());
}
if (page.getUserHomeInfoTelecomTelephoneLoccode() != null)
{
- userInfo.put("user.home-info.telecom.telephone.loccode", page
- .getUserHomeInfoTelecomTelephoneLoccode());
+ userInfo.put("user.home-info.telecom.telephone.loccode", page.getUserHomeInfoTelecomTelephoneLoccode());
}
if (page.getUserHomeInfoTelecomTelephoneNumber() != null)
{
- userInfo.put("user.home-info.telecom.telephone.number", page
- .getUserHomeInfoTelecomTelephoneNumber());
+ userInfo.put("user.home-info.telecom.telephone.number", page.getUserHomeInfoTelecomTelephoneNumber());
}
if (page.getUserHomeInfoTelecomTelephoneExt() != null)
{
- userInfo.put("user.home-info.telecom.telephone.ext", page
- .getUserHomeInfoTelecomTelephoneExt());
+ userInfo.put("user.home-info.telecom.telephone.ext", page.getUserHomeInfoTelecomTelephoneExt());
}
if (page.getUserHomeInfoTelecomTelephoneComment() != null)
{
- userInfo.put("user.home-info.telecom.telephone.comment", page
- .getUserHomeInfoTelecomTelephoneComment());
+ userInfo.put("user.home-info.telecom.telephone.comment", page.getUserHomeInfoTelecomTelephoneComment());
}
if (page.getUserHomeInfoTelecomFaxIntcode() != null)
{
- userInfo.put("user.home-info.telecom.fax.intcode", page
- .getUserHomeInfoTelecomFaxIntcode());
+ userInfo.put("user.home-info.telecom.fax.intcode", page.getUserHomeInfoTelecomFaxIntcode());
}
if (page.getUserHomeInfoTelecomFaxLoccode() != null)
{
- userInfo.put("user.home-info.telecom.fax.loccode", page
- .getUserHomeInfoTelecomFaxLoccode());
+ userInfo.put("user.home-info.telecom.fax.loccode", page.getUserHomeInfoTelecomFaxLoccode());
}
if (page.getUserHomeInfoTelecomFaxNumber() != null)
{
- userInfo.put("user.home-info.telecom.fax.number", page
- .getUserHomeInfoTelecomFaxNumber());
+ userInfo.put("user.home-info.telecom.fax.number", page.getUserHomeInfoTelecomFaxNumber());
}
if (page.getUserHomeInfoTelecomFaxExt() != null)
{
- userInfo.put("user.home-info.telecom.fax.ext", page
- .getUserHomeInfoTelecomFaxExt());
+ userInfo.put("user.home-info.telecom.fax.ext", page.getUserHomeInfoTelecomFaxExt());
}
if (page.getUserHomeInfoTelecomFaxComment() != null)
{
- userInfo.put("user.home-info.telecom.fax.comment", page
- .getUserHomeInfoTelecomFaxComment());
+ userInfo.put("user.home-info.telecom.fax.comment", page.getUserHomeInfoTelecomFaxComment());
}
if (page.getUserHomeInfoTelecomMobileIntcode() != null)
{
- userInfo.put("user.home-info.telecom.mobile.intcode", page
- .getUserHomeInfoTelecomMobileIntcode());
+ userInfo.put("user.home-info.telecom.mobile.intcode", page.getUserHomeInfoTelecomMobileIntcode());
}
if (page.getUserHomeInfoTelecomMobileLoccode() != null)
{
- userInfo.put("user.home-info.telecom.mobile.loccode", page
- .getUserHomeInfoTelecomMobileLoccode());
+ userInfo.put("user.home-info.telecom.mobile.loccode", page.getUserHomeInfoTelecomMobileLoccode());
}
if (page.getUserHomeInfoTelecomMobileNumber() != null)
{
- userInfo.put("user.home-info.telecom.mobile.number", page
- .getUserHomeInfoTelecomMobileNumber());
+ userInfo.put("user.home-info.telecom.mobile.number", page.getUserHomeInfoTelecomMobileNumber());
}
if (page.getUserHomeInfoTelecomMobileExt() != null)
{
- userInfo.put("user.home-info.telecom.mobile.ext", page
- .getUserHomeInfoTelecomMobileExt());
+ userInfo.put("user.home-info.telecom.mobile.ext", page.getUserHomeInfoTelecomMobileExt());
}
if (page.getUserHomeInfoTelecomMobileComment() != null)
{
- userInfo.put("user.home-info.telecom.mobile.comment", page
- .getUserHomeInfoTelecomMobileComment());
+ userInfo.put("user.home-info.telecom.mobile.comment", page.getUserHomeInfoTelecomMobileComment());
}
if (page.getUserHomeInfoTelecomPagerIntcode() != null)
{
- userInfo.put("user.home-info.telecom.pager.intcode", page
- .getUserHomeInfoTelecomPagerIntcode());
+ userInfo.put("user.home-info.telecom.pager.intcode", page.getUserHomeInfoTelecomPagerIntcode());
}
if (page.getUserHomeInfoTelecomPagerLoccode() != null)
{
- userInfo.put("user.home-info.telecom.pager.loccode", page
- .getUserHomeInfoTelecomPagerLoccode());
+ userInfo.put("user.home-info.telecom.pager.loccode", page.getUserHomeInfoTelecomPagerLoccode());
}
if (page.getUserHomeInfoTelecomPagerNumber() != null)
{
- userInfo.put("user.home-info.telecom.pager.number", page
- .getUserHomeInfoTelecomPagerNumber());
+ userInfo.put("user.home-info.telecom.pager.number", page.getUserHomeInfoTelecomPagerNumber());
}
if (page.getUserHomeInfoTelecomPagerExt() != null)
{
- userInfo.put("user.home-info.telecom.pager.ext", page
- .getUserHomeInfoTelecomPagerExt());
+ userInfo.put("user.home-info.telecom.pager.ext", page.getUserHomeInfoTelecomPagerExt());
}
if (page.getUserHomeInfoTelecomPagerComment() != null)
{
- userInfo.put("user.home-info.telecom.pager.comment", page
- .getUserHomeInfoTelecomPagerComment());
+ userInfo.put("user.home-info.telecom.pager.comment", page.getUserHomeInfoTelecomPagerComment());
}
if (page.getUserHomeInfoOnlineEmail() != null)
{
- userInfo.put("user.home-info.online.email", page
- .getUserHomeInfoOnlineEmail());
+ userInfo.put("user.home-info.online.email", page.getUserHomeInfoOnlineEmail());
}
if (page.getUserHomeInfoOnlineUri() != null)
{
- userInfo.put("user.home-info.online.uri", page
- .getUserHomeInfoOnlineUri());
+ userInfo.put("user.home-info.online.uri", page.getUserHomeInfoOnlineUri());
}
if (page.getUserBusinessInfoPostalName() != null)
{
- userInfo.put("user.business-info.postal.name", page
- .getUserBusinessInfoPostalName());
+ userInfo.put("user.business-info.postal.name", page.getUserBusinessInfoPostalName());
}
if (page.getUserBusinessInfoPostalStreet() != null)
{
- userInfo.put("user.business-info.postal.street", page
- .getUserBusinessInfoPostalStreet());
+ userInfo.put("user.business-info.postal.street", page.getUserBusinessInfoPostalStreet());
}
if (page.getUserBusinessInfoPostalCity() != null)
{
- userInfo.put("user.business-info.postal.city", page
- .getUserBusinessInfoPostalCity());
+ userInfo.put("user.business-info.postal.city", page.getUserBusinessInfoPostalCity());
}
if (page.getUserBusinessInfoPostalStateprov() != null)
{
- userInfo.put("user.business-info.postal.stateprov", page
- .getUserBusinessInfoPostalStateprov());
+ userInfo.put("user.business-info.postal.stateprov", page.getUserBusinessInfoPostalStateprov());
}
if (page.getUserBusinessInfoPostalPostalcode() != null)
{
- userInfo.put("user.business-info.postal.postalcode", page
- .getUserBusinessInfoPostalPostalcode());
+ userInfo.put("user.business-info.postal.postalcode", page.getUserBusinessInfoPostalPostalcode());
}
if (page.getUserBusinessInfoPostalCountry() != null)
{
- userInfo.put("user.business-info.postal.country", page
- .getUserBusinessInfoPostalCountry());
+ userInfo.put("user.business-info.postal.country", page.getUserBusinessInfoPostalCountry());
}
if (page.getUserBusinessInfoPostalOrganization() != null)
{
- userInfo.put("user.business-info.postal.organization", page
- .getUserBusinessInfoPostalOrganization());
+ userInfo.put("user.business-info.postal.organization", page.getUserBusinessInfoPostalOrganization());
}
if (page.getUserBusinessInfoTelecomTelephoneIntcode() != null)
{
- userInfo.put("user.business-info.telecom.telephone.intcode", page
- .getUserBusinessInfoTelecomTelephoneIntcode());
+ userInfo.put("user.business-info.telecom.telephone.intcode", page.getUserBusinessInfoTelecomTelephoneIntcode());
}
if (page.getUserBusinessInfoTelecomTelephoneLoccode() != null)
{
- userInfo.put("user.business-info.telecom.telephone.loccode", page
- .getUserBusinessInfoTelecomTelephoneLoccode());
+ userInfo.put("user.business-info.telecom.telephone.loccode", page.getUserBusinessInfoTelecomTelephoneLoccode());
}
if (page.getUserBusinessInfoTelecomTelephoneNumber() != null)
{
- userInfo.put("user.business-info.telecom.telephone.number", page
- .getUserBusinessInfoTelecomTelephoneNumber());
+ userInfo.put("user.business-info.telecom.telephone.number", page.getUserBusinessInfoTelecomTelephoneNumber());
}
if (page.getUserBusinessInfoTelecomTelephoneExt() != null)
{
- userInfo.put("user.business-info.telecom.telephone.ext", page
- .getUserBusinessInfoTelecomTelephoneExt());
+ userInfo.put("user.business-info.telecom.telephone.ext", page.getUserBusinessInfoTelecomTelephoneExt());
}
if (page.getUserBusinessInfoTelecomTelephoneComment() != null)
{
- userInfo.put("user.business-info.telecom.telephone.comment", page
- .getUserBusinessInfoTelecomTelephoneComment());
+ userInfo.put("user.business-info.telecom.telephone.comment", page.getUserBusinessInfoTelecomTelephoneComment());
}
if (page.getUserBusinessInfoTelecomFaxIntcode() != null)
{
- userInfo.put("user.business-info.telecom.fax.intcode", page
- .getUserBusinessInfoTelecomFaxIntcode());
+ userInfo.put("user.business-info.telecom.fax.intcode", page.getUserBusinessInfoTelecomFaxIntcode());
}
if (page.getUserBusinessInfoTelecomFaxLoccode() != null)
{
- userInfo.put("user.business-info.telecom.fax.loccode", page
- .getUserBusinessInfoTelecomFaxLoccode());
+ userInfo.put("user.business-info.telecom.fax.loccode", page.getUserBusinessInfoTelecomFaxLoccode());
}
if (page.getUserBusinessInfoTelecomFaxNumber() != null)
{
- userInfo.put("user.business-info.telecom.fax.number", page
- .getUserBusinessInfoTelecomFaxNumber());
+ userInfo.put("user.business-info.telecom.fax.number", page.getUserBusinessInfoTelecomFaxNumber());
}
if (page.getUserBusinessInfoTelecomFaxExt() != null)
{
- userInfo.put("user.business-info.telecom.fax.ext", page
- .getUserBusinessInfoTelecomFaxExt());
+ userInfo.put("user.business-info.telecom.fax.ext", page.getUserBusinessInfoTelecomFaxExt());
}
if (page.getUserBusinessInfoTelecomFaxComment() != null)
{
- userInfo.put("user.business-info.telecom.fax.comment", page
- .getUserBusinessInfoTelecomFaxComment());
+ userInfo.put("user.business-info.telecom.fax.comment", page.getUserBusinessInfoTelecomFaxComment());
}
if (page.getUserBusinessInfoTelecomMobileIntcode() != null)
{
- userInfo.put("user.business-info.telecom.mobile.intcode", page
- .getUserBusinessInfoTelecomMobileIntcode());
+ userInfo.put("user.business-info.telecom.mobile.intcode", page.getUserBusinessInfoTelecomMobileIntcode());
}
if (page.getUserBusinessInfoTelecomMobileLoccode() != null)
{
- userInfo.put("user.business-info.telecom.mobile.loccode", page
- .getUserBusinessInfoTelecomMobileLoccode());
+ userInfo.put("user.business-info.telecom.mobile.loccode", page.getUserBusinessInfoTelecomMobileLoccode());
}
if (page.getUserBusinessInfoTelecomMobileNumber() != null)
{
- userInfo.put("user.business-info.telecom.mobile.number", page
- .getUserBusinessInfoTelecomMobileNumber());
+ userInfo.put("user.business-info.telecom.mobile.number", page.getUserBusinessInfoTelecomMobileNumber());
}
if (page.getUserBusinessInfoTelecomMobileExt() != null)
{
- userInfo.put("user.business-info.telecom.mobile.ext", page
- .getUserBusinessInfoTelecomMobileExt());
+ userInfo.put("user.business-info.telecom.mobile.ext", page.getUserBusinessInfoTelecomMobileExt());
}
if (page.getUserBusinessInfoTelecomMobileComment() != null)
{
- userInfo.put("user.business-info.telecom.mobile.comment", page
- .getUserBusinessInfoTelecomMobileComment());
+ userInfo.put("user.business-info.telecom.mobile.comment", page.getUserBusinessInfoTelecomMobileComment());
}
if (page.getUserBusinessInfoTelecomPagerIntcode() != null)
{
- userInfo.put("user.business-info.telecom.pager.intcode", page
- .getUserBusinessInfoTelecomPagerIntcode());
+ userInfo.put("user.business-info.telecom.pager.intcode", page.getUserBusinessInfoTelecomPagerIntcode());
}
if (page.getUserBusinessInfoTelecomPagerLoccode() != null)
{
- userInfo.put("user.business-info.telecom.pager.loccode", page
- .getUserBusinessInfoTelecomPagerLoccode());
+ userInfo.put("user.business-info.telecom.pager.loccode", page.getUserBusinessInfoTelecomPagerLoccode());
}
if (page.getUserBusinessInfoTelecomPagerNumber() != null)
{
- userInfo.put("user.business-info.telecom.pager.number", page
- .getUserBusinessInfoTelecomPagerNumber());
+ userInfo.put("user.business-info.telecom.pager.number", page.getUserBusinessInfoTelecomPagerNumber());
}
if (page.getUserBusinessInfoTelecomPagerExt() != null)
{
- userInfo.put("user.business-info.telecom.pager.ext", page
- .getUserBusinessInfoTelecomPagerExt());
+ userInfo.put("user.business-info.telecom.pager.ext", page.getUserBusinessInfoTelecomPagerExt());
}
if (page.getUserBusinessInfoTelecomPagerComment() != null)
{
- userInfo.put("user.business-info.telecom.pager.comment", page
- .getUserBusinessInfoTelecomPagerComment());
+ userInfo.put("user.business-info.telecom.pager.comment", page.getUserBusinessInfoTelecomPagerComment());
}
if (page.getUserBusinessInfoOnlineUri() != null)
{
- userInfo.put("user.business-info.online.uri", page
- .getUserBusinessInfoOnlineUri());
+ userInfo.put("user.business-info.online.uri", page.getUserBusinessInfoOnlineUri());
}
+ if (page instanceof PublicPortalRegistrationPage)
+ {
+ PublicPortalRegistrationPage p = (PublicPortalRegistrationPage) page;
+ if (p.getUserBdateYear() != null)
+ {
+ userInfo.put("user.bdate.year", p.getUserBdateYear().toString());
+ }
+ if (p.getUserBdateMonth() != null)
+ {
+ userInfo.put("user.bdate.month", p.getUserBdateMonth().toString());
+ }
+ if (p.getUserBdateDate() != null)
+ {
+ userInfo.put("user.bdate.date", p.getUserBdateDate().toString());
+ }
+ if (p.getUserIndustry() != null)
+ {
+ userInfo.put("user.industry", p.getUserIndustry());
+ }
+ if (p.getUserSecretQuestion() != null)
+ {
+ userInfo.put("user.secret.question", p.getUserSecretQuestion());
+ }
+ if (p.getUserSecretAnswer() != null)
+ {
+ userInfo.put("user.secret.answer", p.getUserSecretAnswer());
+ }
+ if (p.getUserNameGivenYomi() != null)
+ {
+ userInfo.put("user.name.given.yomi", p.getUserNameGivenYomi());
+ }
+ if (p.getUserNameFamilyYomi() != null)
+ {
+ userInfo.put("user.name.family.yomi", p.getUserNameFamilyYomi());
+ }
+
+ }
return userInfo;
}
}
Added: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationCompletedPage.java
===================================================================
--- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationCompletedPage.java 2007-06-20 08:59:11 UTC (rev 187)
+++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationCompletedPage.java 2007-06-21 04:37:53 UTC (rev 188)
@@ -0,0 +1,16 @@
+package jp.sf.pal.admin.web.registration;
+
+public class PublicPortalRegistrationCompletedPage
+{
+
+ public String initialize()
+ {
+ return null;
+ }
+
+ public String prerender()
+ {
+ return null;
+ }
+
+}
Property changes on: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationCompletedPage.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationPage.java
===================================================================
--- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationPage.java 2007-06-20 08:59:11 UTC (rev 187)
+++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationPage.java 2007-06-21 04:37:53 UTC (rev 188)
@@ -0,0 +1,239 @@
+package jp.sf.pal.admin.web.registration;
+
+import java.io.Serializable;
+
+import javax.faces.internal.FacesMessageUtil;
+
+import org.seasar.framework.log.Logger;
+import org.seasar.teeda.extension.annotation.validator.Length;
+
+import jp.sf.pal.admin.PALAdminConstants;
+import jp.sf.pal.admin.util.UserRegistrationUtil;
+import jp.sf.pal.common.CommonException;
+
+public class PublicPortalRegistrationPage extends UserRegistrationPage implements Serializable
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 8681176430915097393L;
+
+ /**
+ * Logger for this class
+ */
+ private static final Logger logger = Logger.getLogger(PublicPortalRegistrationPage.class);
+
+ public static final String userName_TRequiredValidator = null;
+
+ public static final String userName_lengthValidator = "minimum=6, maximum=32";
+
+ public static final String userNameFamily_TRequiredValidator = null;
+
+ public static final String userNameFamily_lengthValidator = " maximum=30";
+
+ public static final String userNameGiven_TRequiredValidator = null;
+
+ public static final String userNameGiven_lengthValidator = "maximum=30";
+
+ public static final String userNameFamilyYomi_TRequiredValidator = null;
+
+ public static final String userNameFamilyYomi_lengthValidator = " maximum=30";
+
+ public static final String userNameGivenYomi_TRequiredValidator = null;
+
+ public static final String userNameGivenYomi_lengthValidator = "maximum=30";
+
+ public static final String userHomeInfoPostalPostalcode_TRequiredValidator = null;
+
+ public static final String userHomeInfoPostalPostalcode_lengthValidator = "maximum=8";
+
+ public static final String userGender_TRequiredValidator = null;
+
+ public static final String userBdateYear_TRequiredValidator = null;
+
+ public static final String userBdateYear_TNumberLengthValidator = "integralMax=4";
+
+ public static final String userBdateMonth_TRequiredValidator = null;
+
+ public static final String userBdateMonth_TNumberLengthValidator = "integralMax=2";
+
+ public static final String userBdateDate_TRequiredValidator = null;
+
+ public static final String userBdateDate_TNumberLengthValidator = "integralMax=2";
+
+ public static final String userBusinessInfoOnlineEmail_TRequiredValidator = null;
+
+ public static final String userIndustry_TRequiredValidator = null;
+
+ public static final String userJobtitle_TRequiredValidator = null;
+
+ public static final String userSecretQuestion_TRequiredValidator = null;
+
+ public static final String userSecretQuestion_lengthValidator = "maximum=100";
+
+ public static final String userSecretAnswer_TRequiredValidator = null;
+
+ public static final String userSecretAnswer_lengthValidator = "maximum=100";
+
+ private String userNameFamilyYomi;
+
+ private String userNameGivenYomi;
+
+ private String termOfService;
+
+ private Integer userBdateDate;
+
+ private Integer userBdateMonth;
+
+ private Integer userBdateYear;
+
+ private String userIndustry;
+
+ private String userSecretAnswer;
+
+ private String userSecretQuestion;
+
+ public String getTermOfService()
+ {
+ return termOfService;
+ }
+
+ public void setTermOfService(String termOfService)
+ {
+ this.termOfService = termOfService;
+ }
+
+ public Integer getUserBdateDate()
+ {
+ return userBdateDate;
+ }
+
+ public void setUserBdateDate(Integer userBdateDate)
+ {
+ this.userBdateDate = userBdateDate;
+ }
+
+ public Integer getUserBdateMonth()
+ {
+ return userBdateMonth;
+ }
+
+ public void setUserBdateMonth(Integer userBdateMonth)
+ {
+ this.userBdateMonth = userBdateMonth;
+ }
+
+ public Integer getUserBdateYear()
+ {
+ return userBdateYear;
+ }
+
+ public void setUserBdateYear(Integer userBdateYear)
+ {
+ this.userBdateYear = userBdateYear;
+ }
+
+ public String getUserIndustry()
+ {
+ return userIndustry;
+ }
+
+ public void setUserIndustry(String userIndustry)
+ {
+ this.userIndustry = userIndustry;
+ }
+
+ public String getUserSecretAnswer()
+ {
+ return userSecretAnswer;
+ }
+
+ public void setUserSecretAnswer(String userSecretAnswer)
+ {
+ this.userSecretAnswer = userSecretAnswer;
+ }
+
+ public String getUserSecretQuestion()
+ {
+ return userSecretQuestion;
+ }
+
+ public void setUserSecretQuestion(String userSecretQuestion)
+ {
+ this.userSecretQuestion = userSecretQuestion;
+ }
+
+ public Class doFinish()
+ {
+ if (getUserBusinessInfoOnlineEmail() != null)
+ {
+ setUserHomeInfoOnlineEmail(getUserBusinessInfoOnlineEmail());
+ }
+
+ try
+ {
+ getUserRegistrationService().register(this);
+ if (UserRegistrationUtil.getBoolean(PALAdminConstants.SEND_MAIL))
+ {
+ FacesMessageUtil.addInfoMessage("success.check_your_email");
+ return PublicPortalRegistrationCompletedPage.class;
+ }
+ else
+ {
+ FacesMessageUtil.addInfoMessage("success.login_above");
+ }
+ }
+ catch (CommonException e)
+ {
+ FacesMessageUtil.addErrorMessage(e.getMessageId());
+ logger.log("EPA0001", new Object[] { this.toString() }, e);
+
+ }
+
+ return null;
+ }
+
+ public String initialize()
+ {
+ return null;
+ }
+
+ public String prerender()
+ {
+ return null;
+ }
+
+ /**
+ * @return the userNameFamilyYomi
+ */
+ public String getUserNameFamilyYomi()
+ {
+ return userNameFamilyYomi;
+ }
+
+ /**
+ * @param userNameFamilyYomi the userNameFamilyYomi to set
+ */
+ public void setUserNameFamilyYomi(String userNameFamilyYomi)
+ {
+ this.userNameFamilyYomi = userNameFamilyYomi;
+ }
+
+ /**
+ * @return the userNameGivenYomi
+ */
+ public String getUserNameGivenYomi()
+ {
+ return userNameGivenYomi;
+ }
+
+ /**
+ * @param userNameGivenYomi the userNameGivenYomi to set
+ */
+ public void setUserNameGivenYomi(String userNameGivenYomi)
+ {
+ this.userNameGivenYomi = userNameGivenYomi;
+ }
+
+}
Property changes on: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationPage.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/UserRegistrationPage.java
===================================================================
--- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/UserRegistrationPage.java 2007-06-20 08:59:11 UTC (rev 187)
+++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/UserRegistrationPage.java 2007-06-21 04:37:53 UTC (rev 188)
@@ -1083,7 +1083,7 @@
}
@TakeOver(type = TakeOverType.NEVER)
- public String doFinish()
+ public Class doFinish()
{
try
{
Modified: pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label.properties
===================================================================
--- pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label.properties 2007-06-20 08:59:11 UTC (rev 187)
+++ pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label.properties 2007-06-21 04:37:53 UTC (rev 188)
@@ -82,3 +82,81 @@
RequestNewPassword=Request New Password
SignUp=Sign Up
+# Public Portal Registration
+publicPortalRegistration.requiredDescription=\u304c\u3064\u3044\u3066\u3044\u308b\u9805\u76ee\u306f\u304b\u306a\u3089\u305a\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002
+publicPortalRegistration.userIdTitle=\u30e6\u30fc\u30b6\u30fc ID \u306e\u5165\u529b
+publicPortalRegistration.typeUserId=\u3054\u5e0c\u671b\u306e\u30e6\u30fc\u30b6\u30fc ID \u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002
+publicPortalRegistration.userId=\u30e6\u30fc\u30b6\u30fc ID
+publicPortalRegistration.userIdCondition=\uff086\u301c32\u5b57\u306e\u534a\u89d2\u82f1\u6570\u5b57\uff09
+publicPortalRegistration.userIdExample=\uff08\u4f8b\uff1ahoge2000\u3001foo777\u306a\u3069\uff09
+publicPortalRegistration.userIdHint=\u30e6\u30fc\u30b6\u30fc ID \u306b\u95a2\u3059\u308b\u30d2\u30f3\u30c8
+publicPortalRegistration.userIdBeginWithAlphabet=\u6700\u521d\u306e\u6587\u5b57\u306f\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8
+publicPortalRegistration.underscoreAvailable=\u8a18\u53f7\u306f\u3001\u30a2\u30f3\u30c0\u30fc\u30d0\u30fc\uff08 _ \uff09\u306e\u307f\u4f7f\u7528\u53ef\u80fd\u3067\u3059
+publicPortalRegistration.userInfoTitle=\u304a\u5ba2\u69d8\u60c5\u5831\u306e\u5165\u529b
+publicPortalRegistration.typeUserInfo=\u30e6\u30fc\u30b6\u30fc ID \u3084\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u304a\u5fd8\u308c\u306e\u5834\u5408\u306b\u3001\u4ee5\u4e0b\u306e\u60c5\u5831\u3092\u5143\u306b\u672c\u4eba\u78ba\u8a8d\u3092\u884c\u3044\u307e\u3059\u3002\u6b63\u78ba\u306b\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002
+publicPortalRegistration.userHomeInfoPostalPostalcode=\u90f5\u4fbf\u756a\u53f7
+publicPortalRegistration.userHomeInfoPostalPostalcodeCondition=\uff08\u534a\u89d2\u6570\u5b57\uff17\u6841\uff09
+publicPortalRegistration.userHomeInfoPostalPostalcodeExample=\uff08\u4f8b\uff1a123-0001\u30011230001\uff09
+publicPortalRegistration.userGender=\u6027\u5225
+publicPortalRegistration.male=\u7537\u6027
+publicPortalRegistration.female=\u5973\u6027
+publicPortalRegistration.userBdate=\u751f\u5e74\u6708\u65e5
+publicPortalRegistration.userBdateYear=\u5e74
+publicPortalRegistration.userBdateMonth=\u6708
+publicPortalRegistration.userBdateDate=\u65e5
+publicPortalRegistration.userBusinessInfoOnlineEmail=\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9
+publicPortalRegistration.userBusinessInfoOnlineEmailCondition=\uff08\u534a\u89d2\uff09
+publicPortalRegistration.userIndustry=\u696d\u7a2e
+publicPortalRegistration.ComputerInternet=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u95a2\u4fc2\uff08\u7ba1\u7406/\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\uff09
+publicPortalRegistration.ComputerHardware=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u95a2\u4fc2\uff08\u30cf\u30fc\u30c9\u30a6\u30a8\u30a2\uff09
+publicPortalRegistration.ComputerSoftware=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u95a2\u4fc2\uff08\u30bd\u30d5\u30c8\u30a6\u30a8\u30a2\uff09
+publicPortalRegistration.Research=\u6559\u80b2/\u7814\u7a76
+publicPortalRegistration.Engineering=\u30a8\u30f3\u30b8\u30cb\u30a2/\u5efa\u7bc9
+publicPortalRegistration.Finance=\u9280\u884c/\u91d1\u878d/\u4e0d\u52d5\u7523
+publicPortalRegistration.Manufacturing=\u88fd\u9020/\u6d41\u901a
+publicPortalRegistration.Service=\u30b5\u30fc\u30d3\u30b9
+publicPortalRegistration.Healthcare=\u533b\u85ac/\u5065\u5eb7
+publicPortalRegistration.Publication=\u5a2f\u697d/\u30e1\u30c7\u30a3\u30a2/\u51fa\u7248
+publicPortalRegistration.Travel=\u65c5\u884c/\u63a5\u5ba2\u696d
+publicPortalRegistration.Retail=\u5c0f\u58f2/\u5378\u58f2
+publicPortalRegistration.Nonprofit=\u975e\u55b6\u5229\u56e3\u4f53
+publicPortalRegistration.Government=\u653f\u5e9c/\u81ea\u6cbb\u4f53
+publicPortalRegistration.Law=\u6cd5\u5f8b
+publicPortalRegistration.unemployedLabel=\u7121\u8077
+publicPortalRegistration.otherLabel=\u305d\u306e\u4ed6
+publicPortalRegistration.userJobtitle=\u8077\u7a2e
+publicPortalRegistration.Officer=\u5f79\u54e1/\u7ba1\u7406\u8077
+publicPortalRegistration.Specialist=\u5c02\u9580\u8077\uff08\u533b\u5e2b\u3001\u5f01\u8b77\u58eb\u7b49\uff09
+publicPortalRegistration.Teacher=\u6559\u54e1
+publicPortalRegistration.ComputerEngineer=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u95a2\u9023\u6280\u8853\u8005
+publicPortalRegistration.Engineer=\u305d\u306e\u4ed6\u6280\u8853\u8005
+publicPortalRegistration.Support=\u30b5\u30fc\u30d3\u30b9/\u30ab\u30b9\u30bf\u30de\u30fc\u30b5\u30dd\u30fc\u30c8
+publicPortalRegistration.Administrative=\u4e8b\u52d9\u8077
+publicPortalRegistration.Sales=\u55b6\u696d/\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0
+publicPortalRegistration.Salesclerk=\u8ca9\u58f2\u54e1
+publicPortalRegistration.Student=\u5927\u5b66\u751f/\u5927\u5b66\u9662\u751f
+publicPortalRegistration.Kid=\u5c0f/\u4e2d/\u9ad8\u6821\u751f
+publicPortalRegistration.Homemaker=\u4e3b\u5a66
+publicPortalRegistration.SelfEmployed=\u81ea\u55b6\u696d
+publicPortalRegistration.retirement=\u5b9a\u5e74\u9000\u8077\u8005
+publicPortalRegistration.userInfoHint=\u304a\u5ba2\u69d8\u60c5\u5831\u306b\u9593\u3059\u308b\u30d2\u30f3\u30c8
+publicPortalRegistration.liveInOversea=\u6d77\u5916\u5728\u4f4f\u306e\u65b9\u306f\u3001000-0000\u3068\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044
+publicPortalRegistration.bdataYearDescription=\u751f\u5e74\u6708\u65e5\u306e\u5e74\u306f\u897f\u66a6\u3067\u304a\u9858\u3044\u3057\u307e\u3059
+publicPortalRegistration.aboutEmail=\u767b\u9332\u3059\u308b\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306f\u3001\u30b5\u30fc\u30d3\u30b9\u3092\u5229\u7528\u3057\u3066\u3044\u305f\u3060\u304f\u4e0a\u3067\u3001\u91cd\u8981\u306a\u304a\u77e5\u3089\u305b\u306a\u3069\u3092\u304a\u9001\u308a\u3059\u308b\u305f\u3081\u306e\u300c\u767b\u9332\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u300d \u306b\u306a\u308a\u307e\u3059\u3002\u9023\u7d61\u53ef\u80fd\u306a\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044
+publicPortalRegistration.userSecretQATitle=\u79d8\u5bc6\u306e\u8cea\u554f\u3068\u7b54\u3048
+publicPortalRegistration.userSecretQADescription=\u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u767a\u884c\u306b\u5fc5\u8981\u306a\u60c5\u5831\u3067\u3059\u3002\u3042\u306a\u305f\u3057\u304b\u77e5\u3089\u306a\u3044\u8cea\u554f\u3068\u7b54\u3048\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002
+publicPortalRegistration.userSecretQuestion=\u79d8\u5bc6\u306e\u8cea\u554f
+publicPortalRegistration.userSecretAnswer=\u79d8\u5bc6\u306e\u7b54\u3048
+publicPortalRegistration.userSecretQAHint=\u79d8\u5bc6\u306e\u8cea\u554f\u3068\u7b54\u3048\u306b\u95a2\u3059\u308b\u30d2\u30f3\u30c8
+publicPortalRegistration.aboutCharacters=\u79d8\u5bc6\u306e\u7b54\u3048\u306f\u3001\u3072\u3089\u304c\u306a\u3001\u30ab\u30bf\u30ab\u30ca\u3001\u5927\u6587\u5b57\u3001\u5c0f\u6587\u5b57\u3001\u534a\u89d2\u3001\u5168\u89d2\u3067\u533a\u5225\u3055\u308c\u307e\u3059
+publicPortalRegistration.SignUp=\u5229\u7528\u898f\u7d04\u306b\u540c\u610f\u3057\u3066\u767b\u9332
+publicPortalRegistration.termOfService=\u5229\u7528\u898f\u7d04
+publicPortalRegistration.name=\u6c0f\u540d
+publicPortalRegistration.userNameFamily=\uff08\u59d3\uff09
+publicPortalRegistration.userNameGiven=\uff08\u540d\uff09
+publicPortalRegistration.nameYomi=\u6c0f\u540d(\u3075\u308a\u304c\u306a)
+publicPortalRegistration.userNameFamilyYomi=\uff08\u59d3\uff09
+publicPortalRegistration.userNameGivenYomi=\uff08\u540d\uff09
+publicPortalRegistrationCompleted.registAgain=\u518d\u5ea6\u3001\u30e6\u30fc\u30b6\u30fc\u3092\u767b\u9332\u3059\u308b\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002
+publicPortalRegistrationCompleted.registLink=\u30e6\u30fc\u30b6\u30fc\u767b\u9332
+
Modified: pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label_ja.properties
===================================================================
--- pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label_ja.properties 2007-06-20 08:59:11 UTC (rev 187)
+++ pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label_ja.properties 2007-06-21 04:37:53 UTC (rev 188)
@@ -81,3 +81,81 @@
sendNewPassword=\u65b0\u898f\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u9001\u4fe1
RequestNewPassword=\u65b0\u898f\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u7533\u8acb
SignUp=\u30b5\u30a4\u30f3\u30a2\u30c3\u30d7
+
+# Public Portal Registration
+publicPortalRegistration.requiredDescription=\u304c\u3064\u3044\u3066\u3044\u308b\u9805\u76ee\u306f\u304b\u306a\u3089\u305a\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002
+publicPortalRegistration.userIdTitle=\u30e6\u30fc\u30b6\u30fc ID \u306e\u5165\u529b
+publicPortalRegistration.typeUserId=\u3054\u5e0c\u671b\u306e\u30e6\u30fc\u30b6\u30fc ID \u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002
+publicPortalRegistration.userId=\u30e6\u30fc\u30b6\u30fc ID
+publicPortalRegistration.userIdCondition=\uff086\u301c32\u5b57\u306e\u534a\u89d2\u82f1\u6570\u5b57\uff09
+publicPortalRegistration.userIdExample=\uff08\u4f8b\uff1ahoge2000\u3001foo777\u306a\u3069\uff09
+publicPortalRegistration.userIdHint=\u30e6\u30fc\u30b6\u30fc ID \u306b\u95a2\u3059\u308b\u30d2\u30f3\u30c8
+publicPortalRegistration.userIdBeginWithAlphabet=\u6700\u521d\u306e\u6587\u5b57\u306f\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8
+publicPortalRegistration.underscoreAvailable=\u8a18\u53f7\u306f\u3001\u30a2\u30f3\u30c0\u30fc\u30d0\u30fc\uff08 _ \uff09\u306e\u307f\u4f7f\u7528\u53ef\u80fd\u3067\u3059
+publicPortalRegistration.userInfoTitle=\u304a\u5ba2\u69d8\u60c5\u5831\u306e\u5165\u529b
+publicPortalRegistration.typeUserInfo=\u30e6\u30fc\u30b6\u30fc ID \u3084\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u304a\u5fd8\u308c\u306e\u5834\u5408\u306b\u3001\u4ee5\u4e0b\u306e\u60c5\u5831\u3092\u5143\u306b\u672c\u4eba\u78ba\u8a8d\u3092\u884c\u3044\u307e\u3059\u3002\u6b63\u78ba\u306b\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002
+publicPortalRegistration.userHomeInfoPostalPostalcode=\u90f5\u4fbf\u756a\u53f7
+publicPortalRegistration.userHomeInfoPostalPostalcodeCondition=\uff08\u534a\u89d2\u6570\u5b57\uff17\u6841\uff09
+publicPortalRegistration.userHomeInfoPostalPostalcodeExample=\uff08\u4f8b\uff1a123-0001\u30011230001\uff09
+publicPortalRegistration.userGender=\u6027\u5225
+publicPortalRegistration.male=\u7537\u6027
+publicPortalRegistration.female=\u5973\u6027
+publicPortalRegistration.userBdate=\u751f\u5e74\u6708\u65e5
+publicPortalRegistration.userBdateYear=\u5e74
+publicPortalRegistration.userBdateMonth=\u6708
+publicPortalRegistration.userBdateDate=\u65e5
+publicPortalRegistration.userBusinessInfoOnlineEmail=\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9
+publicPortalRegistration.userBusinessInfoOnlineEmailCondition=\uff08\u534a\u89d2\uff09
+publicPortalRegistration.userIndustry=\u696d\u7a2e
+publicPortalRegistration.ComputerInternet=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u95a2\u4fc2\uff08\u7ba1\u7406/\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\uff09
+publicPortalRegistration.ComputerHardware=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u95a2\u4fc2\uff08\u30cf\u30fc\u30c9\u30a6\u30a8\u30a2\uff09
+publicPortalRegistration.ComputerSoftware=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u95a2\u4fc2\uff08\u30bd\u30d5\u30c8\u30a6\u30a8\u30a2\uff09
+publicPortalRegistration.Research=\u6559\u80b2/\u7814\u7a76
+publicPortalRegistration.Engineering=\u30a8\u30f3\u30b8\u30cb\u30a2/\u5efa\u7bc9
+publicPortalRegistration.Finance=\u9280\u884c/\u91d1\u878d/\u4e0d\u52d5\u7523
+publicPortalRegistration.Manufacturing=\u88fd\u9020/\u6d41\u901a
+publicPortalRegistration.Service=\u30b5\u30fc\u30d3\u30b9
+publicPortalRegistration.Healthcare=\u533b\u85ac/\u5065\u5eb7
+publicPortalRegistration.Publication=\u5a2f\u697d/\u30e1\u30c7\u30a3\u30a2/\u51fa\u7248
+publicPortalRegistration.Travel=\u65c5\u884c/\u63a5\u5ba2\u696d
+publicPortalRegistration.Retail=\u5c0f\u58f2/\u5378\u58f2
+publicPortalRegistration.Nonprofit=\u975e\u55b6\u5229\u56e3\u4f53
+publicPortalRegistration.Government=\u653f\u5e9c/\u81ea\u6cbb\u4f53
+publicPortalRegistration.Law=\u6cd5\u5f8b
+publicPortalRegistration.unemployedLabel=\u7121\u8077
+publicPortalRegistration.otherLabel=\u305d\u306e\u4ed6
+publicPortalRegistration.userJobtitle=\u8077\u7a2e
+publicPortalRegistration.Officer=\u5f79\u54e1/\u7ba1\u7406\u8077
+publicPortalRegistration.Specialist=\u5c02\u9580\u8077\uff08\u533b\u5e2b\u3001\u5f01\u8b77\u58eb\u7b49\uff09
+publicPortalRegistration.Teacher=\u6559\u54e1
+publicPortalRegistration.ComputerEngineer=\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u95a2\u9023\u6280\u8853\u8005
+publicPortalRegistration.Engineer=\u305d\u306e\u4ed6\u6280\u8853\u8005
+publicPortalRegistration.Support=\u30b5\u30fc\u30d3\u30b9/\u30ab\u30b9\u30bf\u30de\u30fc\u30b5\u30dd\u30fc\u30c8
+publicPortalRegistration.Administrative=\u4e8b\u52d9\u8077
+publicPortalRegistration.Sales=\u55b6\u696d/\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0
+publicPortalRegistration.Salesclerk=\u8ca9\u58f2\u54e1
+publicPortalRegistration.Student=\u5927\u5b66\u751f/\u5927\u5b66\u9662\u751f
+publicPortalRegistration.Kid=\u5c0f/\u4e2d/\u9ad8\u6821\u751f
+publicPortalRegistration.Homemaker=\u4e3b\u5a66
+publicPortalRegistration.SelfEmployed=\u81ea\u55b6\u696d
+publicPortalRegistration.retirement=\u5b9a\u5e74\u9000\u8077\u8005
+publicPortalRegistration.userInfoHint=\u304a\u5ba2\u69d8\u60c5\u5831\u306b\u9593\u3059\u308b\u30d2\u30f3\u30c8
+publicPortalRegistration.liveInOversea=\u6d77\u5916\u5728\u4f4f\u306e\u65b9\u306f\u3001000-0000\u3068\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044
+publicPortalRegistration.bdataYearDescription=\u751f\u5e74\u6708\u65e5\u306e\u5e74\u306f\u897f\u66a6\u3067\u304a\u9858\u3044\u3057\u307e\u3059
+publicPortalRegistration.aboutEmail=\u767b\u9332\u3059\u308b\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306f\u3001\u30b5\u30fc\u30d3\u30b9\u3092\u5229\u7528\u3057\u3066\u3044\u305f\u3060\u304f\u4e0a\u3067\u3001\u91cd\u8981\u306a\u304a\u77e5\u3089\u305b\u306a\u3069\u3092\u304a\u9001\u308a\u3059\u308b\u305f\u3081\u306e\u300c\u767b\u9332\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u300d \u306b\u306a\u308a\u307e\u3059\u3002\u9023\u7d61\u53ef\u80fd\u306a\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044
+publicPortalRegistration.userSecretQATitle=\u79d8\u5bc6\u306e\u8cea\u554f\u3068\u7b54\u3048
+publicPortalRegistration.userSecretQADescription=\u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u767a\u884c\u306b\u5fc5\u8981\u306a\u60c5\u5831\u3067\u3059\u3002\u3042\u306a\u305f\u3057\u304b\u77e5\u3089\u306a\u3044\u8cea\u554f\u3068\u7b54\u3048\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002
+publicPortalRegistration.userSecretQuestion=\u79d8\u5bc6\u306e\u8cea\u554f
+publicPortalRegistration.userSecretAnswer=\u79d8\u5bc6\u306e\u7b54\u3048
+publicPortalRegistration.userSecretQAHint=\u79d8\u5bc6\u306e\u8cea\u554f\u3068\u7b54\u3048\u306b\u95a2\u3059\u308b\u30d2\u30f3\u30c8
+publicPortalRegistration.aboutCharacters=\u79d8\u5bc6\u306e\u7b54\u3048\u306f\u3001\u3072\u3089\u304c\u306a\u3001\u30ab\u30bf\u30ab\u30ca\u3001\u5927\u6587\u5b57\u3001\u5c0f\u6587\u5b57\u3001\u534a\u89d2\u3001\u5168\u89d2\u3067\u533a\u5225\u3055\u308c\u307e\u3059
+publicPortalRegistration.SignUp=\u5229\u7528\u898f\u7d04\u306b\u540c\u610f\u3057\u3066\u767b\u9332
+publicPortalRegistration.termOfService=\u5229\u7528\u898f\u7d04
+publicPortalRegistration.name=\u6c0f\u540d
+publicPortalRegistration.userNameFamily=\uff08\u59d3\uff09
+publicPortalRegistration.userNameGiven=\uff08\u540d\uff09
+publicPortalRegistration.nameYomi=\u6c0f\u540d(\u3075\u308a\u304c\u306a)
+publicPortalRegistration.userNameFamilyYomi=\uff08\u59d3\uff09
+publicPortalRegistration.userNameGivenYomi=\uff08\u540d\uff09
+publicPortalRegistrationCompleted.registAgain=\u518d\u5ea6\u3001\u30e6\u30fc\u30b6\u30fc\u3092\u767b\u9332\u3059\u308b\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\u3002
+publicPortalRegistrationCompleted.registLink=\u30e6\u30fc\u30b6\u30fc\u767b\u9332
Modified: pal-admin/trunk/src/main/webapp/WEB-INF/jetspeed-portlet.xml
===================================================================
--- pal-admin/trunk/src/main/webapp/WEB-INF/jetspeed-portlet.xml 2007-06-20 08:59:11 UTC (rev 187)
+++ pal-admin/trunk/src/main/webapp/WEB-INF/jetspeed-portlet.xml 2007-06-21 04:37:53 UTC (rev 188)
@@ -32,6 +32,12 @@
true
true
+
+ PublicPortalRegistrationPortlet
+ public-view
+ true
+ true
+
Modified: pal-admin/trunk/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- pal-admin/trunk/src/main/webapp/WEB-INF/portlet.xml 2007-06-20 08:59:11 UTC (rev 187)
+++ pal-admin/trunk/src/main/webapp/WEB-INF/portlet.xml 2007-06-21 04:37:53 UTC (rev 188)
@@ -209,4 +209,77 @@
tools,users,password,forgotten,lost,passwd
+
+ Provides users with the ability register as a new user with the public portal.
+ ユーザーにポータルの新規登録する機能を提供します。
+ PublicPortalRegistrationPortlet
+ Public Portal Registration
+ ユーザー登録
+ org.apache.portals.bridges.portletfilter.FilterPortlet
+
+ portlet-class
+ org.seasar.teeda.core.portlet.FacesPortlet
+
+
+ portlet-filters
+ jp.sf.pal.admin.filter.UserRegistrationFilter,jp.sf.pal.facesresponse.FacesResponseFilter,jp.sf.pal.pooptimizer.OptimizerFilter,org.seasar.portlet.filter.S2PortletFilter,org.seasar.portlet.filter.HotdeployPortletFilter
+
+
+ view-page
+ /view/registration/publicPortalRegistration.html
+
+
+ This option will generate a new password for each user registration
+ jp.sf.pal.admin.ForceGeneratedPassword
+ true
+
+
+ This option will force email address to be system wide unique
+ jp.sf.pal.admin.ForceUniqueEmail
+ true
+
+
+ This option will use the email address as the username
+ jp.sf.pal.admin.ForceUseEmailAsUsername
+ false
+
+
+ This is the template in which you setup an email to be sent after user exists
+ jp.sf.pal.admin.EmailTemplateLocation
+ /WEB-INF/template/userreg/
+
+
+ This is the template in which you setup an email to be sent after user exists
+ jp.sf.pal.admin.EmailTemplateName
+ userRegistrationEmail.vm
+
+
+ Profiling rules to be assigned at registration.
+ jp.sf.pal.admin.RuleNames
+ page
+
+
+ Profiling rules to be assigned at registration.
+ jp.sf.pal.admin.RuleValues
+ j2
+
+
+ Profiling rules to be assigned at registration.
+ jp.sf.pal.admin.SendMail
+ true
+
+ 0
+
+ text/html
+ VIEW
+
+ en
+ ja
+ jp.sf.pal.admin.web.registration.UserRegistration
+
+ User Registration
+ Registration
+ Registration
+
+
Added: pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistration.html
===================================================================
--- pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistration.html 2007-06-20 08:59:11 UTC (rev 187)
+++ pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistration.html 2007-06-21 04:37:53 UTC (rev 188)
@@ -0,0 +1,312 @@
+
+
+
+
+
+
+
+
+
+
+
Property changes on: pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistration.html
___________________________________________________________________
Name: svn:eol-style
+ native
Added: pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistrationCompleted.html
===================================================================
--- pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistrationCompleted.html 2007-06-20 08:59:11 UTC (rev 187)
+++ pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistrationCompleted.html 2007-06-21 04:37:53 UTC (rev 188)
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
Property changes on: pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistrationCompleted.html
___________________________________________________________________
Name: svn:eol-style
+ native
From svnnotify @ sourceforge.jp Thu Jun 21 14:57:49 2007
From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
Date: Thu, 21 Jun 2007 14:57:49 +0900
Subject: [pal-cvs 2457] [189] added term of serivce, and minor fixes.
Message-ID: <20070621055749.AB65E2AC061@users.sourceforge.jp>
Revision: 189
http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=189
Author: shinsuke
Date: 2007-06-21 14:57:49 +0900 (Thu, 21 Jun 2007)
Log Message:
-----------
added term of serivce, and minor fixes.
Modified Paths:
--------------
pal-admin/trunk/src/main/java/jp/sf/pal/admin/util/PALAdminUtil.java
pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationPage.java
pal-admin/trunk/src/main/resources/PAMessages.properties
pal-admin/trunk/src/main/resources/appMessages.properties
pal-admin/trunk/src/main/resources/appMessages_ja.properties
pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label.properties
pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label_ja.properties
pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistration.html
Added Paths:
-----------
pal-admin/trunk/src/main/webapp/WEB-INF/template/term_of_service.txt
-------------- next part --------------
Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/util/PALAdminUtil.java
===================================================================
--- pal-admin/trunk/src/main/java/jp/sf/pal/admin/util/PALAdminUtil.java 2007-06-21 04:37:53 UTC (rev 188)
+++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/util/PALAdminUtil.java 2007-06-21 05:57:49 UTC (rev 189)
@@ -27,6 +27,7 @@
import java.util.Map;
import javax.faces.context.FacesContext;
+import javax.portlet.PortletConfig;
import javax.security.auth.Subject;
import jp.sf.pal.admin.PALAdminConstants;
@@ -115,8 +116,7 @@
return buf.toString();
}
- public static void drain(InputStream in, OutputStream out)
- throws IOException
+ public static void drain(InputStream in, OutputStream out) throws IOException
{
try
{
@@ -155,20 +155,33 @@
public static void setPasswordToSession(String value)
{
- getFacesContext().getExternalContext().getSessionMap().put(
- PALAdminConstants.PASSWORD, value);
+ getFacesContext().getExternalContext().getSessionMap().put(PALAdminConstants.PASSWORD, value);
}
public static String getPasswordFromSession()
{
- return (String) getFacesContext().getExternalContext().getSessionMap()
- .get(PALAdminConstants.PASSWORD);
+ return (String) getFacesContext().getExternalContext().getSessionMap().get(PALAdminConstants.PASSWORD);
}
public static void removePasswordFromSession()
{
- getFacesContext().getExternalContext().getSessionMap().remove(
- PALAdminConstants.PASSWORD);
+ getFacesContext().getExternalContext().getSessionMap().remove(PALAdminConstants.PASSWORD);
}
+ public static String getContextRealPath(String path)
+ {
+ return getPortletConfig().getPortletContext().getRealPath(path);
+ }
+
+ public static PortletConfig getPortletConfig()
+ {
+ String name = "javax.portlet.PortletConfig";
+ FacesContext context = FacesContext.getCurrentInstance();
+ if (context == null)
+ {
+ throw new IllegalStateException("Could not find FacesContext instance.");
+ }
+ return (PortletConfig) context.getExternalContext().getRequestMap().get(name);
+ }
+
}
Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationPage.java
===================================================================
--- pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationPage.java 2007-06-21 04:37:53 UTC (rev 188)
+++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/web/registration/PublicPortalRegistrationPage.java 2007-06-21 05:57:49 UTC (rev 189)
@@ -1,16 +1,22 @@
package jp.sf.pal.admin.web.registration;
+import java.io.BufferedReader;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStreamReader;
import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
import javax.faces.internal.FacesMessageUtil;
-import org.seasar.framework.log.Logger;
-import org.seasar.teeda.extension.annotation.validator.Length;
-
import jp.sf.pal.admin.PALAdminConstants;
+import jp.sf.pal.admin.util.PALAdminUtil;
import jp.sf.pal.admin.util.UserRegistrationUtil;
import jp.sf.pal.common.CommonException;
+import org.seasar.framework.log.Logger;
+
public class PublicPortalRegistrationPage extends UserRegistrationPage implements Serializable
{
@@ -196,6 +202,58 @@
public String initialize()
{
+ String filename = getLabelHelper().getLabelValue("termOfServiceFile");
+ if (filename == null)
+ {
+ filename = "/WEB-INF/template/term_of_service.txt";
+ }
+ String encoding = getLabelHelper().getLabelValue("termOfServiceEncoding");
+ if (encoding == null)
+ {
+ encoding = "UTF-8";
+ }
+ StringBuffer buf = new StringBuffer();
+ BufferedReader reader = null;
+ try
+ {
+ reader = new BufferedReader(new InputStreamReader(new FileInputStream(PALAdminUtil.getContextRealPath(filename)),
+ encoding));
+ String line;
+ while ((line = reader.readLine()) != null)
+ {
+ buf.append(line).append("\n");
+ }
+ }
+ catch (UnsupportedEncodingException e)
+ {
+ FacesMessageUtil.addErrorMessage("could.not.read.term.of.service");
+ logger.log("EPA0004", new Object[] { this.toString() }, e);
+ }
+ catch (FileNotFoundException e)
+ {
+ FacesMessageUtil.addErrorMessage("could.not.read.term.of.service");
+ logger.log("EPA0004", new Object[] { this.toString() }, e);
+ }
+ catch (IOException e)
+ {
+ FacesMessageUtil.addErrorMessage("could.not.read.term.of.service");
+ logger.log("EPA0004", new Object[] { this.toString() }, e);
+ }
+ finally
+ {
+ if (reader != null)
+ {
+ try
+ {
+ reader.close();
+ }
+ catch (IOException e)
+ {
+ }
+ }
+ }
+ setTermOfService(buf.toString());
+
return null;
}
Modified: pal-admin/trunk/src/main/resources/PAMessages.properties
===================================================================
--- pal-admin/trunk/src/main/resources/PAMessages.properties 2007-06-21 04:37:53 UTC (rev 188)
+++ pal-admin/trunk/src/main/resources/PAMessages.properties 2007-06-21 05:57:49 UTC (rev 189)
@@ -1,3 +1,4 @@
EPA0001=Could not register a user.
EPA0002=Could not send a forgotten password mail.
EPA0003=Could not update a password.
+EPA0004=Could not read a term of service.
Modified: pal-admin/trunk/src/main/resources/appMessages.properties
===================================================================
--- pal-admin/trunk/src/main/resources/appMessages.properties 2007-06-21 04:37:53 UTC (rev 188)
+++ pal-admin/trunk/src/main/resources/appMessages.properties 2007-06-21 05:57:49 UTC (rev 189)
@@ -79,4 +79,5 @@
forgotten.successful_pw_update = Your password has been updated! Please login using it!
forgotten.unable_to_update_pw=Failed to update your password, try again please. If you see this error message again, please contact a site administrator.
+could.not.read.term.of.service=Could not read a term of service.
Modified: pal-admin/trunk/src/main/resources/appMessages_ja.properties
===================================================================
--- pal-admin/trunk/src/main/resources/appMessages_ja.properties 2007-06-21 04:37:53 UTC (rev 188)
+++ pal-admin/trunk/src/main/resources/appMessages_ja.properties 2007-06-21 05:57:49 UTC (rev 189)
@@ -12,3 +12,5 @@
an_email_has_been_sent=\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3057\u307e\u3057\u305f\u3002\u518d\u767a\u884c\u3055\u308c\u305f\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3001\u30ed\u30b0\u30a4\u30f3\u5f8c\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002
forgotten.successful_pw_update = \u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u66f4\u65b0\u3055\u308c\u307e\u3057\u305f\u3002\u305d\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3001\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30ed\u30b0\u30a4\u30f3\u5f8c\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002
forgotten.unable_to_update_pw=\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u66f4\u65b0\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u3057\u3070\u3089\u304f\u305f\u3063\u3066\u304b\u3089\u3001\u518d\u5ea6\u3001\u8a66\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u518d\u5ea6\u3001\u30a8\u30e9\u30fc\u304c\u8d77\u304d\u308b\u5834\u5408\u306f\u3001\u7ba1\u7406\u8005\u306b\u304a\u554f\u3044\u5408\u308f\u305b\u304f\u3060\u3055\u3044\u3002
+
+could.not.read.term.of.service=\u5229\u7528\u898f\u7d04\u3092\u8aad\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
Modified: pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label.properties
===================================================================
--- pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label.properties 2007-06-21 04:37:53 UTC (rev 188)
+++ pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label.properties 2007-06-21 05:57:49 UTC (rev 189)
@@ -122,8 +122,8 @@
publicPortalRegistration.Nonprofit=\u975e\u55b6\u5229\u56e3\u4f53
publicPortalRegistration.Government=\u653f\u5e9c/\u81ea\u6cbb\u4f53
publicPortalRegistration.Law=\u6cd5\u5f8b
-publicPortalRegistration.unemployedLabel=\u7121\u8077
-publicPortalRegistration.otherLabel=\u305d\u306e\u4ed6
+publicPortalRegistration.unemployed=\u7121\u8077
+publicPortalRegistration.other=\u305d\u306e\u4ed6
publicPortalRegistration.userJobtitle=\u8077\u7a2e
publicPortalRegistration.Officer=\u5f79\u54e1/\u7ba1\u7406\u8077
publicPortalRegistration.Specialist=\u5c02\u9580\u8077\uff08\u533b\u5e2b\u3001\u5f01\u8b77\u58eb\u7b49\uff09
Modified: pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label_ja.properties
===================================================================
--- pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label_ja.properties 2007-06-21 04:37:53 UTC (rev 188)
+++ pal-admin/trunk/src/main/resources/jp/sf/pal/admin/web/registration/label_ja.properties 2007-06-21 05:57:49 UTC (rev 189)
@@ -122,8 +122,8 @@
publicPortalRegistration.Nonprofit=\u975e\u55b6\u5229\u56e3\u4f53
publicPortalRegistration.Government=\u653f\u5e9c/\u81ea\u6cbb\u4f53
publicPortalRegistration.Law=\u6cd5\u5f8b
-publicPortalRegistration.unemployedLabel=\u7121\u8077
-publicPortalRegistration.otherLabel=\u305d\u306e\u4ed6
+publicPortalRegistration.unemployed=\u7121\u8077
+publicPortalRegistration.other=\u305d\u306e\u4ed6
publicPortalRegistration.userJobtitle=\u8077\u7a2e
publicPortalRegistration.Officer=\u5f79\u54e1/\u7ba1\u7406\u8077
publicPortalRegistration.Specialist=\u5c02\u9580\u8077\uff08\u533b\u5e2b\u3001\u5f01\u8b77\u58eb\u7b49\uff09
Added: pal-admin/trunk/src/main/webapp/WEB-INF/template/term_of_service.txt
===================================================================
--- pal-admin/trunk/src/main/webapp/WEB-INF/template/term_of_service.txt 2007-06-21 04:37:53 UTC (rev 188)
+++ pal-admin/trunk/src/main/webapp/WEB-INF/template/term_of_service.txt 2007-06-21 05:57:49 UTC (rev 189)
@@ -0,0 +1,5 @@
+利用規約
+
+・・・
+・・・
+・・・
Property changes on: pal-admin/trunk/src/main/webapp/WEB-INF/template/term_of_service.txt
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistration.html
===================================================================
--- pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistration.html 2007-06-21 04:37:53 UTC (rev 188)
+++ pal-admin/trunk/src/main/webapp/view/registration/publicPortalRegistration.html 2007-06-21 05:57:49 UTC (rev 189)
@@ -40,7 +40,7 @@