Author: chris.laprun(a)jboss.com
Date: 2009-11-26 10:54:09 -0500 (Thu, 26 Nov 2009)
New Revision: 818
Added:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/GroupDAOImpl.java
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/IDMUserListAccess.java
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMOrganizationServiceImpl.java
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMService.java
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMServiceImpl.java
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipDAOImpl.java
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipImpl.java
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipTypeDAOImpl.java
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/UserDAOImpl.java
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/UserProfileDAOImpl.java
portal/branches/wsrp-integration/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetEditMode.java
portal/branches/wsrp-integration/server/jboss/patch/
portal/branches/wsrp-integration/server/jboss/patch/pom.xml
portal/branches/wsrp-integration/server/jboss/patch/src/
portal/branches/wsrp-integration/server/jboss/patch/src/main/
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/conf/
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/conf/jboss-log4j.xml
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/jboss-app.xml
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/jboss-service.xml
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/login-config.xml
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/jboss-web.deployer/
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/jboss-web.deployer/web.xml
Removed:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/idm/
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/GroupDAOImpl.java
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/IDMUserListAccess.java
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMOrganizationServiceImpl.java
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMService.java
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMServiceImpl.java
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipDAOImpl.java
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipImpl.java
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipTypeDAOImpl.java
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/UserDAOImpl.java
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/UserProfileDAOImpl.java
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/config/PortalMOPService.java
portal/branches/wsrp-integration/docs/testing/
portal/branches/wsrp-integration/docs/user-guide/en/modules/SSO.xml
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/RegisterPortlet_en.properties
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component/background/BgEvenRow.gif
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component/background/BgOddRow.gif
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component/background/Button.gif
portal/branches/wsrp-integration/server/jboss/patch/pom.xml
portal/branches/wsrp-integration/server/jboss/patch/src/
portal/branches/wsrp-integration/server/jboss/patch/src/main/
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/conf/
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/conf/jboss-log4j.xml
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/jboss-app.xml
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/jboss-service.xml
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/login-config.xml
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/jboss-web.deployer/
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/jboss-web.deployer/web.xml
Modified:
portal/branches/wsrp-integration/component/application-registry/src/main/java/org/exoplatform/application/registry/mop/MOPApplicationRegistryService.java
portal/branches/wsrp-integration/component/application-registry/src/test/java/conf/portal/idm-configuration.xml
portal/branches/wsrp-integration/component/identity/pom.xml
portal/branches/wsrp-integration/component/identity/src/main/java/conf/portal/hibernate-jbidm.cfg.xml
portal/branches/wsrp-integration/component/identity/src/main/java/conf/portal/idm-config.xml
portal/branches/wsrp-integration/component/identity/src/main/java/conf/portal/jboss-idm-configuration.xml
portal/branches/wsrp-integration/component/identity/src/test/java/conf/portal/idm-configuration.xml
portal/branches/wsrp-integration/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganizationService.java
portal/branches/wsrp-integration/component/pc/pom.xml
portal/branches/wsrp-integration/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java
portal/branches/wsrp-integration/component/portal/pom.xml
portal/branches/wsrp-integration/component/portal/src/main/java/conf/portal/portal-nodetypes.xml
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/config/RemoveGroupPortalConfigListener.java
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/config/RemoveUserPortalConfigListener.java
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/spi/gadget/GadgetContentProvider.java
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/spi/portlet/PortletContentProvider.java
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/spi/wsrp/WSRPContentProvider.java
portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal/database-configuration.xml
portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal/idm-configuration.xml
portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal/jcr-configuration.xml
portal/branches/wsrp-integration/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
portal/branches/wsrp-integration/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java
portal/branches/wsrp-integration/component/scripting/pom.xml
portal/branches/wsrp-integration/docs/user-guide/
portal/branches/wsrp-integration/docs/user-guide/en/master.xml
portal/branches/wsrp-integration/packaging/module/pom.xml
portal/branches/wsrp-integration/packaging/module/src/main/javascript/portal.packaging.module.js
portal/branches/wsrp-integration/packaging/pkg/pom.xml
portal/branches/wsrp-integration/packaging/pom.xml
portal/branches/wsrp-integration/packaging/product/pom.xml
portal/branches/wsrp-integration/pom.xml
portal/branches/wsrp-integration/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java
portal/branches/wsrp-integration/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetPortlet.java
portal/branches/wsrp-integration/portlet/dashboard/src/main/webapp/WEB-INF/portlet.xml
portal/branches/wsrp-integration/portlet/dashboard/src/main/webapp/groovy/dashboard/webui/component/UITabPaneDashboard.gtmpl
portal/branches/wsrp-integration/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetPortlet.gtmpl
portal/branches/wsrp-integration/portlet/dashboard/src/main/webapp/skin/gadget/webui/component/UIGadgetPortlet/DefaultStylesheet.css
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIRegisterForm.java
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetInfo.java
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetManagement.java
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component/DefaultStylesheet.css
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component/background/GroupImage.png
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component/background/LineBg.gif
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component/background/MiniIcon.gif
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/register/webui/component/DefaultStylesheet.css
portal/branches/wsrp-integration/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UILogoEditMode.java
portal/branches/wsrp-integration/server/jboss/patch-ear/src/main/jboss/server/default/deployers/jbossweb.deployer/web.xml
portal/branches/wsrp-integration/server/jboss/pom.xml
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/webui/UITabbedDashboard.js
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPage/Stylesheet.css
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIToolbarContainer/Stylesheet.css
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIToolbarContainer/background/ToolbarContainer.gif
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIForms/UIFormWithTitle/Stylesheet.css
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIForms/UIFormWithTitle/background/TitleBG1x20.gif
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIToolbar/Stylesheet.css
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_es.properties
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ru.properties
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_uk.properties
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/database/database-configuration.xml
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-config.xml
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/portal/application-registry-configuration.xml
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/pages.xml
portal/branches/wsrp-integration/web/portal/src/main/webapp/groovy/webui/core/UIWizard.gtmpl
portal/branches/wsrp-integration/web/portal/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationStatistic.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationStatisticService.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ModelAdapter.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationManagement.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java
Log:
Reverted back to revision 804 before failed merge attempt.
Modified:
portal/branches/wsrp-integration/component/application-registry/src/main/java/org/exoplatform/application/registry/mop/MOPApplicationRegistryService.java
===================================================================
---
portal/branches/wsrp-integration/component/application-registry/src/main/java/org/exoplatform/application/registry/mop/MOPApplicationRegistryService.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/application-registry/src/main/java/org/exoplatform/application/registry/mop/MOPApplicationRegistryService.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -29,7 +29,6 @@
import org.exoplatform.portal.config.model.ApplicationType;
import org.exoplatform.portal.pom.config.POMSession;
import org.exoplatform.portal.pom.config.POMSessionManager;
-import org.exoplatform.portal.pom.config.POMTask;
import org.exoplatform.portal.pom.registry.CategoryDefinition;
import org.exoplatform.portal.pom.registry.ContentDefinition;
import org.exoplatform.portal.pom.registry.ContentRegistry;
@@ -49,13 +48,8 @@
import java.util.Comparator;
import java.util.List;
import java.util.Set;
-import java.util.concurrent.atomic.AtomicReference;
/**
- * The fundamental reason that motives to use tasks is because of the JMX access that
does not
- * setup a context and therefore the task either reuse the existing context setup by the
portal
- * or create a temporary context when accessed by JMX.
- *
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
@@ -89,34 +83,27 @@
}
public List<ApplicationCategory> getApplicationCategories(
- final Comparator<ApplicationCategory> sortComparator,
+ Comparator<ApplicationCategory> sortComparator,
String accessUser,
- final ApplicationType<?>... appTypes) throws Exception
+ ApplicationType<?>... appTypes) throws Exception
{
- final List<ApplicationCategory> categories = new
ArrayList<ApplicationCategory>();
+ POMSession session = POMSessionManager.getSession();
+ ContentRegistry registry = session.getContentRegistry();
//
- pomMGr.execute(new POMTask()
+ List<ApplicationCategory> categories = new
ArrayList<ApplicationCategory>();
+ for (CategoryDefinition categoryDef : registry.getCategoryList())
{
- public void run(POMSession session) throws Exception
- {
- ContentRegistry registry = session.getContentRegistry();
+ ApplicationCategory category = load(categoryDef, appTypes);
+ categories.add(category);
+ }
- //
- for (CategoryDefinition categoryDef : registry.getCategoryList())
- {
- ApplicationCategory category = load(categoryDef, appTypes);
- categories.add(category);
- }
+ //
+ if (sortComparator != null)
+ {
+ Collections.sort(categories, sortComparator);
+ }
- //
- if (sortComparator != null)
- {
- Collections.sort(categories, sortComparator);
- }
- }
- });
-
//
return categories;
}
@@ -136,69 +123,53 @@
return getApplicationCategories(sortComparator, null);
}
- public ApplicationCategory getApplicationCategory(final String name) throws Exception
+ public ApplicationCategory getApplicationCategory(String name) throws Exception
{
- final AtomicReference<ApplicationCategory> a = new
AtomicReference<ApplicationCategory>();
+ POMSession session = POMSessionManager.getSession();
+ ContentRegistry registry = session.getContentRegistry();
//
- pomMGr.execute(new POMTask()
+ CategoryDefinition categoryDef = registry.getCategory(name);
+ if (categoryDef != null)
{
- public void run(POMSession session) throws Exception
- {
- ContentRegistry registry = session.getContentRegistry();
+ return load(categoryDef);
+ }
+ else
+ {
+ return null;
+ }
+ }
- //
- CategoryDefinition categoryDef = registry.getCategory(name);
- if (categoryDef != null)
- {
- ApplicationCategory applicationCategory = load(categoryDef);
- a.set(applicationCategory);
- }
- }
- });
+ public void save(ApplicationCategory category) throws Exception
+ {
+ POMSession session = POMSessionManager.getSession();
+ ContentRegistry registry = session.getContentRegistry();
//
- return a.get();
- }
+ String categoryName = category.getName();
- public void save(final ApplicationCategory category) throws Exception
- {
- pomMGr.execute(new POMTask()
+ //
+ CategoryDefinition categoryDef = registry.getCategory(categoryName);
+ if (categoryDef == null)
{
- public void run(POMSession session) throws Exception
- {
- ContentRegistry registry = session.getContentRegistry();
+ categoryDef = registry.createCategory(categoryName);
+ }
- //
- String categoryName = category.getName();
-
- //
- CategoryDefinition categoryDef = registry.getCategory(categoryName);
- if (categoryDef == null)
- {
- categoryDef = registry.createCategory(categoryName);
- }
-
- //
- categoryDef.setDisplayName(category.getDisplayName());
- categoryDef.setCreationDate(category.getCreatedDate());
- categoryDef.setLastModificationDate(category.getModifiedDate());
- categoryDef.setDescription(category.getDescription());
- categoryDef.setAccessPermissions(category.getAccessPermissions());
- }
- });
+ //
+ categoryDef.setDisplayName(category.getDisplayName());
+ categoryDef.setCreationDate(category.getCreatedDate());
+ categoryDef.setLastModificationDate(category.getModifiedDate());
+ categoryDef.setDescription(category.getDescription());
+ categoryDef.setAccessPermissions(category.getAccessPermissions());
}
- public void remove(final ApplicationCategory category) throws Exception
+ public void remove(ApplicationCategory category) throws Exception
{
- pomMGr.execute(new POMTask()
- {
- public void run(POMSession session) throws Exception
- {
- ContentRegistry registry = session.getContentRegistry();
- registry.getCategoryMap().remove(category.getName());
- }
- });
+ POMSession session = POMSessionManager.getSession();
+ ContentRegistry registry = session.getContentRegistry();
+
+ //
+ registry.getCategoryMap().remove(category.getName());
}
public List<Application> getApplications(ApplicationCategory category,
ApplicationType<?>... appTypes) throws Exception
@@ -207,36 +178,25 @@
}
public List<Application> getApplications(
- final ApplicationCategory category,
- final Comparator<Application> sortComparator,
- final ApplicationType<?>... appTypes) throws Exception
+ ApplicationCategory category,
+ Comparator<Application> sortComparator,
+ ApplicationType<?>... appTypes) throws Exception
{
- final AtomicReference<List<Application>> ref = new
AtomicReference<List<Application>>();
+ POMSession session = POMSessionManager.getSession();
+ ContentRegistry registry = session.getContentRegistry();
//
- pomMGr.execute(new POMTask()
+ CategoryDefinition categoryDef = registry.getCategory(category.getName());
+ List<Application> applications = load(categoryDef,
appTypes).getApplications();
+
+ //
+ if (sortComparator != null)
{
- public void run(POMSession session) throws Exception
- {
- ContentRegistry registry = session.getContentRegistry();
+ Collections.sort(applications, sortComparator);
+ }
- //
- CategoryDefinition categoryDef = registry.getCategory(category.getName());
- List<Application> applications = load(categoryDef,
appTypes).getApplications();
-
- //
- if (sortComparator != null)
- {
- Collections.sort(applications, sortComparator);
- }
-
- //
- ref.set(applications);
- }
- });
-
//
- return ref.get();
+ return applications;
}
public List<Application> getAllApplications() throws Exception
@@ -260,108 +220,90 @@
return getApplication(fragments[0], fragments[1]);
}
- public Application getApplication(final String category, final String name) throws
Exception
+ public Application getApplication(String category, String name) throws Exception
{
- final AtomicReference<Application> ref = new
AtomicReference<Application>();
+ POMSession session = POMSessionManager.getSession();
+ ContentRegistry registry = session.getContentRegistry();
//
- pomMGr.execute(new POMTask()
+ CategoryDefinition categoryDef = registry.getCategory(category);
+ if (categoryDef != null)
{
- public void run(POMSession session) throws Exception
+ ContentDefinition contentDef = categoryDef.getContentMap().get(name);
+ if (contentDef != null)
{
- ContentRegistry registry = session.getContentRegistry();
-
- //
- CategoryDefinition categoryDef = registry.getCategory(category);
- if (categoryDef != null)
- {
- ContentDefinition contentDef = categoryDef.getContentMap().get(name);
- if (contentDef != null)
- {
- ref.set(load(contentDef));
- }
- }
+ return load(contentDef);
}
- });
+ }
//
- return ref.get();
+ return null;
}
- public void save(final ApplicationCategory category, final Application application)
throws Exception
+ public void save(ApplicationCategory category, Application application) throws
Exception
{
- pomMGr.execute(new POMTask()
+ POMSession session = POMSessionManager.getSession();
+ ContentRegistry registry = session.getContentRegistry();
+
+ //
+ String categoryName = category.getName();
+ CategoryDefinition categoryDef = registry.getCategory(categoryName);
+ if (categoryDef == null)
{
- public void run(POMSession session) throws Exception
- {
- ContentRegistry registry = session.getContentRegistry();
+ categoryDef = registry.createCategory(categoryName);
+ save(category, categoryDef);
+ }
- //
- String categoryName = category.getName();
- CategoryDefinition categoryDef = registry.getCategory(categoryName);
- if (categoryDef == null)
- {
- categoryDef = registry.createCategory(categoryName);
- save(category, categoryDef);
- }
+ //
+ ContentDefinition contentDef = null;
+ CategoryDefinition applicationCategoryDef =
registry.getCategory(application.getCategoryName());
+ String applicationName = application.getApplicationName();
+ if (applicationCategoryDef != null)
+ {
+ contentDef = applicationCategoryDef.getContentMap().get(applicationName);
+ }
+ if (contentDef == null)
+ {
+ String contentId = application.getContentId();
+ ContentType<?> contentType = application.getType().getContentType();
+ String definitionName = application.getDisplayName().replace(' ',
'_');
+ contentDef = categoryDef.createContent(definitionName, contentType, contentId);
+ }
+ else
+ {
+ // A JCR move actually
+ categoryDef.getContentList().add(contentDef);
+ }
- //
- ContentDefinition contentDef = null;
- CategoryDefinition applicationCategoryDef =
registry.getCategory(application.getCategoryName());
- String applicationName = application.getApplicationName();
- if (applicationCategoryDef != null)
- {
- contentDef = applicationCategoryDef.getContentMap().get(applicationName);
- }
- if (contentDef == null)
- {
- String contentId = application.getContentId();
- ContentType<?> contentType =
application.getType().getContentType();
- String definitionName = application.getApplicationName();
- contentDef = categoryDef.createContent(definitionName, contentType,
contentId);
- }
- else
- {
- // A JCR move actually
- categoryDef.getContentList().add(contentDef);
- }
-
- // Update state
- save(application, contentDef);
- }
- });
+ // Update state
+ save(application, contentDef);
}
- public void update(final Application application) throws Exception
+ public void update(Application application) throws Exception
{
- pomMGr.execute(new POMTask()
+ POMSession session = POMSessionManager.getSession();
+ ContentRegistry registry = session.getContentRegistry();
+
+ //
+ String categoryName = application.getCategoryName();
+ CategoryDefinition categoryDef = registry.getCategory(categoryName);
+ if (categoryDef == null)
{
- public void run(POMSession session) throws Exception
- {
- ContentRegistry registry = session.getContentRegistry();
+ throw new IllegalStateException();
+ }
- //
- String categoryName = application.getCategoryName();
- CategoryDefinition categoryDef = registry.getCategory(categoryName);
- if (categoryDef == null)
- {
- throw new IllegalStateException();
- }
+ //
+ ContentDefinition contentDef =
categoryDef.getContentMap().get(application.getApplicationName());
+ if (contentDef == null)
+ {
+ throw new IllegalStateException();
+ }
- //
- ContentDefinition contentDef =
categoryDef.getContentMap().get(application.getApplicationName());
- if (contentDef == null)
- {
- throw new IllegalStateException();
- }
-
- // Update state
- save(application, contentDef);
- }
- });
+ // Update state
+ save(application, contentDef);
}
- public void remove(final Application app) throws Exception
+ public void remove(Application app) throws Exception
{
if (app == null)
{
@@ -369,169 +311,154 @@
}
//
- pomMGr.execute(new POMTask()
- {
- public void run(POMSession session) throws Exception
- {
- ContentRegistry registry = session.getContentRegistry();
+ POMSession session = POMSessionManager.getSession();
+ ContentRegistry registry = session.getContentRegistry();
- //
- String categoryName = app.getCategoryName();
- CategoryDefinition categoryDef = registry.getCategory(categoryName);
+ //
+ String categoryName = app.getCategoryName();
+ CategoryDefinition categoryDef = registry.getCategory(categoryName);
- //
- if (categoryDef != null)
- {
+ //
+ if (categoryDef != null)
+ {
- String contentName = app.getApplicationName();
- categoryDef.getContentMap().remove(contentName);
- }
- }
- });
+ String contentName = app.getApplicationName();
+ categoryDef.getContentMap().remove(contentName);
+ }
}
public void importExoGadgets() throws Exception
{
- pomMGr.execute(new POMTask()
- {
- public void run(POMSession session) throws Exception
- {
- ContentRegistry registry = session.getContentRegistry();
+ POMSession session = POMSessionManager.getSession();
+ ContentRegistry registry = session.getContentRegistry();
- //
- ExoContainer container = ExoContainerContext.getCurrentContainer();
- GadgetRegistryService gadgetService =
(GadgetRegistryService)container.getComponentInstanceOfType(GadgetRegistryService.class);
- List<Gadget> eXoGadgets = gadgetService.getAllGadgets();
+ //
+ ExoContainer container = ExoContainerContext.getCurrentContainer();
+ GadgetRegistryService gadgetService =
(GadgetRegistryService)container.getComponentInstanceOfType(GadgetRegistryService.class);
+ List<Gadget> eXoGadgets = gadgetService.getAllGadgets();
- //
- if (eXoGadgets != null)
- {
- ArrayList<String> permissions = new ArrayList<String>();
- permissions.add(UserACL.EVERYONE);
- String categoryName = "Gadgets";
+ //
+ if (eXoGadgets != null)
+ {
+ ArrayList<String> permissions = new ArrayList<String>();
+ permissions.add(UserACL.EVERYONE);
+ String categoryName = "Gadgets";
- //
- CategoryDefinition category = registry.getCategory(categoryName);
- if (category == null)
- {
- category = registry.createCategory(categoryName);
- category.setDisplayName(categoryName);
- category.setDescription(categoryName);
- category.setAccessPermissions(permissions);
- }
+ //
+ CategoryDefinition category = registry.getCategory(categoryName);
+ if (category == null)
+ {
+ category = registry.createCategory(categoryName);
+ category.setDisplayName(categoryName);
+ category.setDescription(categoryName);
+ category.setAccessPermissions(permissions);
+ }
- //
- for (Gadget ele : eXoGadgets)
- {
- ContentDefinition app = category.getContentMap().get(ele.getName());
- if (app == null)
- {
- app = category.createContent(ele.getName(),
org.exoplatform.portal.pom.spi.gadget.Gadget.CONTENT_TYPE, ele.getName());
- app.setDisplayName(ele.getTitle());
- app.setDescription(ele.getDescription());
- app.setAccessPermissions(permissions);
- }
- }
+ //
+ for (Gadget ele : eXoGadgets)
+ {
+ ContentDefinition app = category.getContentMap().get(ele.getName());
+ if (app == null)
+ {
+ app = category.createContent(ele.getName(),
org.exoplatform.portal.pom.spi.gadget.Gadget.CONTENT_TYPE, ele.getName());
+ app.setDisplayName(ele.getTitle());
+ app.setDescription(ele.getDescription());
+ app.setAccessPermissions(permissions);
}
}
- });
+ }
}
public void importAllPortlets() throws Exception
{
- pomMGr.execute(new POMTask()
+ POMSession session = POMSessionManager.getSession();
+ ContentRegistry registry = session.getContentRegistry();
+
+ //
+ ExoContainer manager = ExoContainerContext.getCurrentContainer();
+ PortletInvoker portletInvoker =
(PortletInvoker)manager.getComponentInstance(PortletInvoker.class);
+ Set<org.gatein.pc.api.Portlet> portlets = portletInvoker.getPortlets();
+
+ //
+ for (org.gatein.pc.api.Portlet portlet : portlets)
{
- public void run(POMSession session) throws Exception
+ PortletInfo info = portlet.getInfo();
+ String portletApplicationName = info.getApplicationName();
+ String portletName = info.getName();
+
+ // Need to sanitize portlet and application names in case they contain
characters that would
+ // cause an improper Application name
+ portletApplicationName = portletApplicationName.replace('/',
'_');
+ portletName = portletName.replace('/', '_');
+
+ LocalizedString keywordsLS = info.getMeta().getMetaValue(MetaInfo.KEYWORDS);
+
+ String[] categoryNames = null;
+ if (keywordsLS != null)
{
- ContentRegistry registry = session.getContentRegistry();
+ String keywords = keywordsLS.getDefaultString();
+ if (keywords != null && keywords.length() != 0)
+ {
+ categoryNames = keywords.split(",");
+ }
+ }
+ if (categoryNames == null || categoryNames.length == 0)
+ {
+ categoryNames = new String[]{portletApplicationName};
+ }
+
+ if (portlet.isRemote())
+ {
+ categoryNames = Tools.appendTo(categoryNames, REMOTE_CATEGORY_NAME);
+ }
+
+ //
+ for (String categoryName : categoryNames)
+ {
+ categoryName = categoryName.trim();
+
//
- ExoContainer manager = ExoContainerContext.getCurrentContainer();
- PortletInvoker portletInvoker =
(PortletInvoker)manager.getComponentInstance(PortletInvoker.class);
- Set<org.gatein.pc.api.Portlet> portlets =
portletInvoker.getPortlets();
+ CategoryDefinition category = registry.getCategory(categoryName);
//
- for (org.gatein.pc.api.Portlet portlet : portlets)
+ if (category == null)
{
- PortletInfo info = portlet.getInfo();
- String portletApplicationName = info.getApplicationName();
- String portletName = info.getName();
+ category = registry.createCategory(categoryName);
+ category.setDisplayName(categoryName);
+ }
- // Need to sanitize portlet and application names in case they contain
characters that would
- // cause an improper Application name
- portletApplicationName = portletApplicationName.replace('/',
'_');
- portletName = portletName.replace('/', '_');
+ //
+ ContentDefinition app = category.getContentMap().get(portletName);
+ if (app == null)
+ {
+ LocalizedString descriptionLS =
portlet.getInfo().getMeta().getMetaValue(MetaInfo.DESCRIPTION);
+ LocalizedString displayNameLS =
portlet.getInfo().getMeta().getMetaValue(MetaInfo.DISPLAY_NAME);
- LocalizedString keywordsLS =
info.getMeta().getMetaValue(MetaInfo.KEYWORDS);
+ // julien: ????
+ // getLocalizedStringValue(descriptionLS, portletName);
- String[] categoryNames = null;
- if (keywordsLS != null)
+ ContentType<?> contentType;
+ String contentId;
+ if (portlet.isRemote())
{
- String keywords = keywordsLS.getDefaultString();
- if (keywords != null && keywords.length() != 0)
- {
- categoryNames = keywords.split(",");
- }
+ contentType = WSRP.CONTENT_TYPE;
+ contentId = portlet.getContext().getId();
}
-
- if (categoryNames == null || categoryNames.length == 0)
+ else
{
- categoryNames = new String[]{portletApplicationName};
+ contentType = Portlet.CONTENT_TYPE;
+ contentId = info.getApplicationName() + "/" +
info.getName();
}
- if (portlet.isRemote())
- {
- categoryNames = Tools.appendTo(categoryNames, REMOTE_CATEGORY_NAME);
- }
//
- for (String categoryName : categoryNames)
- {
- categoryName = categoryName.trim();
-
- //
- CategoryDefinition category = registry.getCategory(categoryName);
-
- //
- if (category == null)
- {
- category = registry.createCategory(categoryName);
- category.setDisplayName(categoryName);
- }
-
- //
- ContentDefinition app = category.getContentMap().get(portletName);
- if (app == null)
- {
- LocalizedString descriptionLS =
portlet.getInfo().getMeta().getMetaValue(MetaInfo.DESCRIPTION);
- LocalizedString displayNameLS =
portlet.getInfo().getMeta().getMetaValue(MetaInfo.DISPLAY_NAME);
-
- // julien: ????
- // getLocalizedStringValue(descriptionLS, portletName);
-
- ContentType<?> contentType;
- String contentId;
- if (portlet.isRemote())
- {
- contentType = WSRP.CONTENT_TYPE;
- contentId = portlet.getContext().getId();
- }
- else
- {
- contentType = Portlet.CONTENT_TYPE;
- contentId = info.getApplicationName() + "/" +
info.getName();
- }
-
-
- //
- app = category.createContent(portletName, contentType, contentId);
- app.setDisplayName(getLocalizedStringValue(displayNameLS,
portletName));
- app.setDescription(getLocalizedStringValue(descriptionLS,
portletName));
- }
- }
+ app = category.createContent(portletName, contentType, contentId);
+ app.setDisplayName(getLocalizedStringValue(displayNameLS, portletName));
+ app.setDescription(getLocalizedStringValue(descriptionLS, portletName));
}
}
- });
+ }
}
private boolean isApplicationType(Application app, ApplicationType<?>...
appTypes)
Modified:
portal/branches/wsrp-integration/component/application-registry/src/test/java/conf/portal/idm-configuration.xml
===================================================================
---
portal/branches/wsrp-integration/component/application-registry/src/test/java/conf/portal/idm-configuration.xml 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/application-registry/src/test/java/conf/portal/idm-configuration.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -25,44 +25,52 @@
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
<component>
-
<key>org.exoplatform.services.organization.idm.PicketLinkIDMService</key>
-
<type>org.exoplatform.services.organization.idm.PicketLinkIDMServiceImpl</type>
+ <key>org.exoplatform.services.organization.jbidm.JBossIDMService</key>
+
<type>org.exoplatform.services.organization.jbidm.JBossIDMServiceImpl</type>
<init-params>
<value-param>
<name>config</name>
<value>war:/conf/organization/idm-config.xml</value>
</value-param>
+ <values-param>
+ <name>hibernate.annotations</name>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttributeValue</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredential</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectTextAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateRealm</value>
+ </values-param>
+ <properties-param>
+ <name>hibernate.properties</name>
+ <property name="hibernate.hbm2ddl.auto"
value="update"/>
+ <property name="hibernate.current_session_context_class"
value="thread"/>
+ <property name="hibernate.show_sql"
value="false"/>
+ <property name="hibernate.cglib.use_reflection_optimizer"
value="true"/>
+ <property name="hibernate.connection.url"
value="jdbc:hsqldb:file:../temp/data/exodb"/>
+ <property name="hibernate.connection.driver_class"
value="org.hsqldb.jdbcDriver"/>
+ <property name="hibernate.connection.autocommit"
value="true"/>
+ <property name="hibernate.connection.username"
value="sa"/>
+ <property name="hibernate.connection.password"
value=""/>
+ <property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect"/>
+ <property name="hibernate.c3p0.min_size"
value="5"/>
+ <property name="hibernate.c3p0.max_size"
value="20"/>
+ <property name="hibernate.c3p0.timeout"
value="1800"/>
+ <property name="hibernate.c3p0.max_statements"
value="50"/>
+ </properties-param>
+
</init-params>
</component>
<component>
<key>org.exoplatform.services.organization.OrganizationService</key>
-
<type>org.exoplatform.services.organization.idm.PicketLinkIDMOrganizationServiceImpl</type>
+
<type>org.exoplatform.services.organization.jbidm.JBossIDMOrganizationServiceImpl</type>
</component>
- <external-component-plugins>
-
<target-component>org.exoplatform.services.database.HibernateService</target-component>
- <component-plugin>
- <name>add.hibernate.mapping</name>
- <set-method>addPlugin</set-method>
-
<type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
- <init-params>
- <values-param>
- <name>hibernate.mapping</name>
- <value>mappings/HibernateRealm.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml</value>
- <value>mappings/HibernateIdentityObject.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectCredential.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectCredentialType.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectAttribute.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectType.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectRelationship.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectRelationshipType.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectRelationshipName.hbm.xml</value>
- </values-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-
</configuration>
Modified: portal/branches/wsrp-integration/component/identity/pom.xml
===================================================================
--- portal/branches/wsrp-integration/component/identity/pom.xml 2009-11-26 15:37:51 UTC
(rev 817)
+++ portal/branches/wsrp-integration/component/identity/pom.xml 2009-11-26 15:54:09 UTC
(rev 818)
@@ -55,24 +55,24 @@
</dependency>
<dependency>
- <groupId>org.picketlink.idm</groupId>
- <artifactId>picketlink-idm-core</artifactId>
- <version>${org.picketlink.idm}</version>
+ <groupId>org.jboss.identity.idm</groupId>
+ <artifactId>idm-core</artifactId>
+ <version>${org.jboss.identity.idm}</version>
</dependency>
<dependency>
- <groupId>org.picketlink.idm</groupId>
- <artifactId>picketlink-idm-hibernate</artifactId>
- <version>${org.picketlink.idm}</version>
+ <groupId>org.jboss.identity.idm</groupId>
+ <artifactId>idm-hibernate</artifactId>
+ <version>${org.jboss.identity.idm}</version>
</dependency>
<dependency>
- <groupId>org.picketlink.idm</groupId>
- <artifactId>picketlink-idm-ldap</artifactId>
- <version>${org.picketlink.idm}</version>
+ <groupId>org.jboss.identity.idm</groupId>
+ <artifactId>idm-ldap</artifactId>
+ <version>${org.jboss.identity.idm}</version>
</dependency>
<dependency>
- <groupId>org.picketlink.idm</groupId>
- <artifactId>picketlink-idm-cache</artifactId>
- <version>${org.picketlink.idm}</version>
+ <groupId>org.jboss.identity.idm</groupId>
+ <artifactId>idm-cache</artifactId>
+ <version>${org.jboss.identity.idm}</version>
</dependency>
<!--To use instead of outdated version from xdoclet-->
Modified:
portal/branches/wsrp-integration/component/identity/src/main/java/conf/portal/hibernate-jbidm.cfg.xml
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/conf/portal/hibernate-jbidm.cfg.xml 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/conf/portal/hibernate-jbidm.cfg.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -41,5 +41,19 @@
<property
name="hibernate.connection.username">sa</property>
<property name="hibernate.connection.password"></property>
+ <!-- Mapping classes -->
+ <!-- all nessesary mappings are added programatically to the configuration
-->
+ <!--<mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateRealm"/>-->
+ <!--<mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject"/>-->
+ <!--<mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredential"/>-->
+ <!--<mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType"/>-->
+ <!--<mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttribute"/>-->
+ <!--<mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectTextAttribute"/>-->
+ <!--<mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttribute"/>-->
+ <!--<mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType"/>-->
+ <!--<mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship"/>-->
+ <!--<mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType"/>-->
+ <!--<mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName"/>-->
+
</session-factory>
</hibernate-configuration>
\ No newline at end of file
Modified:
portal/branches/wsrp-integration/component/identity/src/main/java/conf/portal/idm-config.xml
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/conf/portal/idm-config.xml 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/conf/portal/idm-config.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -20,9 +20,9 @@
-->
-<jboss-identity xmlns="urn:picketlink:idm:config:v1_0_0_cr1"
+<jboss-identity xmlns="urn:jboss:identity:idm:config:v1_0_beta"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:picketlink:idm:config:v1_0_0_cr1
identity-config.xsd">
+ xsi:schemaLocation="urn:jboss:identity:idm:config:v1_0_alpha
identity-config.xsd">
<realms>
<realm>
<id>PortalRealm</id>
@@ -35,7 +35,7 @@
<repositories>
<repository>
<id>PortalRepository</id>
-
<class>org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository</class>
+
<class>org.jboss.identity.idm.impl.repository.WrapperIdentityStoreRepository</class>
<external-config/>
<default-identity-store-id>HibernateStore</default-identity-store-id>
<default-attribute-store-id>HibernateStore</default-attribute-store-id>
@@ -46,7 +46,7 @@
<identity-stores>
<identity-store>
<id>HibernateStore</id>
-
<class>org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl</class>
+
<class>org.jboss.identity.idm.impl.store.hibernate.HibernateIdentityStoreImpl</class>
<external-config/>
<supported-relationship-types>
<relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
Modified:
portal/branches/wsrp-integration/component/identity/src/main/java/conf/portal/jboss-idm-configuration.xml
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/conf/portal/jboss-idm-configuration.xml 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/conf/portal/jboss-idm-configuration.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -25,8 +25,8 @@
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
<component>
-
<key>org.exoplatform.services.organization.idm.PicketLinkIDMService</key>
-
<type>org.exoplatform.services.organization.idm.PicketLinkIDMServiceImpl</type>
+ <key>org.exoplatform.services.organization.jbidm.JBossIDMService</key>
+
<type>org.exoplatform.services.organization.jbidm.JBossIDMServiceImpl</type>
<init-params>
<value-param>
<name>config</name>
@@ -41,7 +41,7 @@
<component>
<key>org.exoplatform.services.organization.OrganizationService</key>
-
<type>org.exoplatform.services.organization.idm.PicketLinkIDMOrganizationServiceImpl</type>
+
<type>org.exoplatform.services.organization.jbidm.JBossIDMOrganizationServiceImpl</type>
</component>
<external-component-plugins>
@@ -52,18 +52,19 @@
<type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
<init-params>
<values-param>
- <name>hibernate.mapping</name>
- <value>mappings/HibernateRealm.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml</value>
- <value>mappings/HibernateIdentityObject.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectCredential.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectCredentialType.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectAttribute.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectType.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectRelationship.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectRelationshipType.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectRelationshipName.hbm.xml</value>
+ <name>hibernate.annotations</name>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttributeValue</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredential</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectTextAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateRealm</value>
</values-param>
</init-params>
</component-plugin>
Copied:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm
(from rev 804,
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm)
Property changes on:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm
___________________________________________________________________
Name: svn:ignore
+ *.iml
.idea
Deleted:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/GroupDAOImpl.java
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/GroupDAOImpl.java 2009-11-25
21:32:49 UTC (rev 804)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/GroupDAOImpl.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -1,459 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.services.organization.jbidm;
-
-import org.exoplatform.services.organization.Group;
-import org.exoplatform.services.organization.GroupEventListener;
-import org.exoplatform.services.organization.GroupHandler;
-import org.exoplatform.services.organization.impl.GroupImpl;
-import org.jboss.identity.idm.api.Attribute;
-import org.jboss.identity.idm.api.IdentitySession;
-import org.jboss.identity.idm.impl.api.SimpleAttribute;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-public class GroupDAOImpl implements GroupHandler
-{
-
- public static final String GROUP_LABEL = "label";
-
- public static final String GROUP_DESCRIPTION = "description";
-
- private JBossIDMService service_;
-
- private List<GroupEventListener> listeners_;
-
- private JBossIDMOrganizationServiceImpl orgService;
-
- public GroupDAOImpl(JBossIDMOrganizationServiceImpl orgService, JBossIDMService
service)
- {
- service_ = service;
- this.orgService = orgService;
- listeners_ = new ArrayList<GroupEventListener>();
- }
-
- public void addGroupEventListener(GroupEventListener listener)
- {
- listeners_.add(listener);
- }
-
- final public Group createGroupInstance()
- {
- return new GroupImpl();
- }
-
- public void createGroup(Group group, boolean broadcast) throws Exception
- {
- addChild(null, group, broadcast);
- }
-
- public void addChild(Group parent, Group child, boolean broadcast) throws Exception
- {
- org.jboss.identity.idm.api.Group parentGroup = null;
-
- if (parent != null)
- {
- parentGroup =
- getIdentitySession().getPersistenceManager().findGroup(parent.getGroupName(),
orgService.getExoGroupType());
- ((GroupImpl)child).setId(parent.getId() + "/" +
child.getGroupName());
-
- }
- else
- {
- ((GroupImpl)child).setId("/" + child.getGroupName());
- }
-
- if (broadcast)
- {
- preSave(child, true);
- }
-
- org.jboss.identity.idm.api.Group childGroup = persistGroup(child);
-
- if (parentGroup != null)
- {
- getIdentitySession().getRelationshipManager().associateGroups(parentGroup,
childGroup);
- ((GroupImpl)child).setParentId(parent.getId());
-
- }
- else
- {
- getIdentitySession().getRelationshipManager().associateGroups(getRootGroup(),
childGroup);
- }
-
- if (broadcast)
- {
- postSave(child, true);
- }
-
- }
-
- public void saveGroup(Group group, boolean broadcast) throws Exception
- {
- if (broadcast)
- {
- preSave(group, false);
- }
- persistGroup(group);
- if (broadcast)
- {
- postSave(group, false);
- }
- }
-
- public Group removeGroup(Group group, boolean broadcast) throws Exception
- {
- if (broadcast)
- {
- preDelete(group);
- }
-
- org.jboss.identity.idm.api.Group jbidGroup =
- getIdentitySession().getPersistenceManager().findGroup(group.getGroupName(),
orgService.getExoGroupType());
-
- if (jbidGroup == null)
- {
- return group;
- }
-
- // MembershipDAOImpl.removeMembershipEntriesOfGroup(group,
getIdentitySession());
-
- Collection<org.jboss.identity.idm.api.Group> oneLevelChilds =
- getIdentitySession().getRelationshipManager().findAssociatedGroups(jbidGroup,
orgService.getExoGroupType(),
- true, false);
-
- Collection<org.jboss.identity.idm.api.Group> allChilds =
- getIdentitySession().getRelationshipManager().findAssociatedGroups(jbidGroup,
orgService.getExoGroupType(),
- true, true);
-
- getIdentitySession().getRelationshipManager().disassociateGroups(jbidGroup,
oneLevelChilds);
-
- for (org.jboss.identity.idm.api.Group child : allChilds)
- {
- //TODO: impl force in IDM
- getIdentitySession().getPersistenceManager().removeGroup(child, true);
- }
-
- getIdentitySession().getPersistenceManager().removeGroup(jbidGroup, true);
-
- if (broadcast)
- {
- postDelete(group);
- }
- return group;
- }
-
- public Collection findGroupByMembership(String userName, String membershipType) throws
Exception
- {
- Collection<org.jboss.identity.idm.api.Role> allRoles =
- getIdentitySession().getRoleManager().findRoles(userName, membershipType);
-
- Set<Group> exoGroups = new HashSet<Group>();
-
- for (org.jboss.identity.idm.api.Role role : allRoles)
- {
- exoGroups.add(convertGroup(role.getGroup()));
-
- }
-
- return exoGroups;
- }
-
- //
- public Group findGroupById(String groupId) throws Exception
- {
-
- org.jboss.identity.idm.api.Group jbidGroup = orgService.getJBIDMGroup(groupId);
-
- if (jbidGroup == null)
- {
- return null;
- }
-
- return convertGroup(jbidGroup);
- }
-
- public Collection findGroups(Group parent) throws Exception
- {
- org.jboss.identity.idm.api.Group jbidGroup = null;
-
- if (parent == null)
- {
- jbidGroup = getRootGroup();
- }
- else
- {
- jbidGroup =
- getIdentitySession().getPersistenceManager().findGroup(parent.getGroupName(),
orgService.getExoGroupType());
- }
-
- if (jbidGroup == null)
- {
- return Collections.emptyList();
- }
-
- Collection<org.jboss.identity.idm.api.Group> allGroups =
- getIdentitySession().getRelationshipManager().findAssociatedGroups(jbidGroup,
orgService.getExoGroupType(),
- true, false);
-
- List<Group> exoGroups = new LinkedList<Group>();
-
- for (org.jboss.identity.idm.api.Group group : allGroups)
- {
- exoGroups.add(convertGroup(group));
-
- }
-
- return exoGroups;
-
- }
-
- public Collection findGroupsOfUser(String user) throws Exception
- {
-
- if (user == null)
- {
- // julien : integration bug
- // need to look at that later
- //
- // Caused by: java.lang.IllegalArgumentException: User name cannot be null
- // at
org.jboss.identity.idm.impl.api.session.managers.AbstractManager.checkNotNullArgument(AbstractManager.java:267)
- // at
org.jboss.identity.idm.impl.api.session.managers.RelationshipManagerImpl.findRelatedGroups(RelationshipManagerImpl.java:753)
- // at
org.exoplatform.services.organization.jbidm.GroupDAOImpl.findGroupsOfUser(GroupDAOImpl.java:225)
- // at
org.exoplatform.organization.webui.component.GroupManagement.isMemberOfGroup(GroupManagement.java:72)
- // at
org.exoplatform.organization.webui.component.GroupManagement.isAdministrator(GroupManagement.java:125)
- // at
org.exoplatform.organization.webui.component.UIGroupExplorer.<init>(UIGroupExplorer.java:57)
- return Collections.emptyList();
- }
-
- Collection<org.jboss.identity.idm.api.Group> allGroups =
- getIdentitySession().getRelationshipManager().findRelatedGroups(user,
orgService.getExoGroupType(), null);
-
- List<Group> exoGroups = new LinkedList<Group>();
-
- for (org.jboss.identity.idm.api.Group group : allGroups)
- {
- exoGroups.add(convertGroup(group));
-
- }
-
- return exoGroups;
- }
-
- public Collection getAllGroups() throws Exception
- {
- Collection<org.jboss.identity.idm.api.Group> allGroups =
-
getIdentitySession().getPersistenceManager().findGroup(orgService.getExoGroupType());
-
- List<Group> exoGroups = new LinkedList<Group>();
-
- for (org.jboss.identity.idm.api.Group group : allGroups)
- {
- if (!orgService.getExoGroupType().equals(orgService.getExoRootGroupType())
- || !group.getName().equals(orgService.getExoRootGroupName()))
- {
- exoGroups.add(convertGroup(group));
- }
-
- }
-
- return exoGroups;
- }
-
- private void preSave(Group group, boolean isNew) throws Exception
- {
- for (GroupEventListener listener : listeners_)
- {
- listener.preSave(group, isNew);
- }
- }
-
- private void postSave(Group group, boolean isNew) throws Exception
- {
- for (GroupEventListener listener : listeners_)
- {
- listener.postSave(group, isNew);
- }
- }
-
- private void preDelete(Group group) throws Exception
- {
- for (GroupEventListener listener : listeners_)
- {
- listener.preDelete(group);
- }
- }
-
- private void postDelete(Group group) throws Exception
- {
- for (GroupEventListener listener : listeners_)
- {
- listener.postDelete(group);
- }
- }
-
- public Group getGroup(String groupName) throws Exception
- {
- org.jboss.identity.idm.api.Group jbidGroup =
- getIdentitySession().getPersistenceManager().findGroup(groupName,
orgService.getExoGroupType());
-
- if (jbidGroup == null)
- {
- return null;
- }
-
- return convertGroup(jbidGroup);
-
- }
-
- private Group convertGroup(org.jboss.identity.idm.api.Group jbidGroup) throws
Exception
- {
- Map<String, Attribute> attrs =
getIdentitySession().getAttributesManager().getAttributes(jbidGroup);
-
- GroupImpl exoGroup = new GroupImpl(jbidGroup.getName());
-
- if (attrs.containsKey(GROUP_DESCRIPTION))
- {
- exoGroup.setDescription(attrs.get(GROUP_DESCRIPTION).getValue().toString());
- }
- if (attrs.containsKey(GROUP_LABEL))
- {
- exoGroup.setLabel(attrs.get(GROUP_LABEL).getValue().toString());
- }
-
- // Resolve full ID
- String id = getGroupId(jbidGroup.getName());
-
- exoGroup.setId(id);
-
- if (id.length() == jbidGroup.getName().length() + 1)
- {
- exoGroup.setParentId(null);
- }
- else
- {
- exoGroup.setParentId(id.substring(0, id.length() - jbidGroup.getName().length()
- 1));
- }
-
- return exoGroup;
- }
-
- private String getGroupId(String groupName) throws Exception
- {
- if (groupName.equals(orgService.getExoRootGroupName()))
- {
- return "";
- }
-
- org.jboss.identity.idm.api.Group jbidGroup =
- getIdentitySession().getPersistenceManager().findGroup(groupName,
orgService.getExoGroupType());
-
- Collection<org.jboss.identity.idm.api.Group> parents =
- getIdentitySession().getRelationshipManager().findAssociatedGroups(jbidGroup,
orgService.getExoGroupType(),
- false, false);
-
- if (parents.size() > 1)
- {
- throw new IllegalStateException("Group has more than one parent: " +
groupName);
- }
-
- if (parents.size() == 0)
- {
- //As there is special root group this shouldn't happen:
- throw new IllegalStateException("Group present that is not connected to the
root: " + groupName);
-
- // This group is at the root
- //return "/" + groupName;
- }
-
- String parentGroupId =
getGroupId(((org.jboss.identity.idm.api.Group)parents.iterator().next()).getName());
-
- return parentGroupId + "/" + groupName;
-
- }
-
- private org.jboss.identity.idm.api.Group persistGroup(Group exoGroup) throws
Exception
- {
-
- org.jboss.identity.idm.api.Group jbidGroup =
- getIdentitySession().getPersistenceManager().findGroup(exoGroup.getGroupName(),
orgService.getExoGroupType());
-
- if (jbidGroup == null)
- {
- jbidGroup =
-
getIdentitySession().getPersistenceManager().createGroup(exoGroup.getGroupName(),
- orgService.getExoGroupType());
- }
-
- String description = exoGroup.getDescription();
- String label = exoGroup.getLabel();
-
- List<Attribute> attrsList = new ArrayList<Attribute>();
- if (description != null)
- {
- attrsList.add(new SimpleAttribute(GROUP_DESCRIPTION, description));
- }
-
- if (label != null)
- {
- attrsList.add(new SimpleAttribute(GROUP_LABEL, label));
- }
-
- if (attrsList.size() > 0)
- {
- Attribute[] attrs = new Attribute[attrsList.size()];
-
- attrs = attrsList.toArray(attrs);
-
- getIdentitySession().getAttributesManager().addAttributes(jbidGroup, attrs);
-
- }
-
- return jbidGroup;
- }
-
- private IdentitySession getIdentitySession() throws Exception
- {
- return service_.getIdentitySession();
- }
-
- private org.jboss.identity.idm.api.Group getRootGroup() throws Exception
- {
- org.jboss.identity.idm.api.Group rootGroup =
-
getIdentitySession().getPersistenceManager().findGroup(orgService.getExoRootGroupName(),
- orgService.getExoRootGroupType());
-
- if (rootGroup == null)
- {
- rootGroup =
-
getIdentitySession().getPersistenceManager().createGroup(orgService.getExoRootGroupName(),
- orgService.getExoRootGroupType());
- }
-
- return rootGroup;
- }
-}
Copied:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/GroupDAOImpl.java
(from rev 804,
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/GroupDAOImpl.java)
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/GroupDAOImpl.java
(rev 0)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/GroupDAOImpl.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -0,0 +1,459 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.services.organization.jbidm;
+
+import org.exoplatform.services.organization.Group;
+import org.exoplatform.services.organization.GroupEventListener;
+import org.exoplatform.services.organization.GroupHandler;
+import org.exoplatform.services.organization.impl.GroupImpl;
+import org.jboss.identity.idm.api.Attribute;
+import org.jboss.identity.idm.api.IdentitySession;
+import org.jboss.identity.idm.impl.api.SimpleAttribute;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+public class GroupDAOImpl implements GroupHandler
+{
+
+ public static final String GROUP_LABEL = "label";
+
+ public static final String GROUP_DESCRIPTION = "description";
+
+ private JBossIDMService service_;
+
+ private List<GroupEventListener> listeners_;
+
+ private JBossIDMOrganizationServiceImpl orgService;
+
+ public GroupDAOImpl(JBossIDMOrganizationServiceImpl orgService, JBossIDMService
service)
+ {
+ service_ = service;
+ this.orgService = orgService;
+ listeners_ = new ArrayList<GroupEventListener>();
+ }
+
+ public void addGroupEventListener(GroupEventListener listener)
+ {
+ listeners_.add(listener);
+ }
+
+ final public Group createGroupInstance()
+ {
+ return new GroupImpl();
+ }
+
+ public void createGroup(Group group, boolean broadcast) throws Exception
+ {
+ addChild(null, group, broadcast);
+ }
+
+ public void addChild(Group parent, Group child, boolean broadcast) throws Exception
+ {
+ org.jboss.identity.idm.api.Group parentGroup = null;
+
+ if (parent != null)
+ {
+ parentGroup =
+ getIdentitySession().getPersistenceManager().findGroup(parent.getGroupName(),
orgService.getExoGroupType());
+ ((GroupImpl)child).setId(parent.getId() + "/" +
child.getGroupName());
+
+ }
+ else
+ {
+ ((GroupImpl)child).setId("/" + child.getGroupName());
+ }
+
+ if (broadcast)
+ {
+ preSave(child, true);
+ }
+
+ org.jboss.identity.idm.api.Group childGroup = persistGroup(child);
+
+ if (parentGroup != null)
+ {
+ getIdentitySession().getRelationshipManager().associateGroups(parentGroup,
childGroup);
+ ((GroupImpl)child).setParentId(parent.getId());
+
+ }
+ else
+ {
+ getIdentitySession().getRelationshipManager().associateGroups(getRootGroup(),
childGroup);
+ }
+
+ if (broadcast)
+ {
+ postSave(child, true);
+ }
+
+ }
+
+ public void saveGroup(Group group, boolean broadcast) throws Exception
+ {
+ if (broadcast)
+ {
+ preSave(group, false);
+ }
+ persistGroup(group);
+ if (broadcast)
+ {
+ postSave(group, false);
+ }
+ }
+
+ public Group removeGroup(Group group, boolean broadcast) throws Exception
+ {
+ if (broadcast)
+ {
+ preDelete(group);
+ }
+
+ org.jboss.identity.idm.api.Group jbidGroup =
+ getIdentitySession().getPersistenceManager().findGroup(group.getGroupName(),
orgService.getExoGroupType());
+
+ if (jbidGroup == null)
+ {
+ return group;
+ }
+
+ // MembershipDAOImpl.removeMembershipEntriesOfGroup(group,
getIdentitySession());
+
+ Collection<org.jboss.identity.idm.api.Group> oneLevelChilds =
+ getIdentitySession().getRelationshipManager().findAssociatedGroups(jbidGroup,
orgService.getExoGroupType(),
+ true, false);
+
+ Collection<org.jboss.identity.idm.api.Group> allChilds =
+ getIdentitySession().getRelationshipManager().findAssociatedGroups(jbidGroup,
orgService.getExoGroupType(),
+ true, true);
+
+ getIdentitySession().getRelationshipManager().disassociateGroups(jbidGroup,
oneLevelChilds);
+
+ for (org.jboss.identity.idm.api.Group child : allChilds)
+ {
+ //TODO: impl force in IDM
+ getIdentitySession().getPersistenceManager().removeGroup(child, true);
+ }
+
+ getIdentitySession().getPersistenceManager().removeGroup(jbidGroup, true);
+
+ if (broadcast)
+ {
+ postDelete(group);
+ }
+ return group;
+ }
+
+ public Collection findGroupByMembership(String userName, String membershipType) throws
Exception
+ {
+ Collection<org.jboss.identity.idm.api.Role> allRoles =
+ getIdentitySession().getRoleManager().findRoles(userName, membershipType);
+
+ Set<Group> exoGroups = new HashSet<Group>();
+
+ for (org.jboss.identity.idm.api.Role role : allRoles)
+ {
+ exoGroups.add(convertGroup(role.getGroup()));
+
+ }
+
+ return exoGroups;
+ }
+
+ //
+ public Group findGroupById(String groupId) throws Exception
+ {
+
+ org.jboss.identity.idm.api.Group jbidGroup = orgService.getJBIDMGroup(groupId);
+
+ if (jbidGroup == null)
+ {
+ return null;
+ }
+
+ return convertGroup(jbidGroup);
+ }
+
+ public Collection findGroups(Group parent) throws Exception
+ {
+ org.jboss.identity.idm.api.Group jbidGroup = null;
+
+ if (parent == null)
+ {
+ jbidGroup = getRootGroup();
+ }
+ else
+ {
+ jbidGroup =
+ getIdentitySession().getPersistenceManager().findGroup(parent.getGroupName(),
orgService.getExoGroupType());
+ }
+
+ if (jbidGroup == null)
+ {
+ return Collections.emptyList();
+ }
+
+ Collection<org.jboss.identity.idm.api.Group> allGroups =
+ getIdentitySession().getRelationshipManager().findAssociatedGroups(jbidGroup,
orgService.getExoGroupType(),
+ true, false);
+
+ List<Group> exoGroups = new LinkedList<Group>();
+
+ for (org.jboss.identity.idm.api.Group group : allGroups)
+ {
+ exoGroups.add(convertGroup(group));
+
+ }
+
+ return exoGroups;
+
+ }
+
+ public Collection findGroupsOfUser(String user) throws Exception
+ {
+
+ if (user == null)
+ {
+ // julien : integration bug
+ // need to look at that later
+ //
+ // Caused by: java.lang.IllegalArgumentException: User name cannot be null
+ // at
org.jboss.identity.idm.impl.api.session.managers.AbstractManager.checkNotNullArgument(AbstractManager.java:267)
+ // at
org.jboss.identity.idm.impl.api.session.managers.RelationshipManagerImpl.findRelatedGroups(RelationshipManagerImpl.java:753)
+ // at
org.exoplatform.services.organization.jbidm.GroupDAOImpl.findGroupsOfUser(GroupDAOImpl.java:225)
+ // at
org.exoplatform.organization.webui.component.GroupManagement.isMemberOfGroup(GroupManagement.java:72)
+ // at
org.exoplatform.organization.webui.component.GroupManagement.isAdministrator(GroupManagement.java:125)
+ // at
org.exoplatform.organization.webui.component.UIGroupExplorer.<init>(UIGroupExplorer.java:57)
+ return Collections.emptyList();
+ }
+
+ Collection<org.jboss.identity.idm.api.Group> allGroups =
+ getIdentitySession().getRelationshipManager().findRelatedGroups(user,
orgService.getExoGroupType(), null);
+
+ List<Group> exoGroups = new LinkedList<Group>();
+
+ for (org.jboss.identity.idm.api.Group group : allGroups)
+ {
+ exoGroups.add(convertGroup(group));
+
+ }
+
+ return exoGroups;
+ }
+
+ public Collection getAllGroups() throws Exception
+ {
+ Collection<org.jboss.identity.idm.api.Group> allGroups =
+
getIdentitySession().getPersistenceManager().findGroup(orgService.getExoGroupType());
+
+ List<Group> exoGroups = new LinkedList<Group>();
+
+ for (org.jboss.identity.idm.api.Group group : allGroups)
+ {
+ if (!orgService.getExoGroupType().equals(orgService.getExoRootGroupType())
+ || !group.getName().equals(orgService.getExoRootGroupName()))
+ {
+ exoGroups.add(convertGroup(group));
+ }
+
+ }
+
+ return exoGroups;
+ }
+
+ private void preSave(Group group, boolean isNew) throws Exception
+ {
+ for (GroupEventListener listener : listeners_)
+ {
+ listener.preSave(group, isNew);
+ }
+ }
+
+ private void postSave(Group group, boolean isNew) throws Exception
+ {
+ for (GroupEventListener listener : listeners_)
+ {
+ listener.postSave(group, isNew);
+ }
+ }
+
+ private void preDelete(Group group) throws Exception
+ {
+ for (GroupEventListener listener : listeners_)
+ {
+ listener.preDelete(group);
+ }
+ }
+
+ private void postDelete(Group group) throws Exception
+ {
+ for (GroupEventListener listener : listeners_)
+ {
+ listener.postDelete(group);
+ }
+ }
+
+ public Group getGroup(String groupName) throws Exception
+ {
+ org.jboss.identity.idm.api.Group jbidGroup =
+ getIdentitySession().getPersistenceManager().findGroup(groupName,
orgService.getExoGroupType());
+
+ if (jbidGroup == null)
+ {
+ return null;
+ }
+
+ return convertGroup(jbidGroup);
+
+ }
+
+ private Group convertGroup(org.jboss.identity.idm.api.Group jbidGroup) throws
Exception
+ {
+ Map<String, Attribute> attrs =
getIdentitySession().getAttributesManager().getAttributes(jbidGroup);
+
+ GroupImpl exoGroup = new GroupImpl(jbidGroup.getName());
+
+ if (attrs.containsKey(GROUP_DESCRIPTION))
+ {
+ exoGroup.setDescription(attrs.get(GROUP_DESCRIPTION).getValue().toString());
+ }
+ if (attrs.containsKey(GROUP_LABEL))
+ {
+ exoGroup.setLabel(attrs.get(GROUP_LABEL).getValue().toString());
+ }
+
+ // Resolve full ID
+ String id = getGroupId(jbidGroup.getName());
+
+ exoGroup.setId(id);
+
+ if (id.length() == jbidGroup.getName().length() + 1)
+ {
+ exoGroup.setParentId(null);
+ }
+ else
+ {
+ exoGroup.setParentId(id.substring(0, id.length() - jbidGroup.getName().length()
- 1));
+ }
+
+ return exoGroup;
+ }
+
+ private String getGroupId(String groupName) throws Exception
+ {
+ if (groupName.equals(orgService.getExoRootGroupName()))
+ {
+ return "";
+ }
+
+ org.jboss.identity.idm.api.Group jbidGroup =
+ getIdentitySession().getPersistenceManager().findGroup(groupName,
orgService.getExoGroupType());
+
+ Collection<org.jboss.identity.idm.api.Group> parents =
+ getIdentitySession().getRelationshipManager().findAssociatedGroups(jbidGroup,
orgService.getExoGroupType(),
+ false, false);
+
+ if (parents.size() > 1)
+ {
+ throw new IllegalStateException("Group has more than one parent: " +
groupName);
+ }
+
+ if (parents.size() == 0)
+ {
+ //As there is special root group this shouldn't happen:
+ throw new IllegalStateException("Group present that is not connected to the
root: " + groupName);
+
+ // This group is at the root
+ //return "/" + groupName;
+ }
+
+ String parentGroupId =
getGroupId(((org.jboss.identity.idm.api.Group)parents.iterator().next()).getName());
+
+ return parentGroupId + "/" + groupName;
+
+ }
+
+ private org.jboss.identity.idm.api.Group persistGroup(Group exoGroup) throws
Exception
+ {
+
+ org.jboss.identity.idm.api.Group jbidGroup =
+ getIdentitySession().getPersistenceManager().findGroup(exoGroup.getGroupName(),
orgService.getExoGroupType());
+
+ if (jbidGroup == null)
+ {
+ jbidGroup =
+
getIdentitySession().getPersistenceManager().createGroup(exoGroup.getGroupName(),
+ orgService.getExoGroupType());
+ }
+
+ String description = exoGroup.getDescription();
+ String label = exoGroup.getLabel();
+
+ List<Attribute> attrsList = new ArrayList<Attribute>();
+ if (description != null)
+ {
+ attrsList.add(new SimpleAttribute(GROUP_DESCRIPTION, description));
+ }
+
+ if (label != null)
+ {
+ attrsList.add(new SimpleAttribute(GROUP_LABEL, label));
+ }
+
+ if (attrsList.size() > 0)
+ {
+ Attribute[] attrs = new Attribute[attrsList.size()];
+
+ attrs = attrsList.toArray(attrs);
+
+ getIdentitySession().getAttributesManager().addAttributes(jbidGroup, attrs);
+
+ }
+
+ return jbidGroup;
+ }
+
+ private IdentitySession getIdentitySession() throws Exception
+ {
+ return service_.getIdentitySession();
+ }
+
+ private org.jboss.identity.idm.api.Group getRootGroup() throws Exception
+ {
+ org.jboss.identity.idm.api.Group rootGroup =
+
getIdentitySession().getPersistenceManager().findGroup(orgService.getExoRootGroupName(),
+ orgService.getExoRootGroupType());
+
+ if (rootGroup == null)
+ {
+ rootGroup =
+
getIdentitySession().getPersistenceManager().createGroup(orgService.getExoRootGroupName(),
+ orgService.getExoRootGroupType());
+ }
+
+ return rootGroup;
+ }
+}
Deleted:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/IDMUserListAccess.java
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/IDMUserListAccess.java 2009-11-25
21:32:49 UTC (rev 804)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/IDMUserListAccess.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -1,83 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.services.organization.jbidm;
-
-import org.exoplatform.commons.utils.ListAccess;
-import org.exoplatform.services.organization.User;
-import org.jboss.identity.idm.api.query.UserQuery;
-import org.jboss.identity.idm.api.query.UserQueryBuilder;
-
-import java.util.List;
-
-public class IDMUserListAccess implements ListAccess<User>
-{
- private final UserDAOImpl userDAO;
-
- private final JBossIDMService idmService;
-
- private final UserQueryBuilder userQueryBuilder;
-
- private final int pageSize;
-
- private final boolean countAll;
-
- public IDMUserListAccess(UserDAOImpl userDAO, JBossIDMService idmService,
UserQueryBuilder userQueryBuilder,
- int pageSize, boolean countAll)
- {
- this.userDAO = userDAO;
- this.idmService = idmService;
- this.userQueryBuilder = userQueryBuilder;
- this.pageSize = pageSize;
- this.countAll = countAll;
- }
-
- public User[] load(int index, int length) throws Exception, IllegalArgumentException
- {
- userQueryBuilder.page(index, length);
- UserQuery query = userQueryBuilder.createQuery();
- List<org.jboss.identity.idm.api.User> users =
idmService.getIdentitySession().list(query);
-
- User[] exoUsers = new User[users.size()];
-
- for (int i = 0; i < users.size(); i++)
- {
- org.jboss.identity.idm.api.User user = users.get(i);
-
- exoUsers[i] = UserDAOImpl.getPopulatedUser(user.getId(),
idmService.getIdentitySession());
- }
-
- return exoUsers;
- }
-
- public int getSize() throws Exception
- {
- if (countAll)
- {
- return idmService.getIdentitySession().getPersistenceManager().getUserCount();
- }
- else
- {
- userQueryBuilder.page(0, 0);
- UserQuery query = userQueryBuilder.createQuery();
- return idmService.getIdentitySession().execute(query).size();
- }
-
- }
-}
Copied:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/IDMUserListAccess.java
(from rev 804,
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/IDMUserListAccess.java)
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/IDMUserListAccess.java
(rev 0)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/IDMUserListAccess.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -0,0 +1,83 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.services.organization.jbidm;
+
+import org.exoplatform.commons.utils.ListAccess;
+import org.exoplatform.services.organization.User;
+import org.jboss.identity.idm.api.query.UserQuery;
+import org.jboss.identity.idm.api.query.UserQueryBuilder;
+
+import java.util.List;
+
+public class IDMUserListAccess implements ListAccess<User>
+{
+ private final UserDAOImpl userDAO;
+
+ private final JBossIDMService idmService;
+
+ private final UserQueryBuilder userQueryBuilder;
+
+ private final int pageSize;
+
+ private final boolean countAll;
+
+ public IDMUserListAccess(UserDAOImpl userDAO, JBossIDMService idmService,
UserQueryBuilder userQueryBuilder,
+ int pageSize, boolean countAll)
+ {
+ this.userDAO = userDAO;
+ this.idmService = idmService;
+ this.userQueryBuilder = userQueryBuilder;
+ this.pageSize = pageSize;
+ this.countAll = countAll;
+ }
+
+ public User[] load(int index, int length) throws Exception, IllegalArgumentException
+ {
+ userQueryBuilder.page(index, length);
+ UserQuery query = userQueryBuilder.createQuery();
+ List<org.jboss.identity.idm.api.User> users =
idmService.getIdentitySession().list(query);
+
+ User[] exoUsers = new User[users.size()];
+
+ for (int i = 0; i < users.size(); i++)
+ {
+ org.jboss.identity.idm.api.User user = users.get(i);
+
+ exoUsers[i] = UserDAOImpl.getPopulatedUser(user.getId(),
idmService.getIdentitySession());
+ }
+
+ return exoUsers;
+ }
+
+ public int getSize() throws Exception
+ {
+ if (countAll)
+ {
+ return idmService.getIdentitySession().getPersistenceManager().getUserCount();
+ }
+ else
+ {
+ userQueryBuilder.page(0, 0);
+ UserQuery query = userQueryBuilder.createQuery();
+ return idmService.getIdentitySession().execute(query).size();
+ }
+
+ }
+}
Deleted:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMOrganizationServiceImpl.java
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMOrganizationServiceImpl.java 2009-11-25
21:32:49 UTC (rev 804)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMOrganizationServiceImpl.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -1,175 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.services.organization.jbidm;
-
-import org.exoplatform.container.ExoContainer;
-import org.exoplatform.container.component.ComponentRequestLifecycle;
-import org.exoplatform.container.xml.InitParams;
-import org.exoplatform.container.xml.ValueParam;
-import org.exoplatform.services.cache.CacheService;
-import org.exoplatform.services.organization.BaseOrganizationService;
-import org.picocontainer.Startable;
-
-public class JBossIDMOrganizationServiceImpl extends BaseOrganizationService implements
Startable,
- ComponentRequestLifecycle
-{
-
- // We may have several portal containers thus we need one JBossIDMService per portal
container
- // private static JBossIDMService jbidmService_;
- private JBossIDMService jbidmService_;
-
- public static final String EXO_GROUP_TYPE_OPTION = "exoGroupTypeName";
-
- public static final String EXO_ROOT_GROUP_NAME_OPTION = "exoRootGroupName";
-
- public static final String EXO_ROOT_GROUP_TYPE_NAME_OPTION =
"exoRootGroupTypeName";
-
- public static final String PASSWORD_AS_ATTRIBUTE_OPTION =
"passwordAsAttribute";
-
- private String exoGroupType = "EXO_GROUP_TYPE";
-
- private String exoRootGroupName = "EXO_ROOT_GROUP";
-
- private String exoRootGroupType = exoGroupType;
-
- private boolean passwordAsAttribute = false;
-
- public JBossIDMOrganizationServiceImpl(InitParams params, CacheService cservice,
JBossIDMService jbidmService)
- throws Exception
- {
- groupDAO_ = new GroupDAOImpl(this, jbidmService);
- userDAO_ = new UserDAOImpl(this, jbidmService, cservice);
- userProfileDAO_ = new UserProfileDAOImpl(this, jbidmService, cservice);
- membershipDAO_ = new MembershipDAOImpl(this, jbidmService);
- membershipTypeDAO_ = new MembershipTypeDAOImpl(this, jbidmService);
-
- jbidmService_ = jbidmService;
-
- if (params != null)
- {
- //Options
- ValueParam exoGroupTypeNameParam = params.getValueParam(EXO_GROUP_TYPE_OPTION);
- ValueParam exoRootGroupTypeNameParam =
params.getValueParam(EXO_ROOT_GROUP_TYPE_NAME_OPTION);
- ValueParam exoRootGroupNameParam =
params.getValueParam(EXO_ROOT_GROUP_NAME_OPTION);
- ValueParam passwordAsAttributeParam =
params.getValueParam(PASSWORD_AS_ATTRIBUTE_OPTION);
-
- if (exoGroupTypeNameParam != null)
- {
- this.exoGroupType = exoGroupTypeNameParam.getValue();
- }
-
- if (exoRootGroupNameParam != null)
- {
- this.exoRootGroupName = exoRootGroupNameParam.getValue();
- }
-
- if (exoRootGroupTypeNameParam != null)
- {
- this.exoRootGroupType = exoRootGroupTypeNameParam.getValue();
- }
- else if (exoRootGroupTypeNameParam != null)
- {
- this.exoRootGroupType = this.exoGroupType;
- }
-
- if (passwordAsAttributeParam != null &&
passwordAsAttributeParam.getValue().equalsIgnoreCase("true"))
- {
- this.passwordAsAttribute = true;
- }
- }
-
- }
-
- public final org.jboss.identity.idm.api.Group getJBIDMGroup(String groupId) throws
Exception
- {
- String[] ids = groupId.split("/");
- String name = ids[ids.length - 1];
- return jbidmService_.getIdentitySession().getPersistenceManager().findGroup(name,
getExoGroupType());
- }
-
- @Override
- public void start()
- {
-
- try
- {
- // Wrap within transaction so all initializers can work
- jbidmService_.getIdentitySession().beginTransaction();
- super.start();
- jbidmService_.getIdentitySession().getTransaction().commit();
-
- }
- catch (Exception e)
- {
- e.printStackTrace(); //To change body of catch statement use File | Settings |
File Templates.
- }
-
- }
-
- @Override
- public void stop()
- {
- //toto
- }
-
- public void startRequest(ExoContainer container)
- {
- try
- {
- jbidmService_.getIdentitySession().beginTransaction();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- public void endRequest(ExoContainer container)
- {
- try
- {
- jbidmService_.getIdentitySession().getTransaction().commit();
- }
- catch (Exception e)
- {
- e.printStackTrace(); //To change body of catch statement use File | Settings |
File Templates.
- }
- }
-
- public String getExoGroupType()
- {
- return exoGroupType;
- }
-
- public String getExoRootGroupName()
- {
- return exoRootGroupName;
- }
-
- public String getExoRootGroupType()
- {
- return exoRootGroupType;
- }
-
- public boolean isPasswordAsAttribute()
- {
- return passwordAsAttribute;
- }
-}
Copied:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMOrganizationServiceImpl.java
(from rev 804,
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMOrganizationServiceImpl.java)
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMOrganizationServiceImpl.java
(rev 0)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMOrganizationServiceImpl.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -0,0 +1,175 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.services.organization.jbidm;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.component.ComponentRequestLifecycle;
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.container.xml.ValueParam;
+import org.exoplatform.services.cache.CacheService;
+import org.exoplatform.services.organization.BaseOrganizationService;
+import org.picocontainer.Startable;
+
+public class JBossIDMOrganizationServiceImpl extends BaseOrganizationService implements
Startable,
+ ComponentRequestLifecycle
+{
+
+ // We may have several portal containers thus we need one JBossIDMService per portal
container
+ // private static JBossIDMService jbidmService_;
+ private JBossIDMService jbidmService_;
+
+ public static final String EXO_GROUP_TYPE_OPTION = "exoGroupTypeName";
+
+ public static final String EXO_ROOT_GROUP_NAME_OPTION = "exoRootGroupName";
+
+ public static final String EXO_ROOT_GROUP_TYPE_NAME_OPTION =
"exoRootGroupTypeName";
+
+ public static final String PASSWORD_AS_ATTRIBUTE_OPTION =
"passwordAsAttribute";
+
+ private String exoGroupType = "EXO_GROUP_TYPE";
+
+ private String exoRootGroupName = "EXO_ROOT_GROUP";
+
+ private String exoRootGroupType = exoGroupType;
+
+ private boolean passwordAsAttribute = false;
+
+ public JBossIDMOrganizationServiceImpl(InitParams params, CacheService cservice,
JBossIDMService jbidmService)
+ throws Exception
+ {
+ groupDAO_ = new GroupDAOImpl(this, jbidmService);
+ userDAO_ = new UserDAOImpl(this, jbidmService, cservice);
+ userProfileDAO_ = new UserProfileDAOImpl(this, jbidmService, cservice);
+ membershipDAO_ = new MembershipDAOImpl(this, jbidmService);
+ membershipTypeDAO_ = new MembershipTypeDAOImpl(this, jbidmService);
+
+ jbidmService_ = jbidmService;
+
+ if (params != null)
+ {
+ //Options
+ ValueParam exoGroupTypeNameParam = params.getValueParam(EXO_GROUP_TYPE_OPTION);
+ ValueParam exoRootGroupTypeNameParam =
params.getValueParam(EXO_ROOT_GROUP_TYPE_NAME_OPTION);
+ ValueParam exoRootGroupNameParam =
params.getValueParam(EXO_ROOT_GROUP_NAME_OPTION);
+ ValueParam passwordAsAttributeParam =
params.getValueParam(PASSWORD_AS_ATTRIBUTE_OPTION);
+
+ if (exoGroupTypeNameParam != null)
+ {
+ this.exoGroupType = exoGroupTypeNameParam.getValue();
+ }
+
+ if (exoRootGroupNameParam != null)
+ {
+ this.exoRootGroupName = exoRootGroupNameParam.getValue();
+ }
+
+ if (exoRootGroupTypeNameParam != null)
+ {
+ this.exoRootGroupType = exoRootGroupTypeNameParam.getValue();
+ }
+ else if (exoRootGroupTypeNameParam != null)
+ {
+ this.exoRootGroupType = this.exoGroupType;
+ }
+
+ if (passwordAsAttributeParam != null &&
passwordAsAttributeParam.getValue().equalsIgnoreCase("true"))
+ {
+ this.passwordAsAttribute = true;
+ }
+ }
+
+ }
+
+ public final org.jboss.identity.idm.api.Group getJBIDMGroup(String groupId) throws
Exception
+ {
+ String[] ids = groupId.split("/");
+ String name = ids[ids.length - 1];
+ return jbidmService_.getIdentitySession().getPersistenceManager().findGroup(name,
getExoGroupType());
+ }
+
+ @Override
+ public void start()
+ {
+
+ try
+ {
+ // Wrap within transaction so all initializers can work
+ jbidmService_.getIdentitySession().beginTransaction();
+ super.start();
+ jbidmService_.getIdentitySession().getTransaction().commit();
+
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace(); //To change body of catch statement use File | Settings |
File Templates.
+ }
+
+ }
+
+ @Override
+ public void stop()
+ {
+ //toto
+ }
+
+ public void startRequest(ExoContainer container)
+ {
+ try
+ {
+ jbidmService_.getIdentitySession().beginTransaction();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ public void endRequest(ExoContainer container)
+ {
+ try
+ {
+ jbidmService_.getIdentitySession().getTransaction().commit();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace(); //To change body of catch statement use File | Settings |
File Templates.
+ }
+ }
+
+ public String getExoGroupType()
+ {
+ return exoGroupType;
+ }
+
+ public String getExoRootGroupName()
+ {
+ return exoRootGroupName;
+ }
+
+ public String getExoRootGroupType()
+ {
+ return exoRootGroupType;
+ }
+
+ public boolean isPasswordAsAttribute()
+ {
+ return passwordAsAttribute;
+ }
+}
Deleted:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMService.java
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMService.java 2009-11-25
21:32:49 UTC (rev 804)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMService.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -1,34 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.services.organization.jbidm;
-
-import org.jboss.identity.idm.api.IdentitySession;
-import org.jboss.identity.idm.api.IdentitySessionFactory;
-
-public interface JBossIDMService
-{
-
- IdentitySessionFactory getIdentitySessionFactory();
-
- IdentitySession getIdentitySession() throws Exception;
-
- IdentitySession getIdentitySession(String realm) throws Exception;
-
-}
Copied:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMService.java
(from rev 804,
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMService.java)
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMService.java
(rev 0)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMService.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -0,0 +1,34 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.services.organization.jbidm;
+
+import org.jboss.identity.idm.api.IdentitySession;
+import org.jboss.identity.idm.api.IdentitySessionFactory;
+
+public interface JBossIDMService
+{
+
+ IdentitySessionFactory getIdentitySessionFactory();
+
+ IdentitySession getIdentitySession() throws Exception;
+
+ IdentitySession getIdentitySession(String realm) throws Exception;
+
+}
Deleted:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMServiceImpl.java
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMServiceImpl.java 2009-11-25
21:32:49 UTC (rev 804)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMServiceImpl.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -1,222 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.services.organization.jbidm;
-
-import org.exoplatform.container.configuration.ConfigurationManager;
-import org.exoplatform.container.xml.InitParams;
-import org.exoplatform.container.xml.PropertiesParam;
-import org.exoplatform.container.xml.Property;
-import org.exoplatform.container.xml.ValueParam;
-import org.exoplatform.container.xml.ValuesParam;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-import org.hibernate.SessionFactory;
-import org.hibernate.cfg.AnnotationConfiguration;
-import org.hibernate.dialect.Dialect;
-import org.jboss.identity.idm.api.IdentitySession;
-import org.jboss.identity.idm.api.IdentitySessionFactory;
-import org.jboss.identity.idm.api.cfg.IdentityConfiguration;
-import org.jboss.identity.idm.common.exception.IdentityConfigurationException;
-import org.jboss.identity.idm.impl.configuration.IdentityConfigurationImpl;
-import org.jboss.identity.idm.impl.configuration.jaxb2.JAXB2IdentityConfiguration;
-import org.jboss.identity.idm.spi.configuration.metadata.IdentityConfigurationMetaData;
-import org.picocontainer.Startable;
-
-import java.net.URL;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.naming.InitialContext;
-
-public class JBossIDMServiceImpl implements JBossIDMService, Startable
-{
-
- private static Log log_ = ExoLogger.getLogger(JBossIDMServiceImpl.class);
-
- public static final String PARAM_CONFIG_OPTION = "config";
-
- public static final String PARAM_HIBERNATE_PROPS = "hibernate.properties";
-
- public static final String PARAM_HIBERNATE_MAPPINGS = "hibernate.mappings";
-
- public static final String PARAM_HIBERNATE_ANNOTATIONS =
"hibernate.annotations";
-
- public static final String PARAM_JNDI_NAME_OPTION = "jndiName";
-
- public static final String DEFAULT_REALM_NAME_OPTION = "PortalRealm";
-
- // We may have several portal containers thus we need one indentitySessionFactory per
portal container
- // private static IdentitySessionFactory identitySessionFactory;
- private IdentitySessionFactory identitySessionFactory;
-
- private String config;
-
- private String defaultRealmName = "PortalRealm";
-
- private IdentityConfiguration identityConfiguration;
-
- private JBossIDMServiceImpl()
- {
- }
-
- public JBossIDMServiceImpl(InitParams initParams, ConfigurationManager confManager)
throws Exception
- {
- ValueParam config = initParams.getValueParam(PARAM_CONFIG_OPTION);
- ValueParam jndiName = initParams.getValueParam(PARAM_JNDI_NAME_OPTION);
- ValueParam realmName = initParams.getValueParam(DEFAULT_REALM_NAME_OPTION);
-
- if (config == null && jndiName == null)
- {
- throw new IllegalStateException("Either '" + PARAM_CONFIG_OPTION +
"' or '" + PARAM_JNDI_NAME_OPTION
- + "' parameter must " + "be specified");
- }
- if (realmName != null)
- {
- this.defaultRealmName = realmName.getValue();
- }
-
- SessionFactory sf = null;
-
- if (initParams.containsKey(PARAM_HIBERNATE_PROPS))
- {
- PropertiesParam param = initParams.getPropertiesParam(PARAM_HIBERNATE_PROPS);
- AnnotationConfiguration conf_ = new AnnotationConfiguration();
- Iterator properties = param.getPropertyIterator();
- while (properties.hasNext())
- {
- Property p = (Property)properties.next();
-
- //
- String name = p.getName();
- String value = p.getValue();
-
- // Julien: Don't remove that unless you know what you are doing
- if (name.equals("hibernate.dialect"))
- {
- Package pkg = Dialect.class.getPackage();
- String dialect = value.substring(22);
- value = pkg.getName() + "." + dialect; // 22 is the length of
- // "org.hibernate.dialect"
- log_.info("Using dialect " + dialect);
- }
-
- //
- conf_.setProperty(name, value);
- }
-
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
-
- if (initParams.containsKey(PARAM_HIBERNATE_MAPPINGS))
- {
- ValuesParam mappings = initParams.getValuesParam(PARAM_HIBERNATE_MAPPINGS);
-
- List<String> paths = mappings.getValues();
-
- for (String path : paths)
- {
- URL url = cl.getResource(path);
- log_.info("Adding Hibernate Mapping: " + path);
- conf_.addURL(url);
- }
- }
-
- if (initParams.containsKey(PARAM_HIBERNATE_ANNOTATIONS))
- {
- ValuesParam annotations =
initParams.getValuesParam(PARAM_HIBERNATE_ANNOTATIONS);
-
- List<String> classes = annotations.getValues();
-
- for (String name : classes)
- {
- Class clazz = cl.loadClass(name);
- conf_.addAnnotatedClass(clazz);
- }
-
- }
-
- sf = conf_.buildSessionFactory();
-
- }
-
- if (config != null)
- {
- this.config = config.getValue();
- URL configURL = confManager.getURL(this.config);
-
- if (configURL == null)
- {
- throw new IllegalStateException("Cannot fine resource: " +
this.config);
- }
-
- IdentityConfigurationMetaData configMD =
-
JAXB2IdentityConfiguration.createConfigurationMetaData(confManager.getInputStream(this.config));
-
- identityConfiguration = new IdentityConfigurationImpl().configure(configMD);
-
- if (sf != null)
- {
- identityConfiguration.getIdentityConfigurationRegistry().register(sf,
"hibernateSessionFactory");
- }
- }
- else
- {
- identitySessionFactory = (IdentitySessionFactory)new
InitialContext().lookup(jndiName.getValue());
- }
-
- }
-
- public void start()
- {
- if (identitySessionFactory == null)
- {
- try
- {
- identitySessionFactory =
identityConfiguration.buildIdentitySessionFactory();
- }
- catch (IdentityConfigurationException e)
- {
- throw new RuntimeException(e);
- }
- }
- }
-
- public void stop()
- {
- }
-
- public IdentitySessionFactory getIdentitySessionFactory()
- {
- return identitySessionFactory; //To change body of implemented methods use File |
Settings | File Templates.
- }
-
- public IdentitySession getIdentitySession() throws Exception
- {
- return getIdentitySessionFactory().getCurrentIdentitySession(defaultRealmName);
- }
-
- public IdentitySession getIdentitySession(String realm) throws Exception
- {
- if (realm == null)
- {
- throw new IllegalArgumentException("Realm name cannot be null");
- }
- return getIdentitySessionFactory().getCurrentIdentitySession(realm);
- }
-}
Copied:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMServiceImpl.java
(from rev 804,
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMServiceImpl.java)
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMServiceImpl.java
(rev 0)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/JBossIDMServiceImpl.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -0,0 +1,222 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.services.organization.jbidm;
+
+import org.exoplatform.container.configuration.ConfigurationManager;
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.container.xml.PropertiesParam;
+import org.exoplatform.container.xml.Property;
+import org.exoplatform.container.xml.ValueParam;
+import org.exoplatform.container.xml.ValuesParam;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.hibernate.SessionFactory;
+import org.hibernate.cfg.AnnotationConfiguration;
+import org.hibernate.dialect.Dialect;
+import org.jboss.identity.idm.api.IdentitySession;
+import org.jboss.identity.idm.api.IdentitySessionFactory;
+import org.jboss.identity.idm.api.cfg.IdentityConfiguration;
+import org.jboss.identity.idm.common.exception.IdentityConfigurationException;
+import org.jboss.identity.idm.impl.configuration.IdentityConfigurationImpl;
+import org.jboss.identity.idm.impl.configuration.jaxb2.JAXB2IdentityConfiguration;
+import org.jboss.identity.idm.spi.configuration.metadata.IdentityConfigurationMetaData;
+import org.picocontainer.Startable;
+
+import java.net.URL;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.naming.InitialContext;
+
+public class JBossIDMServiceImpl implements JBossIDMService, Startable
+{
+
+ private static Log log_ = ExoLogger.getLogger(JBossIDMServiceImpl.class);
+
+ public static final String PARAM_CONFIG_OPTION = "config";
+
+ public static final String PARAM_HIBERNATE_PROPS = "hibernate.properties";
+
+ public static final String PARAM_HIBERNATE_MAPPINGS = "hibernate.mappings";
+
+ public static final String PARAM_HIBERNATE_ANNOTATIONS =
"hibernate.annotations";
+
+ public static final String PARAM_JNDI_NAME_OPTION = "jndiName";
+
+ public static final String DEFAULT_REALM_NAME_OPTION = "PortalRealm";
+
+ // We may have several portal containers thus we need one indentitySessionFactory per
portal container
+ // private static IdentitySessionFactory identitySessionFactory;
+ private IdentitySessionFactory identitySessionFactory;
+
+ private String config;
+
+ private String defaultRealmName = "PortalRealm";
+
+ private IdentityConfiguration identityConfiguration;
+
+ private JBossIDMServiceImpl()
+ {
+ }
+
+ public JBossIDMServiceImpl(InitParams initParams, ConfigurationManager confManager)
throws Exception
+ {
+ ValueParam config = initParams.getValueParam(PARAM_CONFIG_OPTION);
+ ValueParam jndiName = initParams.getValueParam(PARAM_JNDI_NAME_OPTION);
+ ValueParam realmName = initParams.getValueParam(DEFAULT_REALM_NAME_OPTION);
+
+ if (config == null && jndiName == null)
+ {
+ throw new IllegalStateException("Either '" + PARAM_CONFIG_OPTION +
"' or '" + PARAM_JNDI_NAME_OPTION
+ + "' parameter must " + "be specified");
+ }
+ if (realmName != null)
+ {
+ this.defaultRealmName = realmName.getValue();
+ }
+
+ SessionFactory sf = null;
+
+ if (initParams.containsKey(PARAM_HIBERNATE_PROPS))
+ {
+ PropertiesParam param = initParams.getPropertiesParam(PARAM_HIBERNATE_PROPS);
+ AnnotationConfiguration conf_ = new AnnotationConfiguration();
+ Iterator properties = param.getPropertyIterator();
+ while (properties.hasNext())
+ {
+ Property p = (Property)properties.next();
+
+ //
+ String name = p.getName();
+ String value = p.getValue();
+
+ // Julien: Don't remove that unless you know what you are doing
+ if (name.equals("hibernate.dialect"))
+ {
+ Package pkg = Dialect.class.getPackage();
+ String dialect = value.substring(22);
+ value = pkg.getName() + "." + dialect; // 22 is the length of
+ // "org.hibernate.dialect"
+ log_.info("Using dialect " + dialect);
+ }
+
+ //
+ conf_.setProperty(name, value);
+ }
+
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+
+ if (initParams.containsKey(PARAM_HIBERNATE_MAPPINGS))
+ {
+ ValuesParam mappings = initParams.getValuesParam(PARAM_HIBERNATE_MAPPINGS);
+
+ List<String> paths = mappings.getValues();
+
+ for (String path : paths)
+ {
+ URL url = cl.getResource(path);
+ log_.info("Adding Hibernate Mapping: " + path);
+ conf_.addURL(url);
+ }
+ }
+
+ if (initParams.containsKey(PARAM_HIBERNATE_ANNOTATIONS))
+ {
+ ValuesParam annotations =
initParams.getValuesParam(PARAM_HIBERNATE_ANNOTATIONS);
+
+ List<String> classes = annotations.getValues();
+
+ for (String name : classes)
+ {
+ Class clazz = cl.loadClass(name);
+ conf_.addAnnotatedClass(clazz);
+ }
+
+ }
+
+ sf = conf_.buildSessionFactory();
+
+ }
+
+ if (config != null)
+ {
+ this.config = config.getValue();
+ URL configURL = confManager.getURL(this.config);
+
+ if (configURL == null)
+ {
+ throw new IllegalStateException("Cannot fine resource: " +
this.config);
+ }
+
+ IdentityConfigurationMetaData configMD =
+
JAXB2IdentityConfiguration.createConfigurationMetaData(confManager.getInputStream(this.config));
+
+ identityConfiguration = new IdentityConfigurationImpl().configure(configMD);
+
+ if (sf != null)
+ {
+ identityConfiguration.getIdentityConfigurationRegistry().register(sf,
"hibernateSessionFactory");
+ }
+ }
+ else
+ {
+ identitySessionFactory = (IdentitySessionFactory)new
InitialContext().lookup(jndiName.getValue());
+ }
+
+ }
+
+ public void start()
+ {
+ if (identitySessionFactory == null)
+ {
+ try
+ {
+ identitySessionFactory =
identityConfiguration.buildIdentitySessionFactory();
+ }
+ catch (IdentityConfigurationException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+
+ public void stop()
+ {
+ }
+
+ public IdentitySessionFactory getIdentitySessionFactory()
+ {
+ return identitySessionFactory; //To change body of implemented methods use File |
Settings | File Templates.
+ }
+
+ public IdentitySession getIdentitySession() throws Exception
+ {
+ return getIdentitySessionFactory().getCurrentIdentitySession(defaultRealmName);
+ }
+
+ public IdentitySession getIdentitySession(String realm) throws Exception
+ {
+ if (realm == null)
+ {
+ throw new IllegalArgumentException("Realm name cannot be null");
+ }
+ return getIdentitySessionFactory().getCurrentIdentitySession(realm);
+ }
+}
Deleted:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipDAOImpl.java
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipDAOImpl.java 2009-11-25
21:32:49 UTC (rev 804)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipDAOImpl.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -1,394 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.services.organization.jbidm;
-
-import org.exoplatform.commons.utils.ListenerStack;
-import org.exoplatform.services.organization.Group;
-import org.exoplatform.services.organization.Membership;
-import org.exoplatform.services.organization.MembershipEventListener;
-import org.exoplatform.services.organization.MembershipHandler;
-import org.exoplatform.services.organization.MembershipType;
-import org.exoplatform.services.organization.User;
-import org.jboss.identity.idm.api.IdentitySession;
-import org.jboss.identity.idm.api.Role;
-import org.jboss.identity.idm.api.RoleType;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import javax.naming.InvalidNameException;
-
-/**
- */
-public class MembershipDAOImpl implements MembershipHandler
-{
-
- private JBossIDMService service_;
-
- private List listeners_;
-
- private JBossIDMOrganizationServiceImpl orgService;
-
- public MembershipDAOImpl(JBossIDMOrganizationServiceImpl orgService, JBossIDMService
service)
- {
- service_ = service;
- listeners_ = new ListenerStack(5);
- this.orgService = orgService;
- }
-
- public void addMembershipEventListener(MembershipEventListener listener)
- {
- listeners_.add(listener);
- }
-
- final public Membership createMembershipInstance()
- {
- return new MembershipImpl();
- }
-
- public void createMembership(Membership m, boolean broadcast) throws Exception
- {
-
- if (broadcast)
- {
- preSave(m, true);
- }
-
- saveMembership(m, false);
-
- if (broadcast)
- {
- postSave(m, true);
- }
-
- }
-
- public void linkMembership(User user, Group g, MembershipType mt, boolean broadcast)
throws Exception
- {
- if (g == null)
- {
- throw new InvalidNameException("Can not create membership record for "
+ user.getUserName()
- + " because group is null");
- }
-
- if (mt == null)
- {
- throw new InvalidNameException("Can not create membership record for "
+ user.getUserName()
- + " because membership type is null");
- }
-
- if (getIdentitySession().getRoleManager().getRoleType(mt.getName()) == null)
- {
- getIdentitySession().getRoleManager().createRoleType(mt.getName());
- }
-
- String groupId =
- getIdentitySession().getPersistenceManager().createGroupId(g.getGroupName(),
orgService.getExoGroupType());
-
- if (getIdentitySession().getRoleManager().hasRole(user.getUserName(), groupId,
mt.getName()))
- {
- return;
- }
-
- MembershipImpl membership = new MembershipImpl();
- membership.setMembershipType(mt.getName());
- membership.setUserName(user.getUserName());
- membership.setGroupId(g.getId());
-
- if (broadcast)
- {
- preSave(membership, true);
- }
-
- getIdentitySession().getRoleManager().createRole(mt.getName(), user.getUserName(),
groupId);
-
- if (broadcast)
- {
- postSave(membership, true);
- }
-
- }
-
- public void saveMembership(Membership m, boolean broadcast) throws Exception
- {
- String groupId =
-
getIdentitySession().getPersistenceManager().createGroupId(getGroupNameFromId(m.getGroupId()),
- orgService.getExoGroupType());
-
- if (getIdentitySession().getRoleManager().hasRole(m.getUserName(), groupId,
m.getMembershipType()))
- {
- return;
- }
-
- if (broadcast)
- {
- preSave(m, false);
- }
-
- getIdentitySession().getRoleManager().createRole(m.getMembershipType(),
m.getUserName(), groupId);
-
- if (broadcast)
- {
- postSave(m, false);
- }
- }
-
- public Membership removeMembership(String id, boolean broadcast) throws Exception
- {
-
- Membership m = new MembershipImpl(id);
-
- String groupId =
-
getIdentitySession().getPersistenceManager().createGroupId(getGroupNameFromId(m.getGroupId()),
- orgService.getExoGroupType());
-
- if (!getIdentitySession().getRoleManager().hasRole(m.getUserName(), groupId,
m.getMembershipType()))
- {
- return m;
- }
-
- if (broadcast)
- {
- preDelete(m);
- }
-
- getIdentitySession().getRoleManager().removeRole(m.getMembershipType(),
m.getUserName(), groupId);
-
- if (broadcast)
- {
- postDelete(m);
- }
- return m;
- }
-
- public Collection removeMembershipByUser(String userName, boolean broadcast) throws
Exception
- {
-
- Collection<Role> roles =
getIdentitySession().getRoleManager().findRoles(userName, null);
-
- //TODO: Exo UI has hardcoded casts to List
- List<Membership> memberships = new LinkedList<Membership>();
-
- for (Role role : roles)
- {
- MembershipImpl m = new MembershipImpl();
- Group g =
((GroupDAOImpl)orgService.getGroupHandler()).getGroup(role.getGroup().getName());
- m.setGroupId(g.getId());
- m.setUserName(role.getUser().getId());
- m.setMembershipType(role.getRoleType().getName());
- memberships.add(m);
-
- if (broadcast)
- {
- preDelete(m);
- }
-
- getIdentitySession().getRoleManager().removeRole(role);
-
- if (broadcast)
- {
- postDelete(m);
- }
-
- }
-
- return memberships;
-
- }
-
- public Membership findMembershipByUserGroupAndType(String userName, String groupId,
String type) throws Exception
- {
- String gid =
-
getIdentitySession().getPersistenceManager().createGroupId(getGroupNameFromId(groupId),
- orgService.getExoGroupType());
-
- Role role = getIdentitySession().getRoleManager().getRole(type, userName, gid);
-
- if (role == null)
- {
- return null;
- }
-
- MembershipImpl m = new MembershipImpl();
- m.setGroupId(groupId);
- m.setUserName(userName);
- m.setMembershipType(type);
-
- return m;
- }
-
- public Collection findMembershipsByUserAndGroup(String userName, String groupId)
throws Exception
- {
- if (userName == null)
- {
- // julien fix : if user name is null, need to check if we do need to return a
special group
- return Collections.emptyList();
- }
-
- String gid =
-
getIdentitySession().getPersistenceManager().createGroupId(getGroupNameFromId(groupId),
- orgService.getExoGroupType());
-
- Collection<RoleType> roleTypes =
getIdentitySession().getRoleManager().findRoleTypes(userName, gid, null);
-
- //TODO: Exo UI has hardcoded casts to List
- List<Membership> memberships = new LinkedList<Membership>();
-
- for (RoleType roleType : roleTypes)
- {
- MembershipImpl m = new MembershipImpl();
- m.setGroupId(groupId);
- m.setUserName(userName);
- m.setMembershipType(roleType.getName());
- memberships.add(m);
- }
-
- return memberships;
- }
-
- public Collection findMembershipsByUser(String userName) throws Exception
- {
- Collection<Role> roles =
getIdentitySession().getRoleManager().findRoles(userName, null);
-
- //TODO: Exo UI has hardcoded casts to List
- List<Membership> memberships = new LinkedList<Membership>();
-
- for (Role role : roles)
- {
- MembershipImpl m = new MembershipImpl();
- Group g =
((GroupDAOImpl)orgService.getGroupHandler()).getGroup(role.getGroup().getName());
- m.setGroupId(g.getId());
- m.setUserName(role.getUser().getId());
- m.setMembershipType(role.getRoleType().getName());
- memberships.add(m);
- }
-
- return memberships;
- }
-
- static void removeMembershipEntriesOfGroup(JBossIDMOrganizationServiceImpl orgService,
Group group,
- IdentitySession session) throws Exception
- {
- String gid = session.getPersistenceManager().createGroupId(group.getGroupName(),
orgService.getExoGroupType());
-
- Collection<Role> roles = session.getRoleManager().findRoles(gid, null);
-
- for (Role role : roles)
- {
- session.getRoleManager().removeRole(role);
- }
- }
-
- public Collection findMembershipsByGroup(Group group) throws Exception
- {
- return findMembershipsByGroupId(group.getId());
- }
-
- public Collection findMembershipsByGroupId(String groupId) throws Exception
- {
- String gid =
-
getIdentitySession().getPersistenceManager().createGroupId(getGroupNameFromId(groupId),
- orgService.getExoGroupType());
-
- Collection<Role> roles = getIdentitySession().getRoleManager().findRoles(gid,
null);
-
- //TODO: Exo UI has hardcoded casts to List
- List<Membership> memberships = new LinkedList<Membership>();
-
- for (Role role : roles)
- {
- MembershipImpl m = new MembershipImpl();
- Group g =
((GroupDAOImpl)orgService.getGroupHandler()).getGroup(role.getGroup().getName());
- m.setGroupId(g.getId());
- m.setUserName(role.getUser().getId());
- m.setMembershipType(role.getRoleType().getName());
- memberships.add(m);
- }
-
- return memberships;
-
- }
-
- public Membership findMembership(String id) throws Exception
- {
- Membership m = new MembershipImpl(id);
-
- String groupId =
-
getIdentitySession().getPersistenceManager().createGroupId(getGroupNameFromId(m.getGroupId()),
- orgService.getExoGroupType());
-
- if (getIdentitySession().getRoleManager().hasRole(m.getUserName(), groupId,
m.getMembershipType()))
- {
- return m;
- }
-
- return null;
- }
-
- private void preSave(Membership membership, boolean isNew) throws Exception
- {
- for (int i = 0; i < listeners_.size(); i++)
- {
- MembershipEventListener listener = (MembershipEventListener)listeners_.get(i);
- listener.preSave(membership, isNew);
- }
- }
-
- private void postSave(Membership membership, boolean isNew) throws Exception
- {
- for (int i = 0; i < listeners_.size(); i++)
- {
- MembershipEventListener listener = (MembershipEventListener)listeners_.get(i);
- listener.postSave(membership, isNew);
- }
- }
-
- private void preDelete(Membership membership) throws Exception
- {
- for (int i = 0; i < listeners_.size(); i++)
- {
- MembershipEventListener listener = (MembershipEventListener)listeners_.get(i);
- listener.preDelete(membership);
- }
- }
-
- private void postDelete(Membership membership) throws Exception
- {
- for (int i = 0; i < listeners_.size(); i++)
- {
- MembershipEventListener listener = (MembershipEventListener)listeners_.get(i);
- listener.postDelete(membership);
- }
- }
-
- private IdentitySession getIdentitySession() throws Exception
- {
- return service_.getIdentitySession();
- }
-
- private String getGroupNameFromId(String groupId)
- {
- String[] ids = groupId.split("/");
-
- return ids[ids.length - 1];
- }
-}
Copied:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipDAOImpl.java
(from rev 804,
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipDAOImpl.java)
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipDAOImpl.java
(rev 0)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipDAOImpl.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -0,0 +1,394 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.services.organization.jbidm;
+
+import org.exoplatform.commons.utils.ListenerStack;
+import org.exoplatform.services.organization.Group;
+import org.exoplatform.services.organization.Membership;
+import org.exoplatform.services.organization.MembershipEventListener;
+import org.exoplatform.services.organization.MembershipHandler;
+import org.exoplatform.services.organization.MembershipType;
+import org.exoplatform.services.organization.User;
+import org.jboss.identity.idm.api.IdentitySession;
+import org.jboss.identity.idm.api.Role;
+import org.jboss.identity.idm.api.RoleType;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.naming.InvalidNameException;
+
+/**
+ */
+public class MembershipDAOImpl implements MembershipHandler
+{
+
+ private JBossIDMService service_;
+
+ private List listeners_;
+
+ private JBossIDMOrganizationServiceImpl orgService;
+
+ public MembershipDAOImpl(JBossIDMOrganizationServiceImpl orgService, JBossIDMService
service)
+ {
+ service_ = service;
+ listeners_ = new ListenerStack(5);
+ this.orgService = orgService;
+ }
+
+ public void addMembershipEventListener(MembershipEventListener listener)
+ {
+ listeners_.add(listener);
+ }
+
+ final public Membership createMembershipInstance()
+ {
+ return new MembershipImpl();
+ }
+
+ public void createMembership(Membership m, boolean broadcast) throws Exception
+ {
+
+ if (broadcast)
+ {
+ preSave(m, true);
+ }
+
+ saveMembership(m, false);
+
+ if (broadcast)
+ {
+ postSave(m, true);
+ }
+
+ }
+
+ public void linkMembership(User user, Group g, MembershipType mt, boolean broadcast)
throws Exception
+ {
+ if (g == null)
+ {
+ throw new InvalidNameException("Can not create membership record for "
+ user.getUserName()
+ + " because group is null");
+ }
+
+ if (mt == null)
+ {
+ throw new InvalidNameException("Can not create membership record for "
+ user.getUserName()
+ + " because membership type is null");
+ }
+
+ if (getIdentitySession().getRoleManager().getRoleType(mt.getName()) == null)
+ {
+ getIdentitySession().getRoleManager().createRoleType(mt.getName());
+ }
+
+ String groupId =
+ getIdentitySession().getPersistenceManager().createGroupId(g.getGroupName(),
orgService.getExoGroupType());
+
+ if (getIdentitySession().getRoleManager().hasRole(user.getUserName(), groupId,
mt.getName()))
+ {
+ return;
+ }
+
+ MembershipImpl membership = new MembershipImpl();
+ membership.setMembershipType(mt.getName());
+ membership.setUserName(user.getUserName());
+ membership.setGroupId(g.getId());
+
+ if (broadcast)
+ {
+ preSave(membership, true);
+ }
+
+ getIdentitySession().getRoleManager().createRole(mt.getName(), user.getUserName(),
groupId);
+
+ if (broadcast)
+ {
+ postSave(membership, true);
+ }
+
+ }
+
+ public void saveMembership(Membership m, boolean broadcast) throws Exception
+ {
+ String groupId =
+
getIdentitySession().getPersistenceManager().createGroupId(getGroupNameFromId(m.getGroupId()),
+ orgService.getExoGroupType());
+
+ if (getIdentitySession().getRoleManager().hasRole(m.getUserName(), groupId,
m.getMembershipType()))
+ {
+ return;
+ }
+
+ if (broadcast)
+ {
+ preSave(m, false);
+ }
+
+ getIdentitySession().getRoleManager().createRole(m.getMembershipType(),
m.getUserName(), groupId);
+
+ if (broadcast)
+ {
+ postSave(m, false);
+ }
+ }
+
+ public Membership removeMembership(String id, boolean broadcast) throws Exception
+ {
+
+ Membership m = new MembershipImpl(id);
+
+ String groupId =
+
getIdentitySession().getPersistenceManager().createGroupId(getGroupNameFromId(m.getGroupId()),
+ orgService.getExoGroupType());
+
+ if (!getIdentitySession().getRoleManager().hasRole(m.getUserName(), groupId,
m.getMembershipType()))
+ {
+ return m;
+ }
+
+ if (broadcast)
+ {
+ preDelete(m);
+ }
+
+ getIdentitySession().getRoleManager().removeRole(m.getMembershipType(),
m.getUserName(), groupId);
+
+ if (broadcast)
+ {
+ postDelete(m);
+ }
+ return m;
+ }
+
+ public Collection removeMembershipByUser(String userName, boolean broadcast) throws
Exception
+ {
+
+ Collection<Role> roles =
getIdentitySession().getRoleManager().findRoles(userName, null);
+
+ //TODO: Exo UI has hardcoded casts to List
+ List<Membership> memberships = new LinkedList<Membership>();
+
+ for (Role role : roles)
+ {
+ MembershipImpl m = new MembershipImpl();
+ Group g =
((GroupDAOImpl)orgService.getGroupHandler()).getGroup(role.getGroup().getName());
+ m.setGroupId(g.getId());
+ m.setUserName(role.getUser().getId());
+ m.setMembershipType(role.getRoleType().getName());
+ memberships.add(m);
+
+ if (broadcast)
+ {
+ preDelete(m);
+ }
+
+ getIdentitySession().getRoleManager().removeRole(role);
+
+ if (broadcast)
+ {
+ postDelete(m);
+ }
+
+ }
+
+ return memberships;
+
+ }
+
+ public Membership findMembershipByUserGroupAndType(String userName, String groupId,
String type) throws Exception
+ {
+ String gid =
+
getIdentitySession().getPersistenceManager().createGroupId(getGroupNameFromId(groupId),
+ orgService.getExoGroupType());
+
+ Role role = getIdentitySession().getRoleManager().getRole(type, userName, gid);
+
+ if (role == null)
+ {
+ return null;
+ }
+
+ MembershipImpl m = new MembershipImpl();
+ m.setGroupId(groupId);
+ m.setUserName(userName);
+ m.setMembershipType(type);
+
+ return m;
+ }
+
+ public Collection findMembershipsByUserAndGroup(String userName, String groupId)
throws Exception
+ {
+ if (userName == null)
+ {
+ // julien fix : if user name is null, need to check if we do need to return a
special group
+ return Collections.emptyList();
+ }
+
+ String gid =
+
getIdentitySession().getPersistenceManager().createGroupId(getGroupNameFromId(groupId),
+ orgService.getExoGroupType());
+
+ Collection<RoleType> roleTypes =
getIdentitySession().getRoleManager().findRoleTypes(userName, gid, null);
+
+ //TODO: Exo UI has hardcoded casts to List
+ List<Membership> memberships = new LinkedList<Membership>();
+
+ for (RoleType roleType : roleTypes)
+ {
+ MembershipImpl m = new MembershipImpl();
+ m.setGroupId(groupId);
+ m.setUserName(userName);
+ m.setMembershipType(roleType.getName());
+ memberships.add(m);
+ }
+
+ return memberships;
+ }
+
+ public Collection findMembershipsByUser(String userName) throws Exception
+ {
+ Collection<Role> roles =
getIdentitySession().getRoleManager().findRoles(userName, null);
+
+ //TODO: Exo UI has hardcoded casts to List
+ List<Membership> memberships = new LinkedList<Membership>();
+
+ for (Role role : roles)
+ {
+ MembershipImpl m = new MembershipImpl();
+ Group g =
((GroupDAOImpl)orgService.getGroupHandler()).getGroup(role.getGroup().getName());
+ m.setGroupId(g.getId());
+ m.setUserName(role.getUser().getId());
+ m.setMembershipType(role.getRoleType().getName());
+ memberships.add(m);
+ }
+
+ return memberships;
+ }
+
+ static void removeMembershipEntriesOfGroup(JBossIDMOrganizationServiceImpl orgService,
Group group,
+ IdentitySession session) throws Exception
+ {
+ String gid = session.getPersistenceManager().createGroupId(group.getGroupName(),
orgService.getExoGroupType());
+
+ Collection<Role> roles = session.getRoleManager().findRoles(gid, null);
+
+ for (Role role : roles)
+ {
+ session.getRoleManager().removeRole(role);
+ }
+ }
+
+ public Collection findMembershipsByGroup(Group group) throws Exception
+ {
+ return findMembershipsByGroupId(group.getId());
+ }
+
+ public Collection findMembershipsByGroupId(String groupId) throws Exception
+ {
+ String gid =
+
getIdentitySession().getPersistenceManager().createGroupId(getGroupNameFromId(groupId),
+ orgService.getExoGroupType());
+
+ Collection<Role> roles = getIdentitySession().getRoleManager().findRoles(gid,
null);
+
+ //TODO: Exo UI has hardcoded casts to List
+ List<Membership> memberships = new LinkedList<Membership>();
+
+ for (Role role : roles)
+ {
+ MembershipImpl m = new MembershipImpl();
+ Group g =
((GroupDAOImpl)orgService.getGroupHandler()).getGroup(role.getGroup().getName());
+ m.setGroupId(g.getId());
+ m.setUserName(role.getUser().getId());
+ m.setMembershipType(role.getRoleType().getName());
+ memberships.add(m);
+ }
+
+ return memberships;
+
+ }
+
+ public Membership findMembership(String id) throws Exception
+ {
+ Membership m = new MembershipImpl(id);
+
+ String groupId =
+
getIdentitySession().getPersistenceManager().createGroupId(getGroupNameFromId(m.getGroupId()),
+ orgService.getExoGroupType());
+
+ if (getIdentitySession().getRoleManager().hasRole(m.getUserName(), groupId,
m.getMembershipType()))
+ {
+ return m;
+ }
+
+ return null;
+ }
+
+ private void preSave(Membership membership, boolean isNew) throws Exception
+ {
+ for (int i = 0; i < listeners_.size(); i++)
+ {
+ MembershipEventListener listener = (MembershipEventListener)listeners_.get(i);
+ listener.preSave(membership, isNew);
+ }
+ }
+
+ private void postSave(Membership membership, boolean isNew) throws Exception
+ {
+ for (int i = 0; i < listeners_.size(); i++)
+ {
+ MembershipEventListener listener = (MembershipEventListener)listeners_.get(i);
+ listener.postSave(membership, isNew);
+ }
+ }
+
+ private void preDelete(Membership membership) throws Exception
+ {
+ for (int i = 0; i < listeners_.size(); i++)
+ {
+ MembershipEventListener listener = (MembershipEventListener)listeners_.get(i);
+ listener.preDelete(membership);
+ }
+ }
+
+ private void postDelete(Membership membership) throws Exception
+ {
+ for (int i = 0; i < listeners_.size(); i++)
+ {
+ MembershipEventListener listener = (MembershipEventListener)listeners_.get(i);
+ listener.postDelete(membership);
+ }
+ }
+
+ private IdentitySession getIdentitySession() throws Exception
+ {
+ return service_.getIdentitySession();
+ }
+
+ private String getGroupNameFromId(String groupId)
+ {
+ String[] ids = groupId.split("/");
+
+ return ids[ids.length - 1];
+ }
+}
Deleted:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipImpl.java
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipImpl.java 2009-11-25
21:32:49 UTC (rev 804)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipImpl.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -1,106 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.services.organization.jbidm;
-
-import org.exoplatform.services.organization.Membership;
-
-public class MembershipImpl implements Membership
-{
- private String membershipType = "member";
-
- private String userName = null;
-
- private String groupId = null;
-
- public MembershipImpl()
- {
- }
-
- public MembershipImpl(String id)
- {
- String[] fields = id.split(":");
-
- // Id can be pure "//" in some cases
- if (fields[0] != null)
- {
- membershipType = fields[0];
- }
- if (fields[1] != null)
- {
- userName = fields[1];
- }
- if (fields[2] != null)
- {
- groupId = fields[2];
- }
- }
-
- public String getId()
- {
- StringBuffer id = new StringBuffer();
-
- if (membershipType != null)
- {
- id.append(membershipType);
- }
- id.append(":");
- if (userName != null)
- {
- id.append(userName);
- }
- id.append(":");
- if (groupId != null)
- {
- id.append(groupId);
- }
-
- return id.toString();
- }
-
- public String getMembershipType()
- {
- return membershipType;
- }
-
- public void setMembershipType(String membershipType)
- {
- this.membershipType = membershipType;
- }
-
- public String getUserName()
- {
- return userName;
- }
-
- public void setUserName(String userName)
- {
- this.userName = userName;
- }
-
- public String getGroupId()
- {
- return groupId;
- }
-
- public void setGroupId(String groupId)
- {
- this.groupId = groupId;
- }
-}
Copied:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipImpl.java
(from rev 804,
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipImpl.java)
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipImpl.java
(rev 0)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipImpl.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -0,0 +1,106 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.services.organization.jbidm;
+
+import org.exoplatform.services.organization.Membership;
+
+public class MembershipImpl implements Membership
+{
+ private String membershipType = "member";
+
+ private String userName = null;
+
+ private String groupId = null;
+
+ public MembershipImpl()
+ {
+ }
+
+ public MembershipImpl(String id)
+ {
+ String[] fields = id.split(":");
+
+ // Id can be pure "//" in some cases
+ if (fields[0] != null)
+ {
+ membershipType = fields[0];
+ }
+ if (fields[1] != null)
+ {
+ userName = fields[1];
+ }
+ if (fields[2] != null)
+ {
+ groupId = fields[2];
+ }
+ }
+
+ public String getId()
+ {
+ StringBuffer id = new StringBuffer();
+
+ if (membershipType != null)
+ {
+ id.append(membershipType);
+ }
+ id.append(":");
+ if (userName != null)
+ {
+ id.append(userName);
+ }
+ id.append(":");
+ if (groupId != null)
+ {
+ id.append(groupId);
+ }
+
+ return id.toString();
+ }
+
+ public String getMembershipType()
+ {
+ return membershipType;
+ }
+
+ public void setMembershipType(String membershipType)
+ {
+ this.membershipType = membershipType;
+ }
+
+ public String getUserName()
+ {
+ return userName;
+ }
+
+ public void setUserName(String userName)
+ {
+ this.userName = userName;
+ }
+
+ public String getGroupId()
+ {
+ return groupId;
+ }
+
+ public void setGroupId(String groupId)
+ {
+ this.groupId = groupId;
+ }
+}
Deleted:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipTypeDAOImpl.java
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipTypeDAOImpl.java 2009-11-25
21:32:49 UTC (rev 804)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipTypeDAOImpl.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -1,178 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.services.organization.jbidm;
-
-import org.exoplatform.services.organization.MembershipType;
-import org.exoplatform.services.organization.MembershipTypeHandler;
-import org.exoplatform.services.organization.impl.MembershipTypeImpl;
-import org.jboss.identity.idm.api.IdentitySession;
-import org.jboss.identity.idm.api.RoleType;
-
-import java.text.DateFormat;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-public class MembershipTypeDAOImpl implements MembershipTypeHandler
-{
-
- public static final String MEMBERSHIP_DESCRIPTION = "description";
-
- public static final String MEMBERSHIP_OWNER = "owner";
-
- public static final String MEMBERSHIP_CREATE_DATE = "create_date";
-
- public static final String MEMBERSHIP_MODIFIED_DATE = "modified_date";
-
- public static final DateFormat dateFormat = DateFormat.getInstance();
-
- private JBossIDMService service_;
-
- private JBossIDMOrganizationServiceImpl orgService;
-
- public MembershipTypeDAOImpl(JBossIDMOrganizationServiceImpl orgService,
JBossIDMService service)
- {
- service_ = service;
- this.orgService = orgService;
- }
-
- final public MembershipType createMembershipTypeInstance()
- {
- return new MembershipTypeImpl();
- }
-
- public MembershipType createMembershipType(MembershipType mt, boolean broadcast)
throws Exception
- {
- Date now = new Date();
- mt.setCreatedDate(now);
- mt.setModifiedDate(now);
-
- getIdentitySession().getRoleManager().createRoleType(mt.getName());
- updateMembershipType(mt);
-
- return mt;
- }
-
- public MembershipType saveMembershipType(MembershipType mt, boolean broadcast) throws
Exception
- {
- Date now = new Date();
- mt.setModifiedDate(now);
- updateMembershipType(mt);
- return mt;
- }
-
- public MembershipType findMembershipType(String name) throws Exception
- {
- RoleType rt = getIdentitySession().getRoleManager().getRoleType(name);
-
- MembershipType mt = null;
-
- if (rt != null)
- {
- mt = new MembershipTypeImpl(name, null, null);
- populateMembershipType(mt);
- }
-
- return mt;
- }
-
- public MembershipType removeMembershipType(String name, boolean broadcast) throws
Exception
- {
- MembershipType mt = findMembershipType(name);
-
- if (mt != null)
- {
- getIdentitySession().getRoleManager().removeRoleType(mt.getName());
- }
-
- return mt;
-
- }
-
- public Collection findMembershipTypes() throws Exception
- {
-
- Collection<RoleType> rts =
getIdentitySession().getRoleManager().findRoleTypes();
-
- List<MembershipType> mts = new LinkedList<MembershipType>();
-
- for (RoleType rt : rts)
- {
- MembershipType mt = new MembershipTypeImpl(rt.getName(), null, null);
- populateMembershipType(mt);
- mts.add(mt);
- }
-
- return mts;
- }
-
- private IdentitySession getIdentitySession() throws Exception
- {
- return service_.getIdentitySession();
- }
-
- private void updateMembershipType(MembershipType mt) throws Exception
- {
-
- RoleType rt = getIdentitySession().getRoleManager().getRoleType(mt.getName());
-
- Map<String, String> props = new HashMap<String, String>();
-
- props.put(MEMBERSHIP_DESCRIPTION, mt.getDescription());
- props.put(MEMBERSHIP_CREATE_DATE, mt.getCreatedDate() == null ? null :
dateFormat.format(mt.getCreatedDate()));
- props
- .put(MEMBERSHIP_MODIFIED_DATE, mt.getModifiedDate() == null ? null :
dateFormat.format(mt.getModifiedDate()));
- props.put(MEMBERSHIP_OWNER, mt.getOwner());
-
- getIdentitySession().getRoleManager().setProperties(rt, props);
-
- return;
-
- }
-
- private void populateMembershipType(MembershipType mt) throws Exception
- {
- RoleType rt = getIdentitySession().getRoleManager().getRoleType(mt.getName());
-
- Map<String, String> props =
getIdentitySession().getRoleManager().getProperties(rt);
-
- mt.setDescription(props.get(MEMBERSHIP_DESCRIPTION));
- mt.setOwner(props.get(MEMBERSHIP_OWNER));
-
- String cd = props.get(MEMBERSHIP_CREATE_DATE);
- String md = props.get(MEMBERSHIP_MODIFIED_DATE);
-
- if (cd != null)
- {
- mt.setCreatedDate(dateFormat.parse(cd));
- }
-
- if (md != null)
- {
- mt.setModifiedDate(dateFormat.parse(md));
- }
-
- return;
- }
-
-}
Copied:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipTypeDAOImpl.java
(from rev 804,
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipTypeDAOImpl.java)
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipTypeDAOImpl.java
(rev 0)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/MembershipTypeDAOImpl.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -0,0 +1,178 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.services.organization.jbidm;
+
+import org.exoplatform.services.organization.MembershipType;
+import org.exoplatform.services.organization.MembershipTypeHandler;
+import org.exoplatform.services.organization.impl.MembershipTypeImpl;
+import org.jboss.identity.idm.api.IdentitySession;
+import org.jboss.identity.idm.api.RoleType;
+
+import java.text.DateFormat;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+public class MembershipTypeDAOImpl implements MembershipTypeHandler
+{
+
+ public static final String MEMBERSHIP_DESCRIPTION = "description";
+
+ public static final String MEMBERSHIP_OWNER = "owner";
+
+ public static final String MEMBERSHIP_CREATE_DATE = "create_date";
+
+ public static final String MEMBERSHIP_MODIFIED_DATE = "modified_date";
+
+ public static final DateFormat dateFormat = DateFormat.getInstance();
+
+ private JBossIDMService service_;
+
+ private JBossIDMOrganizationServiceImpl orgService;
+
+ public MembershipTypeDAOImpl(JBossIDMOrganizationServiceImpl orgService,
JBossIDMService service)
+ {
+ service_ = service;
+ this.orgService = orgService;
+ }
+
+ final public MembershipType createMembershipTypeInstance()
+ {
+ return new MembershipTypeImpl();
+ }
+
+ public MembershipType createMembershipType(MembershipType mt, boolean broadcast)
throws Exception
+ {
+ Date now = new Date();
+ mt.setCreatedDate(now);
+ mt.setModifiedDate(now);
+
+ getIdentitySession().getRoleManager().createRoleType(mt.getName());
+ updateMembershipType(mt);
+
+ return mt;
+ }
+
+ public MembershipType saveMembershipType(MembershipType mt, boolean broadcast) throws
Exception
+ {
+ Date now = new Date();
+ mt.setModifiedDate(now);
+ updateMembershipType(mt);
+ return mt;
+ }
+
+ public MembershipType findMembershipType(String name) throws Exception
+ {
+ RoleType rt = getIdentitySession().getRoleManager().getRoleType(name);
+
+ MembershipType mt = null;
+
+ if (rt != null)
+ {
+ mt = new MembershipTypeImpl(name, null, null);
+ populateMembershipType(mt);
+ }
+
+ return mt;
+ }
+
+ public MembershipType removeMembershipType(String name, boolean broadcast) throws
Exception
+ {
+ MembershipType mt = findMembershipType(name);
+
+ if (mt != null)
+ {
+ getIdentitySession().getRoleManager().removeRoleType(mt.getName());
+ }
+
+ return mt;
+
+ }
+
+ public Collection findMembershipTypes() throws Exception
+ {
+
+ Collection<RoleType> rts =
getIdentitySession().getRoleManager().findRoleTypes();
+
+ List<MembershipType> mts = new LinkedList<MembershipType>();
+
+ for (RoleType rt : rts)
+ {
+ MembershipType mt = new MembershipTypeImpl(rt.getName(), null, null);
+ populateMembershipType(mt);
+ mts.add(mt);
+ }
+
+ return mts;
+ }
+
+ private IdentitySession getIdentitySession() throws Exception
+ {
+ return service_.getIdentitySession();
+ }
+
+ private void updateMembershipType(MembershipType mt) throws Exception
+ {
+
+ RoleType rt = getIdentitySession().getRoleManager().getRoleType(mt.getName());
+
+ Map<String, String> props = new HashMap<String, String>();
+
+ props.put(MEMBERSHIP_DESCRIPTION, mt.getDescription());
+ props.put(MEMBERSHIP_CREATE_DATE, mt.getCreatedDate() == null ? null :
dateFormat.format(mt.getCreatedDate()));
+ props
+ .put(MEMBERSHIP_MODIFIED_DATE, mt.getModifiedDate() == null ? null :
dateFormat.format(mt.getModifiedDate()));
+ props.put(MEMBERSHIP_OWNER, mt.getOwner());
+
+ getIdentitySession().getRoleManager().setProperties(rt, props);
+
+ return;
+
+ }
+
+ private void populateMembershipType(MembershipType mt) throws Exception
+ {
+ RoleType rt = getIdentitySession().getRoleManager().getRoleType(mt.getName());
+
+ Map<String, String> props =
getIdentitySession().getRoleManager().getProperties(rt);
+
+ mt.setDescription(props.get(MEMBERSHIP_DESCRIPTION));
+ mt.setOwner(props.get(MEMBERSHIP_OWNER));
+
+ String cd = props.get(MEMBERSHIP_CREATE_DATE);
+ String md = props.get(MEMBERSHIP_MODIFIED_DATE);
+
+ if (cd != null)
+ {
+ mt.setCreatedDate(dateFormat.parse(cd));
+ }
+
+ if (md != null)
+ {
+ mt.setModifiedDate(dateFormat.parse(md));
+ }
+
+ return;
+ }
+
+}
Deleted:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/UserDAOImpl.java
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/UserDAOImpl.java 2009-11-25
21:32:49 UTC (rev 804)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/UserDAOImpl.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -1,416 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.services.organization.jbidm;
-
-import org.exoplatform.commons.utils.LazyPageList;
-import org.exoplatform.services.cache.CacheService;
-import org.exoplatform.services.cache.ExoCache;
-import org.exoplatform.services.organization.Query;
-import org.exoplatform.services.organization.User;
-import org.exoplatform.services.organization.UserEventListener;
-import org.exoplatform.services.organization.UserHandler;
-import org.exoplatform.services.organization.impl.UserImpl;
-import org.jboss.identity.idm.api.Attribute;
-import org.jboss.identity.idm.api.AttributesManager;
-import org.jboss.identity.idm.api.IdentitySession;
-import org.jboss.identity.idm.api.query.UserQueryBuilder;
-import org.jboss.identity.idm.impl.api.SimpleAttribute;
-
-import java.text.DateFormat;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- */
-public class UserDAOImpl implements UserHandler
-{
-
- private final JBossIDMService service_;
-
- private ExoCache cache_;
-
- private List<UserEventListener> listeners_ = new
ArrayList<UserEventListener>(3);
-
- public static final String USER_PASSWORD = "password";
-
- public static final String USER_FIRST_NAME = "firstName";
-
- public static final String USER_LAST_NAME = "lastName";
-
- public static final String USER_EMAIL = "email";
-
- public static final String USER_CREATED_DATE = "createdDate";
-
- public static final String USER_LAST_LOGIN_TIME = "lastLoginTime";
-
- public static final String USER_ORGANIZATION_ID = "organizationId";
-
- public static final Set<String> USER_NON_PROFILE_KEYS;
-
- public static final DateFormat dateFormat = DateFormat.getInstance();
-
- private JBossIDMOrganizationServiceImpl orgService;
-
- static
- {
- Set<String> keys = new HashSet<String>();
- keys.add(USER_PASSWORD);
- keys.add(USER_FIRST_NAME);
- keys.add(USER_LAST_NAME);
- keys.add(USER_EMAIL);
- keys.add(USER_CREATED_DATE);
- keys.add(USER_LAST_LOGIN_TIME);
- keys.add(USER_ORGANIZATION_ID);
-
- USER_NON_PROFILE_KEYS = Collections.unmodifiableSet(keys);
- }
-
- public UserDAOImpl(JBossIDMOrganizationServiceImpl orgService, JBossIDMService
idmService, CacheService cservice)
- throws Exception
- {
- service_ = idmService;
- cache_ = cservice.getCacheInstance(UserImpl.class.getName());
- this.orgService = orgService;
- }
-
- final public List getUserEventListeners()
- {
- return listeners_;
- }
-
- public void addUserEventListener(UserEventListener listener)
- {
- listeners_.add(listener);
- }
-
- public User createUserInstance()
- {
- return new UserImpl();
- }
-
- public User createUserInstance(String username)
- {
- return new UserImpl(username);
- }
-
- public void createUser(User user, boolean broadcast) throws Exception
- {
- IdentitySession session = service_.getIdentitySession();
- if (broadcast)
- {
- preSave(user, true);
- }
-
- session.getPersistenceManager().createUser(user.getUserName());
-
- persistUserInfo(user, session);
-
- if (broadcast)
- {
- postSave(user, true);
- }
-
- }
-
- public void saveUser(User user, boolean broadcast) throws Exception
- {
- IdentitySession session = service_.getIdentitySession();
- if (broadcast)
- {
- preSave(user, false);
- }
-
- persistUserInfo(user, session);
-
- if (broadcast)
- {
- postSave(user, false);
- }
- cache_.put(user.getUserName(), user);
- }
-
- public User removeUser(String userName, boolean broadcast) throws Exception
- {
- IdentitySession session = service_.getIdentitySession();
-
- org.jboss.identity.idm.api.User foundUser =
session.getPersistenceManager().findUser(userName);
-
- if (foundUser == null)
- {
- cache_.remove(userName);
- return null;
- }
-
- User exoUser = getPopulatedUser(userName, session);
-
- if (broadcast)
- {
- preDelete(exoUser);
- }
-
- session.getPersistenceManager().removeUser(foundUser, true);
- if (broadcast)
- {
- postDelete(exoUser);
- }
- cache_.remove(userName);
- return exoUser;
- }
-
- //
- public User findUserByName(String userName) throws Exception
- {
- IdentitySession session = service_.getIdentitySession();
-
- User user = (User)cache_.get(userName);
- if (user != null)
- {
- return user;
- }
- user = getPopulatedUser(userName, session);
- if (user != null)
- {
- cache_.put(userName, user);
- }
- return user;
- }
-
- public LazyPageList getUserPageList(int pageSize) throws Exception
- {
- UserQueryBuilder qb = service_.getIdentitySession().createUserQueryBuilder();
-
- return new LazyPageList(new IDMUserListAccess(this, service_, qb, pageSize, true),
pageSize);
- }
-
- //
- public boolean authenticate(String username, String password) throws Exception
- {
- User user = findUserByName(username);
- if (user == null)
- {
- return false;
- }
-
- boolean authenticated = false;
-
- if (orgService.isPasswordAsAttribute())
- {
- authenticated = user.getPassword().equals(password);
- }
- else
- {
- IdentitySession session = service_.getIdentitySession();
- org.jboss.identity.idm.api.User idmUser =
session.getPersistenceManager().findUser(user.getUserName());
-
- authenticated = session.getAttributesManager().validatePassword(idmUser,
password);
- }
-
- if (authenticated)
- {
- UserImpl userImpl = (UserImpl)user;
- userImpl.setLastLoginTime(Calendar.getInstance().getTime());
- saveUser(userImpl, false);
- }
- return authenticated;
- }
-
- public LazyPageList findUsers(Query q) throws Exception
- {
-
- UserQueryBuilder qb = service_.getIdentitySession().createUserQueryBuilder();
-
- if (q.getUserName() != null)
- {
- qb.idFilter(q.getUserName());
- }
- if (q.getEmail() != null)
- {
- qb.attributeValuesFilter(UserDAOImpl.USER_EMAIL, new String[]{q.getEmail()});
- }
- if (q.getFirstName() != null)
- {
- qb.attributeValuesFilter(UserDAOImpl.USER_FIRST_NAME, new
String[]{q.getFirstName()});
- }
-
- //TODO: from/to login date
-
- if (q.getLastName() != null)
- {
- qb.attributeValuesFilter(UserDAOImpl.USER_LAST_NAME, new
String[]{q.getLastName()});
- }
-
- return new LazyPageList(new IDMUserListAccess(this, service_, qb, 20, false), 20);
- }
-
- //
- public LazyPageList findUsersByGroup(String groupId) throws Exception
- {
- UserQueryBuilder qb = service_.getIdentitySession().createUserQueryBuilder();
-
- org.jboss.identity.idm.api.Group jbidGroup = orgService.getJBIDMGroup(groupId);
-
- qb.addRelatedGroup(jbidGroup);
-
- return new LazyPageList(new IDMUserListAccess(this, service_, qb, 20, false), 20);
- }
-
- //
-
- private void preSave(User user, boolean isNew) throws Exception
- {
- for (UserEventListener listener : listeners_)
- {
- listener.preSave(user, isNew);
- }
- }
-
- private void postSave(User user, boolean isNew) throws Exception
- {
- for (UserEventListener listener : listeners_)
- {
- listener.postSave(user, isNew);
- }
- }
-
- private void preDelete(User user) throws Exception
- {
- for (UserEventListener listener : listeners_)
- {
- listener.preDelete(user);
- }
- }
-
- private void postDelete(User user) throws Exception
- {
- for (UserEventListener listener : listeners_)
- {
- listener.postDelete(user);
- }
- }
-
- public void persistUserInfo(User user, IdentitySession session) throws Exception
- {
-
- AttributesManager am = session.getAttributesManager();
-
- ArrayList attributes = new ArrayList();
-
- if (user.getCreatedDate() != null)
- {
- attributes.add(new SimpleAttribute(USER_CREATED_DATE,
dateFormat.format(user.getCreatedDate())));
- }
- if (user.getLastLoginTime() != null)
- {
- attributes.add(new SimpleAttribute(USER_LAST_LOGIN_TIME,
dateFormat.format(user.getLastLoginTime())));
- }
- if (user.getEmail() != null)
- {
- attributes.add(new SimpleAttribute(USER_EMAIL, user.getEmail()));
- }
- if (user.getFirstName() != null)
- {
- attributes.add(new SimpleAttribute(USER_FIRST_NAME, user.getFirstName()));
- }
- if (user.getLastName() != null)
- {
- attributes.add(new SimpleAttribute(USER_LAST_NAME, user.getLastName()));
- }
- if (user.getOrganizationId() != null)
- {
- attributes.add(new SimpleAttribute(USER_ORGANIZATION_ID,
user.getOrganizationId()));
- }
- if (user.getPassword() != null)
- {
- if (orgService.isPasswordAsAttribute())
- {
- attributes.add(new SimpleAttribute(USER_PASSWORD, user.getPassword()));
- }
- else
- {
-
am.updatePassword(session.getPersistenceManager().findUser(user.getUserName()),
user.getPassword());
- }
- }
-
- Attribute[] attrs = new Attribute[attributes.size()];
- attrs = (Attribute[])attributes.toArray(attrs);
- am.addAttributes(user.getUserName(), attrs);
- }
-
- public static User getPopulatedUser(String userName, IdentitySession session) throws
Exception
- {
-
- if (session.getPersistenceManager().findUser(userName) == null)
- {
- return null;
- }
-
- AttributesManager am = session.getAttributesManager();
-
- Map<String, Attribute> attrs = am.getAttributes(userName);
-
- User user = new UserImpl(userName);
-
- if (attrs == null)
- {
-
- return user;
- }
- else
- {
- if (attrs.containsKey(USER_CREATED_DATE))
- {
-
user.setCreatedDate(dateFormat.parse(attrs.get(USER_CREATED_DATE).getValue().toString()));
- }
- if (attrs.containsKey(USER_EMAIL))
- {
- user.setEmail(attrs.get(USER_EMAIL).getValue().toString());
- }
- if (attrs.containsKey(USER_FIRST_NAME))
- {
- user.setFirstName(attrs.get(USER_FIRST_NAME).getValue().toString());
- }
- if (attrs.containsKey(USER_LAST_LOGIN_TIME))
- {
-
user.setLastLoginTime(dateFormat.parse(attrs.get(USER_LAST_LOGIN_TIME).getValue().toString()));
- }
- if (attrs.containsKey(USER_LAST_NAME))
- {
- user.setLastName(attrs.get(USER_LAST_NAME).getValue().toString());
- }
- if (attrs.containsKey(USER_ORGANIZATION_ID))
- {
-
user.setOrganizationId(attrs.get(USER_ORGANIZATION_ID).getValue().toString());
- }
- if (attrs.containsKey(USER_PASSWORD))
- {
- user.setPassword(attrs.get(USER_PASSWORD).getValue().toString());
- }
- }
-
- return user;
-
- }
-
-}
Copied:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/UserDAOImpl.java
(from rev 804,
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/UserDAOImpl.java)
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/UserDAOImpl.java
(rev 0)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/UserDAOImpl.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -0,0 +1,416 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.services.organization.jbidm;
+
+import org.exoplatform.commons.utils.LazyPageList;
+import org.exoplatform.services.cache.CacheService;
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.organization.Query;
+import org.exoplatform.services.organization.User;
+import org.exoplatform.services.organization.UserEventListener;
+import org.exoplatform.services.organization.UserHandler;
+import org.exoplatform.services.organization.impl.UserImpl;
+import org.jboss.identity.idm.api.Attribute;
+import org.jboss.identity.idm.api.AttributesManager;
+import org.jboss.identity.idm.api.IdentitySession;
+import org.jboss.identity.idm.api.query.UserQueryBuilder;
+import org.jboss.identity.idm.impl.api.SimpleAttribute;
+
+import java.text.DateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ */
+public class UserDAOImpl implements UserHandler
+{
+
+ private final JBossIDMService service_;
+
+ private ExoCache cache_;
+
+ private List<UserEventListener> listeners_ = new
ArrayList<UserEventListener>(3);
+
+ public static final String USER_PASSWORD = "password";
+
+ public static final String USER_FIRST_NAME = "firstName";
+
+ public static final String USER_LAST_NAME = "lastName";
+
+ public static final String USER_EMAIL = "email";
+
+ public static final String USER_CREATED_DATE = "createdDate";
+
+ public static final String USER_LAST_LOGIN_TIME = "lastLoginTime";
+
+ public static final String USER_ORGANIZATION_ID = "organizationId";
+
+ public static final Set<String> USER_NON_PROFILE_KEYS;
+
+ public static final DateFormat dateFormat = DateFormat.getInstance();
+
+ private JBossIDMOrganizationServiceImpl orgService;
+
+ static
+ {
+ Set<String> keys = new HashSet<String>();
+ keys.add(USER_PASSWORD);
+ keys.add(USER_FIRST_NAME);
+ keys.add(USER_LAST_NAME);
+ keys.add(USER_EMAIL);
+ keys.add(USER_CREATED_DATE);
+ keys.add(USER_LAST_LOGIN_TIME);
+ keys.add(USER_ORGANIZATION_ID);
+
+ USER_NON_PROFILE_KEYS = Collections.unmodifiableSet(keys);
+ }
+
+ public UserDAOImpl(JBossIDMOrganizationServiceImpl orgService, JBossIDMService
idmService, CacheService cservice)
+ throws Exception
+ {
+ service_ = idmService;
+ cache_ = cservice.getCacheInstance(UserImpl.class.getName());
+ this.orgService = orgService;
+ }
+
+ final public List getUserEventListeners()
+ {
+ return listeners_;
+ }
+
+ public void addUserEventListener(UserEventListener listener)
+ {
+ listeners_.add(listener);
+ }
+
+ public User createUserInstance()
+ {
+ return new UserImpl();
+ }
+
+ public User createUserInstance(String username)
+ {
+ return new UserImpl(username);
+ }
+
+ public void createUser(User user, boolean broadcast) throws Exception
+ {
+ IdentitySession session = service_.getIdentitySession();
+ if (broadcast)
+ {
+ preSave(user, true);
+ }
+
+ session.getPersistenceManager().createUser(user.getUserName());
+
+ persistUserInfo(user, session);
+
+ if (broadcast)
+ {
+ postSave(user, true);
+ }
+
+ }
+
+ public void saveUser(User user, boolean broadcast) throws Exception
+ {
+ IdentitySession session = service_.getIdentitySession();
+ if (broadcast)
+ {
+ preSave(user, false);
+ }
+
+ persistUserInfo(user, session);
+
+ if (broadcast)
+ {
+ postSave(user, false);
+ }
+ cache_.put(user.getUserName(), user);
+ }
+
+ public User removeUser(String userName, boolean broadcast) throws Exception
+ {
+ IdentitySession session = service_.getIdentitySession();
+
+ org.jboss.identity.idm.api.User foundUser =
session.getPersistenceManager().findUser(userName);
+
+ if (foundUser == null)
+ {
+ cache_.remove(userName);
+ return null;
+ }
+
+ User exoUser = getPopulatedUser(userName, session);
+
+ if (broadcast)
+ {
+ preDelete(exoUser);
+ }
+
+ session.getPersistenceManager().removeUser(foundUser, true);
+ if (broadcast)
+ {
+ postDelete(exoUser);
+ }
+ cache_.remove(userName);
+ return exoUser;
+ }
+
+ //
+ public User findUserByName(String userName) throws Exception
+ {
+ IdentitySession session = service_.getIdentitySession();
+
+ User user = (User)cache_.get(userName);
+ if (user != null)
+ {
+ return user;
+ }
+ user = getPopulatedUser(userName, session);
+ if (user != null)
+ {
+ cache_.put(userName, user);
+ }
+ return user;
+ }
+
+ public LazyPageList getUserPageList(int pageSize) throws Exception
+ {
+ UserQueryBuilder qb = service_.getIdentitySession().createUserQueryBuilder();
+
+ return new LazyPageList(new IDMUserListAccess(this, service_, qb, pageSize, true),
pageSize);
+ }
+
+ //
+ public boolean authenticate(String username, String password) throws Exception
+ {
+ User user = findUserByName(username);
+ if (user == null)
+ {
+ return false;
+ }
+
+ boolean authenticated = false;
+
+ if (orgService.isPasswordAsAttribute())
+ {
+ authenticated = user.getPassword().equals(password);
+ }
+ else
+ {
+ IdentitySession session = service_.getIdentitySession();
+ org.jboss.identity.idm.api.User idmUser =
session.getPersistenceManager().findUser(user.getUserName());
+
+ authenticated = session.getAttributesManager().validatePassword(idmUser,
password);
+ }
+
+ if (authenticated)
+ {
+ UserImpl userImpl = (UserImpl)user;
+ userImpl.setLastLoginTime(Calendar.getInstance().getTime());
+ saveUser(userImpl, false);
+ }
+ return authenticated;
+ }
+
+ public LazyPageList findUsers(Query q) throws Exception
+ {
+
+ UserQueryBuilder qb = service_.getIdentitySession().createUserQueryBuilder();
+
+ if (q.getUserName() != null)
+ {
+ qb.idFilter(q.getUserName());
+ }
+ if (q.getEmail() != null)
+ {
+ qb.attributeValuesFilter(UserDAOImpl.USER_EMAIL, new String[]{q.getEmail()});
+ }
+ if (q.getFirstName() != null)
+ {
+ qb.attributeValuesFilter(UserDAOImpl.USER_FIRST_NAME, new
String[]{q.getFirstName()});
+ }
+
+ //TODO: from/to login date
+
+ if (q.getLastName() != null)
+ {
+ qb.attributeValuesFilter(UserDAOImpl.USER_LAST_NAME, new
String[]{q.getLastName()});
+ }
+
+ return new LazyPageList(new IDMUserListAccess(this, service_, qb, 20, false), 20);
+ }
+
+ //
+ public LazyPageList findUsersByGroup(String groupId) throws Exception
+ {
+ UserQueryBuilder qb = service_.getIdentitySession().createUserQueryBuilder();
+
+ org.jboss.identity.idm.api.Group jbidGroup = orgService.getJBIDMGroup(groupId);
+
+ qb.addRelatedGroup(jbidGroup);
+
+ return new LazyPageList(new IDMUserListAccess(this, service_, qb, 20, false), 20);
+ }
+
+ //
+
+ private void preSave(User user, boolean isNew) throws Exception
+ {
+ for (UserEventListener listener : listeners_)
+ {
+ listener.preSave(user, isNew);
+ }
+ }
+
+ private void postSave(User user, boolean isNew) throws Exception
+ {
+ for (UserEventListener listener : listeners_)
+ {
+ listener.postSave(user, isNew);
+ }
+ }
+
+ private void preDelete(User user) throws Exception
+ {
+ for (UserEventListener listener : listeners_)
+ {
+ listener.preDelete(user);
+ }
+ }
+
+ private void postDelete(User user) throws Exception
+ {
+ for (UserEventListener listener : listeners_)
+ {
+ listener.postDelete(user);
+ }
+ }
+
+ public void persistUserInfo(User user, IdentitySession session) throws Exception
+ {
+
+ AttributesManager am = session.getAttributesManager();
+
+ ArrayList attributes = new ArrayList();
+
+ if (user.getCreatedDate() != null)
+ {
+ attributes.add(new SimpleAttribute(USER_CREATED_DATE,
dateFormat.format(user.getCreatedDate())));
+ }
+ if (user.getLastLoginTime() != null)
+ {
+ attributes.add(new SimpleAttribute(USER_LAST_LOGIN_TIME,
dateFormat.format(user.getLastLoginTime())));
+ }
+ if (user.getEmail() != null)
+ {
+ attributes.add(new SimpleAttribute(USER_EMAIL, user.getEmail()));
+ }
+ if (user.getFirstName() != null)
+ {
+ attributes.add(new SimpleAttribute(USER_FIRST_NAME, user.getFirstName()));
+ }
+ if (user.getLastName() != null)
+ {
+ attributes.add(new SimpleAttribute(USER_LAST_NAME, user.getLastName()));
+ }
+ if (user.getOrganizationId() != null)
+ {
+ attributes.add(new SimpleAttribute(USER_ORGANIZATION_ID,
user.getOrganizationId()));
+ }
+ if (user.getPassword() != null)
+ {
+ if (orgService.isPasswordAsAttribute())
+ {
+ attributes.add(new SimpleAttribute(USER_PASSWORD, user.getPassword()));
+ }
+ else
+ {
+
am.updatePassword(session.getPersistenceManager().findUser(user.getUserName()),
user.getPassword());
+ }
+ }
+
+ Attribute[] attrs = new Attribute[attributes.size()];
+ attrs = (Attribute[])attributes.toArray(attrs);
+ am.addAttributes(user.getUserName(), attrs);
+ }
+
+ public static User getPopulatedUser(String userName, IdentitySession session) throws
Exception
+ {
+
+ if (session.getPersistenceManager().findUser(userName) == null)
+ {
+ return null;
+ }
+
+ AttributesManager am = session.getAttributesManager();
+
+ Map<String, Attribute> attrs = am.getAttributes(userName);
+
+ User user = new UserImpl(userName);
+
+ if (attrs == null)
+ {
+
+ return user;
+ }
+ else
+ {
+ if (attrs.containsKey(USER_CREATED_DATE))
+ {
+
user.setCreatedDate(dateFormat.parse(attrs.get(USER_CREATED_DATE).getValue().toString()));
+ }
+ if (attrs.containsKey(USER_EMAIL))
+ {
+ user.setEmail(attrs.get(USER_EMAIL).getValue().toString());
+ }
+ if (attrs.containsKey(USER_FIRST_NAME))
+ {
+ user.setFirstName(attrs.get(USER_FIRST_NAME).getValue().toString());
+ }
+ if (attrs.containsKey(USER_LAST_LOGIN_TIME))
+ {
+
user.setLastLoginTime(dateFormat.parse(attrs.get(USER_LAST_LOGIN_TIME).getValue().toString()));
+ }
+ if (attrs.containsKey(USER_LAST_NAME))
+ {
+ user.setLastName(attrs.get(USER_LAST_NAME).getValue().toString());
+ }
+ if (attrs.containsKey(USER_ORGANIZATION_ID))
+ {
+
user.setOrganizationId(attrs.get(USER_ORGANIZATION_ID).getValue().toString());
+ }
+ if (attrs.containsKey(USER_PASSWORD))
+ {
+ user.setPassword(attrs.get(USER_PASSWORD).getValue().toString());
+ }
+ }
+
+ return user;
+
+ }
+
+}
Deleted:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/UserProfileDAOImpl.java
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/UserProfileDAOImpl.java 2009-11-25
21:32:49 UTC (rev 804)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/UserProfileDAOImpl.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -1,286 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.services.organization.jbidm;
-
-import org.exoplatform.services.cache.CacheService;
-import org.exoplatform.services.cache.ExoCache;
-import org.exoplatform.services.organization.UserProfile;
-import org.exoplatform.services.organization.UserProfileEventListener;
-import org.exoplatform.services.organization.UserProfileHandler;
-import org.exoplatform.services.organization.impl.UserProfileImpl;
-import org.jboss.identity.idm.api.Attribute;
-import org.jboss.identity.idm.api.IdentitySession;
-import org.jboss.identity.idm.impl.api.SimpleAttribute;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-public class UserProfileDAOImpl implements UserProfileHandler
-{
-
- static private UserProfile NOT_FOUND = new UserProfileImpl();
-
- private JBossIDMService service_;
-
- private ExoCache cache_;
-
- private List<UserProfileEventListener> listeners_;
-
- private JBossIDMOrganizationServiceImpl orgService;
-
- public UserProfileDAOImpl(JBossIDMOrganizationServiceImpl orgService, JBossIDMService
service, CacheService cservice)
- throws Exception
- {
- service_ = service;
- cache_ = cservice.getCacheInstance(getClass().getName());
- listeners_ = new ArrayList<UserProfileEventListener>(3);
- this.orgService = orgService;
- }
-
- public void addUserProfileEventListener(UserProfileEventListener listener)
- {
- listeners_.add(listener);
- }
-
- final public UserProfile createUserProfileInstance()
- {
- return new UserProfileImpl();
- }
-
- public UserProfile createUserProfileInstance(String userName)
- {
- return new UserProfileImpl(userName);
- }
-
- // void createUserProfileEntry(UserProfile up, IdentitySession session) throws
Exception
- // {
- // UserProfileData upd = new UserProfileData();
- // upd.setUserProfile(up);
- // session.save(upd);
- // session.flush();
- // cache_.remove(up.getUserName());
- // }
-
- public void saveUserProfile(UserProfile profile, boolean broadcast) throws Exception
- {
-
- if (broadcast)
- {
- preSave(profile, true);
- }
-
- setProfile(profile.getUserName(), profile);
-
- if (broadcast)
- {
- postSave(profile, true);
- }
-
- cache_.put(profile.getUserName(), profile);
-
- }
-
- public UserProfile removeUserProfile(String userName, boolean broadcast) throws
Exception
- {
- UserProfile profile = getProfile(userName);
-
- if (profile != null)
- {
- try
- {
- if (broadcast)
- {
- preDelete(profile);
- }
-
- removeProfile(userName, profile);
-
- if (broadcast)
- {
- postDelete(profile);
- }
- cache_.remove(userName);
- return profile;
- }
- catch (Exception exp)
- {
- return null;
- }
- }
- cache_.remove(userName);
- return null;
- }
-
- public UserProfile findUserProfileByName(String userName) throws Exception
- {
-
- org.jboss.identity.idm.api.User foundUser =
getIdentitySession().getPersistenceManager().findUser(userName);
-
- if (foundUser == null)
- {
- return null;
- }
-
- UserProfile up = (UserProfile)cache_.get(userName);
- if (up == null)
- {
- up = getProfile(userName);
- }
-
- //
- if (up == null)
- {
- up = NOT_FOUND;
- }
-
- //
- cache_.put(userName, up);
-
- // Just to avoid to return a shared object between many threads
- // that would not be thread safe nor corrct
- if (up == NOT_FOUND)
- {
- // julien : integration bug fix
- // Return an empty profile to avoid NPE in portal
- // Should clarify what do do (maybe portal should care about returned value)
- UserProfileImpl profile = new UserProfileImpl();
- profile.setUserName(userName);
- return profile;
- }
- else
- {
- return up;
- }
- }
-
- public Collection findUserProfiles() throws Exception
- {
- return null;
- }
-
- private void preSave(UserProfile profile, boolean isNew) throws Exception
- {
- for (UserProfileEventListener listener : listeners_)
- {
- listener.preSave(profile, isNew);
- }
- }
-
- private void postSave(UserProfile profile, boolean isNew) throws Exception
- {
- for (UserProfileEventListener listener : listeners_)
- {
- listener.postSave(profile, isNew);
- }
- }
-
- private void preDelete(UserProfile profile) throws Exception
- {
- for (UserProfileEventListener listener : listeners_)
- {
- listener.preDelete(profile);
- }
- }
-
- private void postDelete(UserProfile profile) throws Exception
- {
- for (UserProfileEventListener listener : listeners_)
- {
- listener.postDelete(profile);
- }
- }
-
- public UserProfile getProfile(String userName) throws Exception
- {
- if (getIdentitySession().getPersistenceManager().findUser(userName) == null)
- {
- return null;
- }
-
- Map<String, Attribute> attrs =
getIdentitySession().getAttributesManager().getAttributes(userName);
-
- if (attrs == null || attrs.isEmpty())
- {
- return null;
- }
-
- Map<String, String> filteredAttrs = new HashMap<String, String>();
-
- for (String key : attrs.keySet())
- {
- // Check if attribute is part of User interface data
- if (!UserDAOImpl.USER_NON_PROFILE_KEYS.contains(key))
- {
- filteredAttrs.put(key, attrs.get(key).getValue().toString());
- }
-
- }
-
- if (filteredAttrs.isEmpty())
- {
- return null;
- }
-
- UserProfile profile = new UserProfileImpl(userName, filteredAttrs);
-
- return profile;
-
- }
-
- public void setProfile(String userName, UserProfile profile) throws Exception
- {
-
- Map<String, String> profileAttrs = profile.getUserInfoMap();
-
- Set<Attribute> attrs = new HashSet<Attribute>();
-
- for (Map.Entry<String, String> entry : profileAttrs.entrySet())
- {
- attrs.add(new SimpleAttribute(entry.getKey(), entry.getValue()));
- }
-
- Attribute[] attrArray = new Attribute[attrs.size()];
- attrArray = attrs.toArray(attrArray);
-
- getIdentitySession().getAttributesManager().updateAttributes(userName, attrArray);
-
- }
-
- public void removeProfile(String userName, UserProfile profile) throws Exception
- {
- Map<String, String> profileAttrs = profile.getUserInfoMap();
-
- String[] attrKeys = new String[profileAttrs.keySet().size()];
-
- attrKeys = profileAttrs.keySet().toArray(attrKeys);
-
- getIdentitySession().getAttributesManager().removeAttributes(userName, attrKeys);
- }
-
- private IdentitySession getIdentitySession() throws Exception
- {
- return service_.getIdentitySession();
- }
-}
Copied:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/UserProfileDAOImpl.java
(from rev 804,
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/UserProfileDAOImpl.java)
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/UserProfileDAOImpl.java
(rev 0)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/jbidm/UserProfileDAOImpl.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -0,0 +1,286 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.services.organization.jbidm;
+
+import org.exoplatform.services.cache.CacheService;
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.organization.UserProfile;
+import org.exoplatform.services.organization.UserProfileEventListener;
+import org.exoplatform.services.organization.UserProfileHandler;
+import org.exoplatform.services.organization.impl.UserProfileImpl;
+import org.jboss.identity.idm.api.Attribute;
+import org.jboss.identity.idm.api.IdentitySession;
+import org.jboss.identity.idm.impl.api.SimpleAttribute;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+public class UserProfileDAOImpl implements UserProfileHandler
+{
+
+ static private UserProfile NOT_FOUND = new UserProfileImpl();
+
+ private JBossIDMService service_;
+
+ private ExoCache cache_;
+
+ private List<UserProfileEventListener> listeners_;
+
+ private JBossIDMOrganizationServiceImpl orgService;
+
+ public UserProfileDAOImpl(JBossIDMOrganizationServiceImpl orgService, JBossIDMService
service, CacheService cservice)
+ throws Exception
+ {
+ service_ = service;
+ cache_ = cservice.getCacheInstance(getClass().getName());
+ listeners_ = new ArrayList<UserProfileEventListener>(3);
+ this.orgService = orgService;
+ }
+
+ public void addUserProfileEventListener(UserProfileEventListener listener)
+ {
+ listeners_.add(listener);
+ }
+
+ final public UserProfile createUserProfileInstance()
+ {
+ return new UserProfileImpl();
+ }
+
+ public UserProfile createUserProfileInstance(String userName)
+ {
+ return new UserProfileImpl(userName);
+ }
+
+ // void createUserProfileEntry(UserProfile up, IdentitySession session) throws
Exception
+ // {
+ // UserProfileData upd = new UserProfileData();
+ // upd.setUserProfile(up);
+ // session.save(upd);
+ // session.flush();
+ // cache_.remove(up.getUserName());
+ // }
+
+ public void saveUserProfile(UserProfile profile, boolean broadcast) throws Exception
+ {
+
+ if (broadcast)
+ {
+ preSave(profile, true);
+ }
+
+ setProfile(profile.getUserName(), profile);
+
+ if (broadcast)
+ {
+ postSave(profile, true);
+ }
+
+ cache_.put(profile.getUserName(), profile);
+
+ }
+
+ public UserProfile removeUserProfile(String userName, boolean broadcast) throws
Exception
+ {
+ UserProfile profile = getProfile(userName);
+
+ if (profile != null)
+ {
+ try
+ {
+ if (broadcast)
+ {
+ preDelete(profile);
+ }
+
+ removeProfile(userName, profile);
+
+ if (broadcast)
+ {
+ postDelete(profile);
+ }
+ cache_.remove(userName);
+ return profile;
+ }
+ catch (Exception exp)
+ {
+ return null;
+ }
+ }
+ cache_.remove(userName);
+ return null;
+ }
+
+ public UserProfile findUserProfileByName(String userName) throws Exception
+ {
+
+ org.jboss.identity.idm.api.User foundUser =
getIdentitySession().getPersistenceManager().findUser(userName);
+
+ if (foundUser == null)
+ {
+ return null;
+ }
+
+ UserProfile up = (UserProfile)cache_.get(userName);
+ if (up == null)
+ {
+ up = getProfile(userName);
+ }
+
+ //
+ if (up == null)
+ {
+ up = NOT_FOUND;
+ }
+
+ //
+ cache_.put(userName, up);
+
+ // Just to avoid to return a shared object between many threads
+ // that would not be thread safe nor corrct
+ if (up == NOT_FOUND)
+ {
+ // julien : integration bug fix
+ // Return an empty profile to avoid NPE in portal
+ // Should clarify what do do (maybe portal should care about returned value)
+ UserProfileImpl profile = new UserProfileImpl();
+ profile.setUserName(userName);
+ return profile;
+ }
+ else
+ {
+ return up;
+ }
+ }
+
+ public Collection findUserProfiles() throws Exception
+ {
+ return null;
+ }
+
+ private void preSave(UserProfile profile, boolean isNew) throws Exception
+ {
+ for (UserProfileEventListener listener : listeners_)
+ {
+ listener.preSave(profile, isNew);
+ }
+ }
+
+ private void postSave(UserProfile profile, boolean isNew) throws Exception
+ {
+ for (UserProfileEventListener listener : listeners_)
+ {
+ listener.postSave(profile, isNew);
+ }
+ }
+
+ private void preDelete(UserProfile profile) throws Exception
+ {
+ for (UserProfileEventListener listener : listeners_)
+ {
+ listener.preDelete(profile);
+ }
+ }
+
+ private void postDelete(UserProfile profile) throws Exception
+ {
+ for (UserProfileEventListener listener : listeners_)
+ {
+ listener.postDelete(profile);
+ }
+ }
+
+ public UserProfile getProfile(String userName) throws Exception
+ {
+ if (getIdentitySession().getPersistenceManager().findUser(userName) == null)
+ {
+ return null;
+ }
+
+ Map<String, Attribute> attrs =
getIdentitySession().getAttributesManager().getAttributes(userName);
+
+ if (attrs == null || attrs.isEmpty())
+ {
+ return null;
+ }
+
+ Map<String, String> filteredAttrs = new HashMap<String, String>();
+
+ for (String key : attrs.keySet())
+ {
+ // Check if attribute is part of User interface data
+ if (!UserDAOImpl.USER_NON_PROFILE_KEYS.contains(key))
+ {
+ filteredAttrs.put(key, attrs.get(key).getValue().toString());
+ }
+
+ }
+
+ if (filteredAttrs.isEmpty())
+ {
+ return null;
+ }
+
+ UserProfile profile = new UserProfileImpl(userName, filteredAttrs);
+
+ return profile;
+
+ }
+
+ public void setProfile(String userName, UserProfile profile) throws Exception
+ {
+
+ Map<String, String> profileAttrs = profile.getUserInfoMap();
+
+ Set<Attribute> attrs = new HashSet<Attribute>();
+
+ for (Map.Entry<String, String> entry : profileAttrs.entrySet())
+ {
+ attrs.add(new SimpleAttribute(entry.getKey(), entry.getValue()));
+ }
+
+ Attribute[] attrArray = new Attribute[attrs.size()];
+ attrArray = attrs.toArray(attrArray);
+
+ getIdentitySession().getAttributesManager().updateAttributes(userName, attrArray);
+
+ }
+
+ public void removeProfile(String userName, UserProfile profile) throws Exception
+ {
+ Map<String, String> profileAttrs = profile.getUserInfoMap();
+
+ String[] attrKeys = new String[profileAttrs.keySet().size()];
+
+ attrKeys = profileAttrs.keySet().toArray(attrKeys);
+
+ getIdentitySession().getAttributesManager().removeAttributes(userName, attrKeys);
+ }
+
+ private IdentitySession getIdentitySession() throws Exception
+ {
+ return service_.getIdentitySession();
+ }
+}
Modified:
portal/branches/wsrp-integration/component/identity/src/test/java/conf/portal/idm-configuration.xml
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/test/java/conf/portal/idm-configuration.xml 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/identity/src/test/java/conf/portal/idm-configuration.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -25,54 +25,54 @@
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
<component>
-
<key>org.exoplatform.services.organization.idm.PicketLinkIDMService</key>
-
<type>org.exoplatform.services.organization.idm.PicketLinkIDMServiceImpl</type>
+ <key>org.exoplatform.services.organization.jbidm.JBossIDMService</key>
+
<type>org.exoplatform.services.organization.jbidm.JBossIDMServiceImpl</type>
<init-params>
<value-param>
<name>config</name>
<value>jar:/conf/portal/idm-config.xml</value>
</value-param>
+ <values-param>
+ <name>hibernate.annotations</name>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttributeValue</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredential</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectTextAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateRealm</value>
+ </values-param>
+ <properties-param>
+ <name>hibernate.properties</name>
+ <property name="hibernate.hbm2ddl.auto"
value="create-drop"/>
+ <property name="hibernate.current_session_context_class"
value="thread"/>
+ <property name="hibernate.show_sql"
value="false"/>
+ <property name="hibernate.cglib.use_reflection_optimizer"
value="true"/>
+ <property name="hibernate.connection.url"
value="jdbc:hsqldb:file:target/temp/data/exodb"/>
+ <property name="hibernate.connection.driver_class"
value="org.hsqldb.jdbcDriver"/>
+ <property name="hibernate.connection.autocommit"
value="true"/>
+ <property name="hibernate.connection.username"
value="sa"/>
+ <property name="hibernate.connection.password"
value=""/>
+ <property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect"/>
+ <property name="hibernate.c3p0.min_size"
value="5"/>
+ <property name="hibernate.c3p0.max_size"
value="20"/>
+ <property name="hibernate.c3p0.timeout"
value="1800"/>
+ <property name="hibernate.c3p0.max_statements"
value="50"/>
+ </properties-param>
+
</init-params>
</component>
<component>
<key>org.exoplatform.services.organization.OrganizationService</key>
-
<type>org.exoplatform.services.organization.idm.PicketLinkIDMOrganizationServiceImpl</type>
+
<type>org.exoplatform.services.organization.jbidm.JBossIDMOrganizationServiceImpl</type>
</component>
- <component>
- <key>org.exoplatform.services.database.HibernateService</key>
- <jmx-name>database:type=HibernateService</jmx-name>
- <type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
- <init-params>
- <properties-param>
- <name>hibernate.properties</name>
- <description>Default Hibernate Service</description>
- <property name="hibernate.hbm2ddl.auto"
value="create-drop"/>
- <!--<property name="hibernate.show_sql"
value="true"/>-->
- <!--<property name="hibernate.use_sql_comments"
value="true"/>-->
- <!--<property name="hibernate.format_sql"
value="true"/>-->
- <property name="hibernate.current_session_context_class"
value="thread"/>
- <property name="hibernate.jdbc.batch_size" value="0"/>
- <property name="hibernate.cache.use_second_level_cache"
value="true"/>
- <property name="hibernate.cache.use_query_cache"
value="true"/>
- <!--CHANGEME HashtableCacheProvider shold not be used in production env-->
- <property name="hibernate.cache.provider_class"
value="org.hibernate.cache.HashtableCacheProvider"/>
- <property name="hibernate.cglib.use_reflection_optimizer"
value="true"/>
- <property name="hibernate.connection.url"
value="jdbc:hsqldb:file:../temp/data/exodb${container.name.suffix}"/>
- <property name="hibernate.connection.driver_class"
value="org.hsqldb.jdbcDriver"/>
- <property name="hibernate.connection.autocommit"
value="true"/>
- <property name="hibernate.connection.username"
value="sa"/>
- <property name="hibernate.connection.password"
value=""/>
- <property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect"/>
- <property name="hibernate.c3p0.min_size" value="5"/>
- <property name="hibernate.c3p0.max_size" value="20"/>
- <property name="hibernate.c3p0.timeout" value="1800"/>
- <property name="hibernate.c3p0.max_statements"
value="50"/>
- </properties-param>
- </init-params>
- </component>
-
<external-component-plugins>
<target-component>org.exoplatform.services.database.HibernateService</target-component>
<component-plugin>
@@ -81,18 +81,19 @@
<type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
<init-params>
<values-param>
- <name>hibernate.mapping</name>
- <value>mappings/HibernateRealm.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml</value>
- <value>mappings/HibernateIdentityObject.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectCredential.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectCredentialType.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectAttribute.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectType.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectRelationship.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectRelationshipType.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectRelationshipName.hbm.xml</value>
+ <name>hibernate.annotations</name>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttributeValue</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredential</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectTextAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateRealm</value>
</values-param>
</init-params>
</component-plugin>
Modified:
portal/branches/wsrp-integration/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganizationService.java
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganizationService.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganizationService.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -173,7 +173,6 @@
// newly created 'test' and 'demo'
assertEquals(2, piterator.currentPage().size());
-// membershipHandler_.removeMembershipByUser(USER,false);
userHandler_.removeUser(USER, true);
piterator = userHandler_.getUserPageList(10);
// one 'demo'
@@ -437,20 +436,19 @@
groupHandler_.removeGroup(group3, true);
}
-// public void testUserProfileListener() throws Exception
-// {
-// UserProfileListener l = new UserProfileListener();
-// profileHandler_.addUserProfileEventListener(l);
-// User user = createUser(USER);
-// assertNotNull(user);
-// UserProfile profile =
profileHandler_.createUserProfileInstance(user.getUserName());
-// profile.setAttribute("blah", "blah");
-// profileHandler_.saveUserProfile(profile, true);
-// assertTrue(l.preSave && l.postSave);
-// profileHandler_.removeUserProfile(user.getUserName(), true);
-// assertFalse(l.preDelete && l.postDelete);
-// userHandler_.removeUser(user.getUserName(), false);
-// }
+ public void testUserProfileListener() throws Exception
+ {
+ UserProfileListener l = new UserProfileListener();
+ profileHandler_.addUserProfileEventListener(l);
+ User user = createUser(USER);
+ assertNotNull(user);
+ UserProfile profile =
profileHandler_.createUserProfileInstance(user.getUserName());
+ profile.setAttribute("blah", "blah");
+ profileHandler_.saveUserProfile(profile, true);
+ assertTrue(l.preSave && l.postSave);
+ profileHandler_.removeUserProfile(user.getUserName(), true);
+ assertFalse(l.preDelete && l.postDelete);
+ }
public void testFindUsersByGroupId() throws Exception
{
Modified: portal/branches/wsrp-integration/component/pc/pom.xml
===================================================================
--- portal/branches/wsrp-integration/component/pc/pom.xml 2009-11-26 15:37:51 UTC (rev
817)
+++ portal/branches/wsrp-integration/component/pc/pom.xml 2009-11-26 15:54:09 UTC (rev
818)
@@ -89,11 +89,6 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.gatein.pc</groupId>
- <artifactId>pc-bridge</artifactId>
- <version>${org.gatein.pc.version}</version>
- </dependency>
- <dependency>
<groupId>org.gatein.wci</groupId>
<artifactId>wci-wci</artifactId>
<version>${org.gatein.wci.version}</version>
Modified:
portal/branches/wsrp-integration/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java
===================================================================
---
portal/branches/wsrp-integration/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -21,9 +21,7 @@
import org.exoplatform.container.ExoContainer;
import org.exoplatform.container.ExoContainerContext;
-import org.exoplatform.services.resources.ResourceBundleService;
import org.gatein.pc.api.PortletInvoker;
-import org.gatein.pc.bridge.BridgeInterceptor;
import org.gatein.pc.federation.FederatingPortletInvoker;
import org.gatein.pc.federation.impl.FederatingPortletInvokerService;
import org.gatein.pc.mc.PortletApplicationDeployer;
@@ -58,20 +56,13 @@
/** Exo Context */
private final ExoContainer container;
- /** DO NOT REMOVE ME, OTHERWISE YOU'LL BREAK THINGS. */
- private final ResourceBundleService resourceBundleService;
-
/**
* We enforce the dependency with the ResourceBundleService since it must be stared
before the
* <code>portletApplicationRegistry</code>
- *
- * @param context the exo container context
- * @param resourceBundleService the resource bundle service that is here for the sake
of creating a dependency
*/
- public ExoKernelIntegration(ExoContainerContext context, ResourceBundleService
resourceBundleService)
+ public ExoKernelIntegration(ExoContainerContext context)
{
this.container = context.getContainer();
- this.resourceBundleService = resourceBundleService;
}
public void start()
@@ -92,10 +83,8 @@
requestAttributeConversationInterceptor.setNext(eventPayloadInterceptor);
CCPPInterceptor ccppInterceptor = new CCPPInterceptor();
ccppInterceptor.setNext(requestAttributeConversationInterceptor);
- BridgeInterceptor bridgepInterceptor = new BridgeInterceptor();
- bridgepInterceptor.setNext(ccppInterceptor);
ProducerCacheInterceptor producerCacheInterceptor = new
ProducerCacheInterceptor();
- producerCacheInterceptor.setNext(bridgepInterceptor);
+ producerCacheInterceptor.setNext(ccppInterceptor);
ContextDispatcherInterceptor contextDispatcherInterceptor = new
ContextDispatcherInterceptor();
contextDispatcherInterceptor.setNext(producerCacheInterceptor);
SecureTransportInterceptor secureTransportInterceptor = new
SecureTransportInterceptor();
Modified: portal/branches/wsrp-integration/component/portal/pom.xml
===================================================================
--- portal/branches/wsrp-integration/component/portal/pom.xml 2009-11-26 15:37:51 UTC (rev
817)
+++ portal/branches/wsrp-integration/component/portal/pom.xml 2009-11-26 15:54:09 UTC (rev
818)
@@ -82,18 +82,11 @@
</dependency>
<dependency>
- <groupId>org.picketlink.idm</groupId>
- <artifactId>picketlink-idm-core</artifactId>
- <version>${org.picketlink.idm}</version>
+ <groupId>org.jboss.identity.idm</groupId>
+ <artifactId>idm-core</artifactId>
+ <version>${org.jboss.identity.idm}</version>
</dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>${javax.servlet.version}</version>
- <scope>provided</scope>
- </dependency>
-
</dependencies>
<build>
Modified:
portal/branches/wsrp-integration/component/portal/src/main/java/conf/portal/portal-nodetypes.xml
===================================================================
---
portal/branches/wsrp-integration/component/portal/src/main/java/conf/portal/portal-nodetypes.xml 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/portal/src/main/java/conf/portal/portal-nodetypes.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -91,46 +91,6 @@
</propertyDefinitions>
</nodeType>
- <nodeType name="mop:portletpreferences" isMixin="false"
hasOrderableChildNodes="false" primaryItemName="">
- <supertypes>
- <supertype>mop:customizationstate</supertype>
- </supertypes>
- <childNodeDefinitions>
- <childNodeDefinition name="*"
defaultPrimaryType="mop:portletpreference" autoCreated="false"
mandatory="false"
- onParentVersion="COPY" protected="false"
sameNameSiblings="false">
- <requiredPrimaryTypes>
- <requiredPrimaryType>mop:portletpreference</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- </childNodeDefinitions>
- </nodeType>
-
- <nodeType name="mop:portletpreference" isMixin="false"
hasOrderableChildNodes="false" primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="value" requiredType="String"
autoCreated="false" mandatory="false" onParentVersion="COPY"
protected="false" multiple="true">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="readonly" requiredType="Boolean"
autoCreated="false" mandatory="false" onParentVersion="COPY"
protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- </propertyDefinitions>
- </nodeType>
-
- <nodeType name="mop:gadget" isMixin="false"
hasOrderableChildNodes="false" primaryItemName="">
- <supertypes>
- <supertype>mop:customizationstate</supertype>
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="prefs" requiredType="String"
autoCreated="false" mandatory="false" onParentVersion="COPY"
protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- </propertyDefinitions>
- </nodeType>
-
<nodeType name="mop:wsrpstate" isMixin="false"
hasOrderableChildNodes="false" primaryItemName="">
<supertypes>
<supertype>mop:customizationstate</supertype>
Modified:
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/config/RemoveGroupPortalConfigListener.java
===================================================================
---
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/config/RemoveGroupPortalConfigListener.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/config/RemoveGroupPortalConfigListener.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -24,7 +24,7 @@
import org.exoplatform.services.listener.Event;
import org.exoplatform.services.listener.Listener;
import org.exoplatform.services.organization.Group;
-import org.exoplatform.services.organization.GroupHandler;
+import org.exoplatform.services.organization.jdbc.GroupDAOImpl;
/**
* Created by The eXo Platform SARL
@@ -32,11 +32,11 @@
* tung.pham(a)exoplatform.com
* Jul 31, 2007
*/
-public class RemoveGroupPortalConfigListener extends Listener<GroupHandler, Group>
+public class RemoveGroupPortalConfigListener extends Listener<GroupDAOImpl, Group>
{
@Override
- public void onEvent(Event<GroupHandler, Group> event) throws Exception
+ public void onEvent(Event<GroupDAOImpl, Group> event) throws Exception
{
Group group = event.getData();
ExoContainer container = ExoContainerContext.getCurrentContainer();
Modified:
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/config/RemoveUserPortalConfigListener.java
===================================================================
---
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/config/RemoveUserPortalConfigListener.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/config/RemoveUserPortalConfigListener.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -24,7 +24,7 @@
import org.exoplatform.services.listener.Event;
import org.exoplatform.services.listener.Listener;
import org.exoplatform.services.organization.User;
-import org.exoplatform.services.organization.UserHandler;
+import org.exoplatform.services.organization.jdbc.UserDAOImpl;
/**
* Created by The eXo Platform SARL
@@ -32,11 +32,11 @@
* tung.pham(a)exoplatform.com
* Aug 1, 2007
*/
-public class RemoveUserPortalConfigListener extends Listener<UserHandler, User>
+public class RemoveUserPortalConfigListener extends Listener<UserDAOImpl, User>
{
@Override
- public void onEvent(Event<UserHandler, User> event) throws Exception
+ public void onEvent(Event<UserDAOImpl, User> event) throws Exception
{
User user = event.getData();
ExoContainer container = ExoContainerContext.getCurrentContainer();
Modified:
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java
===================================================================
---
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -30,8 +30,8 @@
import org.exoplatform.portal.pom.spi.gadget.GadgetState;
import org.exoplatform.portal.pom.spi.portlet.Portlet;
import org.exoplatform.portal.pom.spi.portlet.PortletContentProvider;
+import org.exoplatform.portal.pom.spi.portlet.PreferenceState;
import org.exoplatform.portal.pom.spi.portlet.PortletState;
-import org.exoplatform.portal.pom.spi.portlet.PreferenceState;
import org.exoplatform.portal.pom.spi.wsrp.WSRP;
import org.exoplatform.portal.pom.spi.wsrp.WSRPContentProvider;
import org.exoplatform.portal.pom.spi.wsrp.WSRPState;
Deleted:
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/config/PortalMOPService.java
===================================================================
---
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/config/PortalMOPService.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/config/PortalMOPService.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2003-2007 eXo Platform SAS.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not,
see<http://www.gnu.org/licenses/>.
- */
-package org.exoplatform.portal.pom.config;
-
-import org.chromattic.api.ChromatticBuilder;
-import org.chromattic.apt.InstrumentorImpl;
-import org.exoplatform.portal.pom.registry.CategoryDefinition;
-import org.exoplatform.portal.pom.registry.ContentDefinition;
-import org.exoplatform.portal.pom.registry.ContentRegistry;
-import org.exoplatform.portal.pom.spi.gadget.Gadget;
-import org.exoplatform.portal.pom.spi.gadget.GadgetContentProvider;
-import org.exoplatform.portal.pom.spi.gadget.GadgetState;
-import org.exoplatform.portal.pom.spi.portlet.Portlet;
-import org.exoplatform.portal.pom.spi.portlet.PortletContentProvider;
-import org.exoplatform.portal.pom.spi.portlet.PortletState;
-import org.exoplatform.portal.pom.spi.portlet.PreferenceState;
-import org.exoplatform.portal.pom.spi.wsrp.WSRP;
-import org.exoplatform.portal.pom.spi.wsrp.WSRPContentProvider;
-import org.exoplatform.portal.pom.spi.wsrp.WSRPState;
-import org.gatein.mop.core.api.MOPService;
-import org.gatein.mop.core.api.content.ContentManagerRegistry;
-
-/**
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
- * @version $Revision$
- */
-public class PortalMOPService extends MOPService
-{
-
- @Override
- protected void configure(ChromatticBuilder builder)
- {
- builder.setOption(ChromatticBuilder.SESSION_LIFECYCLE_CLASSNAME,
PortalSessionLifeCycle.class.getName());
- builder.setOption(ChromatticBuilder.INSTRUMENTOR_CLASSNAME,
InstrumentorImpl.class.getName());
-
- //
- builder.add(PortletState.class);
- builder.add(PreferenceState.class);
- builder.add(GadgetState.class);
- builder.add(WSRPState.class);
-
- //
- builder.add(ContentRegistry.class);
- builder.add(CategoryDefinition.class);
- builder.add(ContentDefinition.class);
- }
-
- @Override
- protected void configure(ContentManagerRegistry registry)
- {
- registry.register(Portlet.CONTENT_TYPE, new PortletContentProvider());
- registry.register(Gadget.CONTENT_TYPE, new GadgetContentProvider());
- registry.register(WSRP.CONTENT_TYPE, new WSRPContentProvider());
- }
-}
Modified:
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java
===================================================================
---
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -23,6 +23,7 @@
import org.exoplatform.portal.config.model.ApplicationState;
import org.exoplatform.portal.config.model.ApplicationType;
import org.exoplatform.portal.config.model.CloneApplicationState;
+import org.exoplatform.portal.pom.data.ModelChange;
import org.exoplatform.portal.config.model.PersistentApplicationState;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.config.model.TransientApplicationState;
@@ -215,7 +216,6 @@
}
//
- final List<String> orders = new ArrayList<String>();
Set<String> savedSet = new HashSet<String>();
for (NavigationNodeData node : src.getNodes())
{
@@ -236,7 +236,6 @@
}
save(node, dstChild);
savedSet.add(srcId);
- orders.add(dstChild.getObjectId());
}
for (Iterator<? extends Navigation> i = dst.getChildren().iterator();
i.hasNext();)
{
@@ -246,22 +245,6 @@
i.remove();
}
}
- // Now sort children according to the order provided by the container
- // need to replace that with Collections.sort once the set(int index, E element) is
implemented in Chromattic lists
- Navigation[] a = dst.getChildren().toArray(new
Navigation[dst.getChildren().size()]);
- Arrays.sort(a, new Comparator<Navigation>()
- {
- public int compare(Navigation o1, Navigation o2)
- {
- int i1 = orders.indexOf(o1.getObjectId());
- int i2 = orders.indexOf(o2.getObjectId());
- return i1 - i2;
- }
- });
- for (int j = 0; j < a.length; j++)
- {
- dst.getChildren().add(j, a[j]);
- }
}
public PortalData load(Site src)
Modified:
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/spi/gadget/GadgetContentProvider.java
===================================================================
---
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/spi/gadget/GadgetContentProvider.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/spi/gadget/GadgetContentProvider.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -22,6 +22,7 @@
import org.exoplatform.portal.pom.spi.ContentProviderHelper;
import org.exoplatform.portal.pom.spi.HelpableContentProvider;
import org.gatein.mop.spi.content.ContentProvider;
+import org.gatein.mop.spi.content.GetState;
import org.gatein.mop.spi.content.StateContainer;
import java.util.List;
@@ -33,6 +34,11 @@
public class GadgetContentProvider implements ContentProvider<Gadget>,
HelpableContentProvider<GadgetState, Gadget>
{
+ public GetState<Gadget> getState(String contentId)
+ {
+ throw new UnsupportedOperationException();
+ }
+
public Gadget combine(List<Gadget> states)
{
throw new UnsupportedOperationException();
Modified:
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/spi/portlet/PortletContentProvider.java
===================================================================
---
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/spi/portlet/PortletContentProvider.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/spi/portlet/PortletContentProvider.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -22,6 +22,7 @@
import org.exoplatform.portal.pom.spi.ContentProviderHelper;
import org.exoplatform.portal.pom.spi.HelpableContentProvider;
import org.gatein.mop.spi.content.ContentProvider;
+import org.gatein.mop.spi.content.GetState;
import org.gatein.mop.spi.content.StateContainer;
import java.util.HashMap;
@@ -40,6 +41,11 @@
{
}
+ public GetState<Portlet> getState(String contentId)
+ {
+ throw new UnsupportedOperationException();
+ }
+
public Portlet combine(List<Portlet> states)
{
Map<String, Preference> entries = new HashMap<String, Preference>();
Modified:
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/spi/wsrp/WSRPContentProvider.java
===================================================================
---
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/spi/wsrp/WSRPContentProvider.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/portal/src/main/java/org/exoplatform/portal/pom/spi/wsrp/WSRPContentProvider.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -23,6 +23,7 @@
import org.exoplatform.portal.pom.spi.ContentProviderHelper;
import org.exoplatform.portal.pom.spi.HelpableContentProvider;
import org.gatein.mop.spi.content.ContentProvider;
+import org.gatein.mop.spi.content.GetState;
import org.gatein.mop.spi.content.StateContainer;
import java.io.ByteArrayInputStream;
@@ -35,6 +36,11 @@
public class WSRPContentProvider implements ContentProvider<WSRP>,
HelpableContentProvider<WSRPState, WSRP>
{
+ public GetState<WSRP> getState(String s)
+ {
+ throw new UnsupportedOperationException("todo");
+ }
+
public WSRP combine(List<WSRP> wsrpStates)
{
throw new UnsupportedOperationException("todo");
Modified:
portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal/database-configuration.xml
===================================================================
---
portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal/database-configuration.xml 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal/database-configuration.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -33,11 +33,6 @@
<name>hibernate.properties</name>
<description>Default Hibernate Service</description>
<property name="hibernate.show_sql" value="false"/>
- <property name="hibernate.current_session_context_class"
value="thread"/>
- <property name="hibernate.cache.use_second_level_cache"
value="false"/>
- <property name="hibernate.cache.use_query_cache"
value="false"/>
- <property name="hibernate.jdbc.batch_size" value="0"/>
- <property name="hibernate.cache.provider_class"
value="org.hibernate.cache.HashtableCacheProvider"/>
<property name="hibernate.cglib.use_reflection_optimizer"
value="true"/>
<property name="hibernate.connection.url"
value="jdbc:hsqldb:file:target/temp/data/exodb"/>
<property name="hibernate.connection.driver_class"
value="org.hsqldb.jdbcDriver"/>
Modified:
portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal/idm-configuration.xml
===================================================================
---
portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal/idm-configuration.xml 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal/idm-configuration.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -25,19 +25,52 @@
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
<component>
-
<key>org.exoplatform.services.organization.idm.PicketLinkIDMService</key>
-
<type>org.exoplatform.services.organization.idm.PicketLinkIDMServiceImpl</type>
+ <key>org.exoplatform.services.organization.jbidm.JBossIDMService</key>
+
<type>org.exoplatform.services.organization.jbidm.JBossIDMServiceImpl</type>
<init-params>
<value-param>
<name>config</name>
<value>war:/conf/organization/idm-config.xml</value>
</value-param>
+ <values-param>
+ <name>hibernate.annotations</name>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttributeValue</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredential</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectTextAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateRealm</value>
+ </values-param>
+ <properties-param>
+ <name>hibernate.properties</name>
+ <property name="hibernate.hbm2ddl.auto"
value="update"/>
+ <property name="hibernate.current_session_context_class"
value="thread"/>
+ <property name="hibernate.show_sql"
value="false"/>
+ <property name="hibernate.cglib.use_reflection_optimizer"
value="true"/>
+ <property name="hibernate.connection.url"
value="jdbc:hsqldb:file:target/temp/data/exodb"/>
+ <property name="hibernate.connection.driver_class"
value="org.hsqldb.jdbcDriver"/>
+ <property name="hibernate.connection.autocommit"
value="true"/>
+ <property name="hibernate.connection.username"
value="sa"/>
+ <property name="hibernate.connection.password"
value=""/>
+ <property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect"/>
+ <property name="hibernate.c3p0.min_size"
value="5"/>
+ <property name="hibernate.c3p0.max_size"
value="20"/>
+ <property name="hibernate.c3p0.timeout"
value="1800"/>
+ <property name="hibernate.c3p0.max_statements"
value="50"/>
+ </properties-param>
+
</init-params>
</component>
<component>
<key>org.exoplatform.services.organization.OrganizationService</key>
-
<type>org.exoplatform.services.organization.idm.PicketLinkIDMOrganizationServiceImpl</type>
+
<type>org.exoplatform.services.organization.jbidm.JBossIDMOrganizationServiceImpl</type>
</component>
<external-component-plugins>
@@ -48,18 +81,19 @@
<type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
<init-params>
<values-param>
- <name>hibernate.mapping</name>
- <value>mappings/HibernateRealm.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml</value>
- <value>mappings/HibernateIdentityObject.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectCredential.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectCredentialType.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectAttribute.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectType.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectRelationship.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectRelationshipType.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectRelationshipName.hbm.xml</value>
+ <name>hibernate.annotations</name>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttributeValue</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredential</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectTextAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateRealm</value>
</values-param>
</init-params>
</component-plugin>
Modified:
portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal/jcr-configuration.xml
===================================================================
---
portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal/jcr-configuration.xml 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal/jcr-configuration.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -79,7 +79,7 @@
<values-param>
<name>autoCreatedInNewRepository</name>
<description>Node types configuration file</description>
- <value>jar:/conf/mop-nodetypes.xml</value>
+ <value>jar:/conf/standalone/nodetypes.xml</value>
<value>jar:/conf/portal/portal-nodetypes.xml</value>
</values-param>
</init-params>
Modified:
portal/branches/wsrp-integration/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
===================================================================
---
portal/branches/wsrp-integration/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -19,6 +19,8 @@
package org.exoplatform.portal.config;
+import static org.exoplatform.portal.pom.config.Utils.split;
+
import org.exoplatform.container.PortalContainer;
import org.exoplatform.portal.application.PortletPreferences;
import org.exoplatform.portal.application.Preference;
@@ -27,13 +29,12 @@
import org.exoplatform.portal.config.model.ApplicationType;
import org.exoplatform.portal.config.model.Container;
import org.exoplatform.portal.config.model.Dashboard;
+import org.exoplatform.portal.pom.data.ModelChange;
import org.exoplatform.portal.config.model.Page;
import org.exoplatform.portal.config.model.PageNavigation;
-import org.exoplatform.portal.config.model.PageNode;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.config.model.TransientApplicationState;
import org.exoplatform.portal.pom.config.POMSessionManager;
-import org.exoplatform.portal.pom.data.ModelChange;
import org.exoplatform.portal.pom.spi.gadget.Gadget;
import org.exoplatform.portal.pom.spi.portlet.Portlet;
import org.exoplatform.portal.pom.spi.portlet.PortletBuilder;
@@ -43,8 +44,6 @@
import java.util.Collections;
import java.util.List;
-import static org.exoplatform.portal.pom.config.Utils.split;
-
/**
* Created by The eXo Platform SARL Author : Tung Pham thanhtungty(a)gmail.com Nov
* 13, 2007
@@ -295,48 +294,6 @@
assertNull(navigation);
}
- public void testNavigationOrder() throws Exception
- {
- PortalConfig portal = new PortalConfig("portal");
- portal.setName("test_nav");
- storage_.create(portal);
-
- //
- PageNavigation nav = new PageNavigation();
- nav.setOwnerType("portal");
- nav.setOwnerId("test_nav");
- PageNode node1 = new PageNode();
- node1.setName("n1");
- PageNode node2 = new PageNode();
- node2.setName("n2");
- PageNode node3 = new PageNode();
- node3.setName("n3");
- nav.addNode(node1);
- nav.addNode(node2);
- nav.addNode(node3);
-
- //
- storage_.save(nav);
-
- //
- nav = storage_.getPageNavigation("portal", "test_nav");
- assertEquals(3, nav.getNodes().size());
- assertEquals("n1", nav.getNodes().get(0).getName());
- assertEquals("n2", nav.getNodes().get(1).getName());
- assertEquals("n3", nav.getNodes().get(2).getName());
-
- //
- nav.getNodes().add(0, nav.getNodes().remove(1));
- storage_.save(nav);
-
- //
- nav = storage_.getPageNavigation("portal", "test_nav");
- assertEquals(3, nav.getNodes().size());
- assertEquals("n2", nav.getNodes().get(0).getName());
- assertEquals("n1", nav.getNodes().get(1).getName());
- assertEquals("n3", nav.getNodes().get(2).getName());
- }
-
public void testCreatePortletPreferences() throws Exception
{
ArrayList<Preference> prefs = new ArrayList<Preference>();
Modified:
portal/branches/wsrp-integration/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java
===================================================================
---
portal/branches/wsrp-integration/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -20,6 +20,7 @@
package org.exoplatform.portal.config;
import junit.framework.AssertionFailedError;
+
import org.exoplatform.container.PortalContainer;
import org.exoplatform.portal.application.PortletPreferences;
import org.exoplatform.portal.config.model.Application;
@@ -42,12 +43,12 @@
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.services.organization.User;
import org.exoplatform.services.organization.UserHandler;
-import org.exoplatform.services.organization.idm.PicketLinkIDMService;
+import org.exoplatform.services.organization.jbidm.JBossIDMService;
import org.exoplatform.services.security.Authenticator;
import org.exoplatform.services.security.ConversationState;
import org.exoplatform.test.BasicTestCase;
-import org.picketlink.idm.api.IdentitySession;
-import org.picketlink.idm.common.exception.IdentityException;
+import org.jboss.identity.idm.api.IdentitySession;
+import org.jboss.identity.idm.common.exception.IdentityException;
import java.util.Arrays;
import java.util.Collections;
@@ -75,7 +76,7 @@
private DataStorage storage_;
/** . */
- private PicketLinkIDMService idmService;
+ private JBossIDMService idmService;
/** . */
private POMSessionManager mgr;
@@ -121,7 +122,7 @@
userPortalConfigSer_ =
(UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
orgService_ =
(OrganizationService)container.getComponentInstanceOfType(OrganizationService.class);
- idmService =
(PicketLinkIDMService)container.getComponentInstanceOfType(PicketLinkIDMService.class);
+ idmService =
(JBossIDMService)container.getComponentInstanceOfType(JBossIDMService.class);
mgr =
(POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
authenticator =
(Authenticator)container.getComponentInstanceOfType(Authenticator.class);
listenerService =
(ListenerService)container.getComponentInstanceOfType(ListenerService.class);
Modified: portal/branches/wsrp-integration/component/scripting/pom.xml
===================================================================
--- portal/branches/wsrp-integration/component/scripting/pom.xml 2009-11-26 15:37:51 UTC
(rev 817)
+++ portal/branches/wsrp-integration/component/scripting/pom.xml 2009-11-26 15:54:09 UTC
(rev 818)
@@ -53,13 +53,13 @@
<dependency>
<groupId>rhino</groupId>
<artifactId>js</artifactId>
- <version>${rhino.version}</version>
+ <version>1.6R5</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
- <version>${org.codehaus.groovy.version}</version>
+ <version>1.5.7</version>
</dependency>
</dependencies>
</project>
Property changes on: portal/branches/wsrp-integration/docs/user-guide
___________________________________________________________________
Name: svn:ignore
- *.iml
.idea
target
+ *.iml
.idea
Modified: portal/branches/wsrp-integration/docs/user-guide/en/master.xml
===================================================================
--- portal/branches/wsrp-integration/docs/user-guide/en/master.xml 2009-11-26 15:37:51 UTC
(rev 817)
+++ portal/branches/wsrp-integration/docs/user-guide/en/master.xml 2009-11-26 15:54:09 UTC
(rev 818)
@@ -118,9 +118,6 @@
<!-- Gadgets -->
<xi:include
xmlns:xi="http://www.w3.org/2001/XInclude"
href="modules/Gadgets.xml" />
-
- <!-- Single Sign On -->
- <xi:include
xmlns:xi="http://www.w3.org/2001/XInclude"
href="modules/SSO.xml" />
<!--
Deleted: portal/branches/wsrp-integration/docs/user-guide/en/modules/SSO.xml
===================================================================
--- portal/branches/wsrp-integration/docs/user-guide/en/modules/SSO.xml 2009-11-26
15:37:51 UTC (rev 817)
+++ portal/branches/wsrp-integration/docs/user-guide/en/modules/SSO.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -1,173 +0,0 @@
-<!--
-
- Copyright (C) 2009 eXo Platform SAS.
-
- This is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of
- the License, or (at your option) any later version.
-
- This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this software; if not, write to the Free
- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-
--->
-
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
"http://www.oasis-open.org/docbook/sgml/4.4/docbookx.dtd">
-<chapter>
-<title>Single Sign On</title>
-
- <section>
- <title>Overview of SSO</title>
- <para>Portal as an integration and aggregation platform provides some form
of SSO by itself. When you log into
- the portal you gain access to many systems through portlets using a single
identity. Still in many cases you
- need to integrate the portal infrastructure with other SSO enabled systems. There
are many different Identity Management
- solutions on the market. In most cases each SSO framework provides its own way to
plug into Java EE application.
- </para>
- </section>
-
- <section>
- <title>CAS - Central Authentication Service</title>
- <para>This Single Sign On plugin enables seamless integration between GateIn
Portal and the CAS Single Sign On Framework.
- Details about CAS can be found <ulink
url="http://www.ja-sig.org/products/cas/">here</ulink>
- </para>
- <section>
- <title>Integration</title>
- <section>
- <title>From source</title>
- <itemizedlist>
- <listitem>
- <para>
- Check out the GateIn SSO component from SVN using the following command:
- <programlisting>
- <![CDATA[
-svn co
http://anonsvn.jboss.org/repos/gatein/components/sso/tags/<appropriate sso
component version>
- ]]>
- </programlisting>
- </para>
- </listitem>
- <listitem>
- <para>
- Update <emphasis>packaging/profiles.xml</emphasis> to reflect
the directories where your local JBoss AS 5.1.0.GA and Tomcat 6.0.2 are installed
- </para>
- </listitem>
- </itemizedlist>
- </section>
- <section>
- <title>Install CAS plugin into a designated CAS (3.3.4)
server</title>
- <itemizedlist>
- <listitem>
- <para>
- <programlisting>
- <![CDATA[
- mvn -Pplugin-cas-install install
- ]]>
- </programlisting>
- </para>
- </listitem>
- </itemizedlist>
- </section>
- <section>
- <title>Install CAS GateIn Agent into the designated GateIn
server</title>
- <itemizedlist>
- <listitem>
- <para>
- <programlisting>
- <![CDATA[
- mvn -Pgatein-cas-install install
- ]]>
- </programlisting>
- </para>
- </listitem>
- </itemizedlist>
- </section>
- </section>
- <section>
- <title>CAS Server Plugin Configuration</title>
- <para>
- The CAS Server Plugin makes secure authentication callbacks to a RESTful service
installed on the remote GateIn server in order to authenticate a user.
- In order for the plugin to function correctly, it needs to be properly
configured to connect to this service. This configuration is done via the
- <emphasis>cas.war/WEB-INF/deployerConfigContext.xml</emphasis>
file.
- </para>
- <para>
- <programlisting>
- <![CDATA[
- <!--
- Note: Modify the Plugin Configuration based on the actual information of a GateIn
instance.
- The instance can be anywhere on the internet...Not on localhost where CAS is
running
- -->
- <bean class="org.gatein.sso.cas.plugin.AuthenticationPlugin">
- <property
name="gateInHost"><value>localhost</value></property>
- <property
name="gateInPort"><value>8080</value></property>
- <property
name="gateInContext"><value>portal</value></property>
- </bean>
- ]]>
- </programlisting>
- </para>
- </section>
- <section>
- <title>GateIn Agent Configuration</title>
- <para>
- In a Single Sign On usecase, the GateIn server re-directs all
"private" resource requests to the CAS server for authentication first. The CAS
server can be
- located anywhere on the Internet, and this information must be properly
configured within the GateIn instance. This configuration needs to be done in 3 files
- <itemizedlist>
- <listitem>
-
<emphasis>gatein.ear/02portal.war/groovy/portal/webui/UILoginForm.gtmpl</emphasis>
- <para>
- <programlisting>
- <![CDATA[
- <script>
- <%=uicomponent.event("Close");%>
- window.location =
'http://localhost:8888/cas/login?service=http://localhost:8080/portal/private/classic';
- </script>
- ]]>
- </programlisting>
- </para>
- </listitem>
- <listitem>
- <emphasis>gatein.ear/02portal.war/login/jsp/login.jsp</emphasis>
- <para>
- <programlisting>
- <![CDATA[
- <html>
- <head>
- <script type="text/javascript">
- window.location =
'http://localhost:8888/cas/login?service=http://localhost:8080/portal/private/classic';
- </script>
- </head>
- <body>
- </body>
- </html>
- ]]>
- </programlisting>
- </para>
- </listitem>
- <listitem>
- <emphasis>gatein.ear/02portal.war/WEB-INF/web.xml</emphasis>
- <para>
- <programlisting>
- <![CDATA[
- <servlet>
- <servlet-name>InitiateLoginServlet</servlet-name>
- <servlet-class>org.gatein.sso.agent.GenericSSOAgent</servlet-class>
- <init-param>
- <param-name>casServerUrl</param-name>
- <param-value>http://localhost:8888/cas</param-value>
- </init-param>
- </servlet>
- ]]>
- </programlisting>
- </para>
- </listitem>
- </itemizedlist>
- </para>
-
- </section>
- </section>
-</chapter>
\ No newline at end of file
Modified: portal/branches/wsrp-integration/packaging/module/pom.xml
===================================================================
--- portal/branches/wsrp-integration/packaging/module/pom.xml 2009-11-26 15:37:51 UTC (rev
817)
+++ portal/branches/wsrp-integration/packaging/module/pom.xml 2009-11-26 15:54:09 UTC (rev
818)
@@ -63,6 +63,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.3</version>
<executions>
<execution>
<id>attach-artifacts</id>
Modified:
portal/branches/wsrp-integration/packaging/module/src/main/javascript/portal.packaging.module.js
===================================================================
---
portal/branches/wsrp-integration/packaging/module/src/main/javascript/portal.packaging.module.js 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/packaging/module/src/main/javascript/portal.packaging.module.js 2009-11-26
15:54:09 UTC (rev 818)
@@ -37,14 +37,12 @@
var mopVersion = "${org.gatein.mop.version}";
var chromatticVersion = "${version.chromattic}";
var reflectVersion = "${version.reflect}";
- var idmVersion = "${org.picketlink.idm}";
+ var idmVersion = "${org.jboss.identity.idm}";
var pcVersion = "${org.gatein.pc.version}";
var wciVersion = "${org.gatein.wci.version}";
var commonVersion = "${org.gatein.common.version}";
var wsrpVersion = "${org.gatein.wsrp.version}";
var shindigVersion = "${org.shindig.version}";
- var groovyVersion = "${org.codehaus.groovy.version}";
- var rhinoVersion = "${rhino.version}";
//TODO versions for gatein components
@@ -53,8 +51,7 @@
new Project("org.exoplatform.portal",
"exo.portal.component.resources", "jar", module.version);
module.component.common =
- new Project("org.exoplatform.portal",
"exo.portal.component.common", "jar", module.version).
- addDependency(new Project("org.gatein.common",
"common-logging", "jar", commonVersion));
+ new Project("org.exoplatform.portal",
"exo.portal.component.common", "jar", module.version);
module.component.pc =
new Project("org.exoplatform.portal", "exo.portal.component.pc",
"jar", module.version).
@@ -62,7 +59,6 @@
addDependency(new Project("javax.ccpp", "ccpp",
"jar", "1.0")).
addDependency(new Project("javax.xml.bind", "jaxb-api",
"jar", "2.1")).
addDependency(new Project("org.gatein.pc", "pc-api",
"jar", pcVersion)).
- addDependency(new Project("org.gatein.pc", "pc-bridge",
"jar", pcVersion)).
addDependency(new Project("org.gatein.pc", "pc-portlet",
"jar", pcVersion)).
addDependency(new Project("org.gatein.pc", "pc-mc",
"jar", pcVersion)).
addDependency(new Project("org.gatein.pc", "pc-controller",
"jar", pcVersion)).
@@ -74,7 +70,6 @@
addDependency(new Project("log4j", "log4j", "jar",
"1.2.14")).
addDependency(new Project("org.jboss", "jbossxb",
"jar", "2.0.1.GA")).
addDependency(new Project("org.jboss.logging",
"jboss-logging-spi", "jar", "2.0.5.GA")).
- addDependency(new Project("org.apache.portals.bridges",
"portals-bridges-common", "jar", "1.0.4")).
addDependency(new Project("org.jboss", "jboss-common-core",
"jar", "2.2.9.GA"));
@@ -94,8 +89,8 @@
module.component.scripting =
new Project("org.exoplatform.portal",
"exo.portal.component.scripting", "jar", module.version).
addDependency(module.component.xmlParser).
- addDependency(new Project("rhino", "js", "jar",
rhinoVersion)).
- addDependency(new Project("org.codehaus.groovy", "groovy-all",
"jar", groovyVersion));
+ addDependency(new Project("rhino", "js", "jar",
"1.6R5")).
+ addDependency(new Project("org.codehaus.groovy", "groovy-all",
"jar", "1.6.5"));
module.component.web =
new Project("org.exoplatform.portal", "exo.portal.component.web",
"jar", module.version).
@@ -120,12 +115,12 @@
module.component.identity =
new Project("org.exoplatform.portal",
"exo.portal.component.identity", "jar", module.version).
- addDependency(new Project("org.picketlink.idm",
"picketlink-idm-core", "jar", idmVersion)).
- addDependency(new Project("org.picketlink.idm",
"picketlink-idm-common", "jar", idmVersion)).
- addDependency(new Project("org.picketlink.idm",
"picketlink-idm-api", "jar", idmVersion)).
- addDependency(new Project("org.picketlink.idm",
"picketlink-idm-spi", "jar", idmVersion)).
- addDependency(new Project("org.picketlink.idm",
"picketlink-idm-hibernate", "jar", idmVersion)).
- addDependency(new Project("org.picketlink.idm",
"picketlink-idm-ldap", "jar", idmVersion));
+ addDependency(new Project("org.jboss.identity.idm", "idm-core",
"jar", idmVersion)).
+ addDependency(new Project("org.jboss.identity.idm",
"idm-common", "jar", idmVersion)).
+ addDependency(new Project("org.jboss.identity.idm", "idm-api",
"jar", idmVersion)).
+ addDependency(new Project("org.jboss.identity.idm", "idm-spi",
"jar", idmVersion)).
+ addDependency(new Project("org.jboss.identity.idm",
"idm-hibernate", "jar", idmVersion)).
+ addDependency(new Project("org.jboss.identity.idm", "idm-ldap",
"jar", idmVersion));
module.component.applicationRegistry =
new Project("org.exoplatform.portal",
"exo.portal.component.application-registry", "jar", module.version).
Modified: portal/branches/wsrp-integration/packaging/pkg/pom.xml
===================================================================
--- portal/branches/wsrp-integration/packaging/pkg/pom.xml 2009-11-26 15:37:51 UTC (rev
817)
+++ portal/branches/wsrp-integration/packaging/pkg/pom.xml 2009-11-26 15:54:09 UTC (rev
818)
@@ -34,10 +34,10 @@
<dependencies>
<dependency>
- <groupId>org.gatein.tools</groupId>
- <artifactId>packager</artifactId>
+ <groupId>org.exoplatform.tool</groupId>
+ <artifactId>exopackage</artifactId>
<type>zip</type>
- <version>1.0.0-Beta02</version>
+ <version>1.1.0-Beta05</version>
</dependency>
<dependency>
@@ -104,11 +104,19 @@
<overWriteSnapshots>true</overWriteSnapshots>
<artifactItems>
<artifactItem>
- <groupId>org.gatein.tools</groupId>
- <artifactId>packager</artifactId>
- <type>zip</type>
-
<outputDirectory>target/packager</outputDirectory>
+ <groupId>org.exoplatform.tool</groupId>
+ <artifactId>exopackage</artifactId>
+ <type>zip</type>
+
<outputDirectory>target/exopackage</outputDirectory>
</artifactItem>
+ <!--
+ <artifactItem>
+ <groupId>org.exoplatform.delivery</groupId>
+ <artifactId>exopackage-conf</artifactId>
+ <type>zip</type>
+
<outputDirectory>target/exopackage-conf</outputDirectory>
+ </artifactItem>
+ -->
</artifactItems>
</configuration>
</execution>
@@ -121,7 +129,8 @@
<configuration>
<includeTypes>js</includeTypes>
<stripVersion>true</stripVersion>
-
<outputDirectory>${project.build.directory}/packager-conf</outputDirectory>
+
<!--includeArtifactIds>exo.packaging.*.module</includeArtifactIds-->
+
<outputDirectory>${project.build.directory}/exopackage-conf</outputDirectory>
</configuration>
</execution>
</executions>
@@ -177,16 +186,16 @@
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
- <id>tomcat-packaging</id>
+ <id>tomcat-exopackage</id>
<phase>package</phase>
<configuration>
<executable>java</executable>
<workingDirectory>${basedir}</workingDirectory>
<arguments>
-
<argument>-Dexo.package.home=${basedir}/target/packager</argument>
+
<argument>-Dexo.package.home=${basedir}/target/exopackage</argument>
<argument>-Dexo.current.dir=${basedir}</argument>
<argument>-Dexo.base.dir=${exo.projects.directory.base}</argument>
-
<argument>-Dexo.conf.dir=${basedir}/target/packager-conf</argument>
+
<argument>-Dexo.conf.dir=${basedir}/target/exopackage-conf</argument>
<argument>-Dexo.working.dir=${gatein.working.dir}/</argument>
<!--argument>-Dexo.src.dir=NONE</argument-->
<argument>-Dexo.dep.dir=${exo.projects.directory.dependencies}</argument><!--
to get the server ref install -->
@@ -197,9 +206,9 @@
<argument>-Xms128m</argument>
<argument>-Xmx512m</argument>
<argument>-classpath</argument>
-
<argument>${basedir}/target/packager/lib/js.jar</argument>
+
<argument>${basedir}/target/exopackage/lib/js.jar</argument>
<argument>org.mozilla.javascript.tools.shell.Main</argument>
-
<argument>${basedir}/target/packager/javascript/eXo/eXo.js</argument>
+
<argument>${basedir}/target/exopackage/javascript/eXo/eXo.js</argument>
<argument>exobuild</argument>
<argument>--product=portal</argument>
<argument>--deploy=tomcat</argument>
@@ -278,16 +287,16 @@
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
- <id>jbossas-packaging</id>
+ <id>jbossas-exopackage</id>
<phase>package</phase>
<configuration>
<executable>java</executable>
<workingDirectory>${basedir}</workingDirectory>
<arguments>
-
<argument>-Dexo.package.home=${basedir}/target/packager</argument>
+
<argument>-Dexo.package.home=${basedir}/target/exopackage</argument>
<argument>-Dexo.current.dir=${basedir}</argument>
<argument>-Dexo.base.dir=${exo.projects.directory.base}</argument>
-
<argument>-Dexo.conf.dir=${basedir}/target/packager-conf</argument>
+
<argument>-Dexo.conf.dir=${basedir}/target/exopackage-conf</argument>
<argument>-Dexo.working.dir=${gatein.working.dir}</argument>
<!--argument>-Dexo.src.dir=NONE</argument-->
<argument>-Dexo.dep.dir=${exo.projects.directory.dependencies}</argument><!--
to get the server ref install -->
@@ -298,9 +307,9 @@
<argument>-Xms128m</argument>
<argument>-Xmx512m</argument>
<argument>-classpath</argument>
-
<argument>${basedir}/target/packager/lib/js.jar</argument>
+
<argument>${basedir}/target/exopackage/lib/js.jar</argument>
<argument>org.mozilla.javascript.tools.shell.Main</argument>
-
<argument>${basedir}/target/packager/javascript/eXo/eXo.js</argument>
+
<argument>${basedir}/target/exopackage/javascript/eXo/eXo.js</argument>
<argument>exobuild</argument>
<argument>--product=portal</argument>
<argument>--deploy=jbossear</argument>
Modified: portal/branches/wsrp-integration/packaging/pom.xml
===================================================================
--- portal/branches/wsrp-integration/packaging/pom.xml 2009-11-26 15:37:51 UTC (rev 817)
+++ portal/branches/wsrp-integration/packaging/pom.xml 2009-11-26 15:54:09 UTC (rev 818)
@@ -32,6 +32,7 @@
<name>GateIn Portal Packaging</name>
<modules>
+ <!--module>exopackage</module-->
<module>module</module>
<module>product</module>
<module>pkg</module>
Modified: portal/branches/wsrp-integration/packaging/product/pom.xml
===================================================================
--- portal/branches/wsrp-integration/packaging/product/pom.xml 2009-11-26 15:37:51 UTC
(rev 817)
+++ portal/branches/wsrp-integration/packaging/product/pom.xml 2009-11-26 15:54:09 UTC
(rev 818)
@@ -64,6 +64,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.3</version>
<executions>
<execution>
<id>attach-artifacts</id>
Modified: portal/branches/wsrp-integration/pom.xml
===================================================================
--- portal/branches/wsrp-integration/pom.xml 2009-11-26 15:37:51 UTC (rev 817)
+++ portal/branches/wsrp-integration/pom.xml 2009-11-26 15:54:09 UTC (rev 818)
@@ -19,14 +19,15 @@
-->
-<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.gatein</groupId>
<artifactId>gatein-parent</artifactId>
- <version>1.0.0-Beta04</version>
+ <version>1.0.0-Beta03</version>
</parent>
<groupId>org.exoplatform.portal</groupId>
@@ -34,27 +35,23 @@
<version>3.0.0-Beta03-SNAPSHOT</version>
<packaging>pom</packaging>
- <name>GateIn - Portal</name>
+ <name>GateIn Portal</name>
<properties>
-
<org.exoplatform.kernel.version>2.2.0-Beta04</org.exoplatform.kernel.version>
-
<org.exoplatform.core.version>2.3.0-Beta04</org.exoplatform.core.version>
- <org.exoplatform.ws.version>2.1.0-Beta04</org.exoplatform.ws.version>
-
<org.exoplatform.jcr.version>1.12.0-Beta04</org.exoplatform.jcr.version>
+
<org.exoplatform.kernel.version>2.2.0-Beta02</org.exoplatform.kernel.version>
+
<org.exoplatform.core.version>2.3.0-Beta02</org.exoplatform.core.version>
+ <org.exoplatform.ws.version>2.1.0-Beta02</org.exoplatform.ws.version>
+
<org.exoplatform.jcr.version>1.12.0-Beta02</org.exoplatform.jcr.version>
<org.jibx.version>1.2.1</org.jibx.version>
<org.shindig.version>SNAPSHOT-r790473</org.shindig.version>
- <org.gatein.common.version>2.0.0-CR02</org.gatein.common.version>
- <org.gatein.wci.version>2.0.0-CR01</org.gatein.wci.version>
- <org.gatein.pc.version>2.1.0-CR01</org.gatein.pc.version>
- <org.picketlink.idm>1.0.0.CR1</org.picketlink.idm>
+
<org.gatein.common.version>2.0.0-CR1-SNAPSHOT</org.gatein.common.version>
+ <org.gatein.wci.version>2.0.0-Beta02</org.gatein.wci.version>
+ <org.gatein.pc.version>2.1.0-Beta02</org.gatein.pc.version>
+ <org.jboss.identity.idm>1.0.0.Beta3</org.jboss.identity.idm>
<org.gatein.wsrp.version>1.0.0-Beta02-SNAPSHOT</org.gatein.wsrp.version>
- <org.gatein.mop.version>1.0.0-Beta10</org.gatein.mop.version>
- <org.slf4j.version>1.5.6</org.slf4j.version>
- <rhino.version>1.6R5</rhino.version>
- <org.codehaus.groovy.version>1.6.5</org.codehaus.groovy.version>
- <javax.servlet.version>2.5</javax.servlet.version>
+ <org.gatein.mop.version>1.0.0-Beta09</org.gatein.mop.version>
<version.chromattic>1.0.0-beta8</version.chromattic>
- <version.reflect>1.0.0-beta4</version.reflect>
+ <version.reflect>1.0.0-beta3</version.reflect>
<!-- ************** -->
<!-- Build settings -->
@@ -66,6 +63,8 @@
<!-- maven-release-plugin -->
<arguments>-Prelease,pkg-tomcat,pkg-jbossas
-Dmaven.test.skip=true</arguments>
+ <gatein.checkout.dir>/Users/claprun/Dev/gatein/current</gatein.checkout.dir>
+
</properties>
<scm>
@@ -90,7 +89,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
- <version>${org.slf4j.version}</version>
+ <version>1.5.6</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -126,11 +125,6 @@
<version>1.1.1</version>
</plugin>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>1.4</version>
- </plugin>
- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
@@ -178,13 +172,17 @@
<rules>
<requireProperty>
<property>gatein.checkout.dir</property>
- <message>"You must define the property
gatein.checkout.dir to give the path of the root of your working
area"</message>
+ <message>"You must define the property
gatein.checkout.dir to give the path of the root of
+ your working area"
+ </message>
</requireProperty>
<requireFilesExist>
<files>
<file>${gatein.checkout.dir}/web/portal/src/main/webapp</file>
</files>
- <message>"The following directory doesn't exist
: ${gatein.checkout.dir}/web/portal/src/main/webapp"</message>
+ <message>"The following directory doesn't exist
:
+ ${gatein.checkout.dir}/web/portal/src/main/webapp"
+ </message>
</requireFilesExist>
</rules>
<fail>true</fail>
@@ -201,11 +199,12 @@
<phase>compile</phase>
<configuration>
<tasks>
- <copy failonerror="false"
todir="${project.build.directory}/${project.build.finalName}/WEB-INF/classes">
+ <copy failonerror="false"
+
todir="${project.build.directory}/${project.build.finalName}/WEB-INF/classes">
<fileset
dir="${basedir}/src/main/webapp/WEB-INF/classes">
- <include name="**/*_en.properties" />
+ <include name="**/*_en.properties"/>
</fileset>
- <globmapper from="*_en.properties"
to="*.properties" />
+ <globmapper from="*_en.properties"
to="*.properties"/>
</copy>
</tasks>
</configuration>
Modified:
portal/branches/wsrp-integration/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java
===================================================================
---
portal/branches/wsrp-integration/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -101,10 +101,9 @@
return null;
}
- public int getCurrentNumberOfTabs() throws Exception
+ public int getCurrentNumberOfTabs()
{
-
- return getSameSiblingsNode().size();
+ return pageNavigation.getNodes().size();
}
public int getStartShowIndex()
@@ -124,18 +123,6 @@
}
}
- public List<PageNode> getSameSiblingsNode() throws Exception
- {
- List<PageNode> siblings = getPageNavigation().getNodes();
- List<PageNode> selectedPath = Util.getUIPortal().getSelectedPaths();
- if (selectedPath != null && selectedPath.size() > 1)
- {
- PageNode currentParent = selectedPath.get(selectedPath.size() - 2);
- siblings = currentParent.getChildren();
- }
- return siblings;
- }
-
public PageNavigation getPageNavigation() throws Exception
{
if (pageNavigation == null)
@@ -154,16 +141,9 @@
{
try
{
- List<PageNode> nodes = pageNavigation.getNodes();
- PageNode parentNode = null;
- List<PageNode> selectedPath = uiPortal.getSelectedPaths();
- if (selectedPath != null && selectedPath.size() > 1)
+ ArrayList<PageNode> nodes = pageNavigation.getNodes();
+ if (nodes.size() < 2)
{
- parentNode = selectedPath.get(selectedPath.size() - 2);
- nodes = parentNode.getChildren();
- }
- if (parentNode == null && nodes.size() < 2)
- {
return null; // At the moment, we prevent user from deleting all the
dashboard
}
PageNode tobeRemoved = nodes.get(nodeIndex);
@@ -171,12 +151,6 @@
nodes.remove(nodeIndex);
- String pageRef = tobeRemoved.getPageReference();
- if (pageRef != null && pageRef.length() > 0)
- {
- configService.remove(configService.getPage(pageRef));
- }
-
if (tobeRemoved.getUri().equals(selectedNode.getUri()))
{
selectedNode = nodes.get(Math.max(0, nodeIndex - 1));
@@ -207,13 +181,6 @@
pageNavigation.getOwnerId());
page.setTitle(nodeLabel);
- List<PageNode> selectedPath = uiPortal.getSelectedPaths();
- PageNode parentNode = null;
- if (selectedPath != null && selectedPath.size() > 1)
- {
- parentNode = selectedPath.get(selectedPath.size() - 2);
- }
-
PageNode pageNode = new PageNode();
pageNode.setLabel(nodeLabel);
String uniqueNodeName = nodeLabel.toLowerCase().replace(' ',
'_');
@@ -222,28 +189,18 @@
uniqueNodeName = uniqueNodeName + "_" +
System.currentTimeMillis();
}
- String fullName = (parentNode != null) ? parentNode.getUri() + "/" +
uniqueNodeName : uniqueNodeName;
-
page.setName(uniqueNodeName);
pageNode.setName(uniqueNodeName);
- pageNode.setUri(fullName);
+ pageNode.setUri(uniqueNodeName);
pageNode.setPageReference(page.getPageId());
- if (parentNode == null)
- {
- pageNavigation.addNode(pageNode);
- }
- else if (parentNode.getChildren() != null)
- {
- parentNode.getChildren().add(pageNode);
- }
-
+ pageNavigation.addNode(pageNode);
uiPortal.setSelectedNode(pageNode);
configService.create(page);
configService.update(pageNavigation);
- return fullName;
+ return uniqueNodeName;
}
catch (Exception ex)
{
@@ -291,15 +248,7 @@
{
try
{
- List<PageNode> nodes = pageNavigation.getNodes();
- List<PageNode> selectedPath = uiPortal.getSelectedPaths();
- PageNode parentNode = null;
- if (selectedPath != null && selectedPath.size() > 1)
- {
- parentNode = selectedPath.get(selectedPath.size() - 2);
- nodes = parentNode.getChildren();
- }
-
+ ArrayList<PageNode> nodes = pageNavigation.getNodes();
PageNode renamedNode = nodes.get(nodeIndex);
if (renamedNode == null || newNodeLabel.length() == 0)
{
@@ -314,13 +263,10 @@
newNodeName = newNodeName + "_" + System.currentTimeMillis();
}
renamedNode.setName(newNodeName);
+ renamedNode.setUri(newNodeName);
- String newUri = (parentNode != null) ? parentNode.getUri() + "/" +
newNodeName : newNodeName;
-
- renamedNode.setUri(newUri);
-
configService.update(pageNavigation);
- return newUri;
+ return newNodeName;
}
catch (Exception ex)
{
@@ -365,11 +311,7 @@
{
UITabPaneDashboard source = event.getSource();
WebuiRequestContext context = event.getRequestContext();
- List<PageNode> path = Util.getUIPortal().getSelectedPaths();
- boolean isRoot = true;
- if (path != null && path.size() > 1)
- isRoot = false;
- if (isRoot && source.getCurrentNumberOfTabs() == 1)
+ if (source.getCurrentNumberOfTabs() == 1)
{
source.getAncestorOfType(UIApplication.class).addMessage(
new
ApplicationMessage("UITabPaneDashboard.msg.cannotDeleteLastTab", null));
@@ -382,8 +324,7 @@
if (selectedNode != null)
{
PortalRequestContext prContext = Util.getPortalRequestContext();
- prContext.setResponseComplete(true);
- prContext.getResponse().sendRedirect(prContext.getPortalURI() +
selectedNode.getUri());
+ prContext.getResponse().sendRedirect(prContext.getPortalURI() +
selectedNode.getName());
}
}
}
@@ -400,14 +341,13 @@
context.getUIApplication().addMessage(new
ApplicationMessage("UITabPaneDashboard.msg.wrongTabName", null));
return;
}
- String uri = tabPane.createNewPageNode(newTabLabel);
+ String newNodeName = tabPane.createNewPageNode(newTabLabel);
//If new node is created with success, then redirect to it
- if (uri != null)
+ if (newNodeName != null)
{
PortalRequestContext prContext = Util.getPortalRequestContext();
- prContext.setResponseComplete(true);
- prContext.getResponse().sendRedirect(prContext.getPortalURI() + uri);
+ prContext.getResponse().sendRedirect(prContext.getPortalURI() +
newNodeName);
}
}
}
@@ -435,13 +375,13 @@
context.getUIApplication().addMessage(new
ApplicationMessage("UITabPaneDashboard.msg.wrongTabName", null));
return;
}
- String newUri = tabPane.renamePageNode(nodeIndex, newTabLabel);
+ String newNodeName = tabPane.renamePageNode(nodeIndex, newTabLabel);
//If page node is renamed with success, then redirect to new URL
- if (newUri != null)
+ if (newNodeName != null)
{
PortalRequestContext prContext = Util.getPortalRequestContext();
- prContext.getResponse().sendRedirect(prContext.getPortalURI() + newUri);
+ prContext.getResponse().sendRedirect(prContext.getPortalURI() +
newNodeName);
}
}
}
Copied:
portal/branches/wsrp-integration/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetEditMode.java
(from rev 804,
portal/branches/wsrp-integration/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetEditMode.java)
===================================================================
---
portal/branches/wsrp-integration/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetEditMode.java
(rev 0)
+++
portal/branches/wsrp-integration/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetEditMode.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -0,0 +1,212 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.gadget.webui.component;
+
+import org.exoplatform.application.registry.Application;
+import org.exoplatform.application.registry.ApplicationRegistryService;
+import org.exoplatform.portal.config.UserACL;
+import org.exoplatform.portal.config.model.ApplicationType;
+import org.exoplatform.portal.config.model.TransientApplicationState;
+import org.exoplatform.portal.pom.spi.gadget.Gadget;
+import org.exoplatform.portal.webui.application.UIGadget;
+import org.exoplatform.portal.webui.util.Util;
+import org.exoplatform.portal.webui.workspace.UIPortalApplication;
+import org.exoplatform.web.application.ApplicationMessage;
+import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.application.portlet.PortletRequestContext;
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
+import org.exoplatform.webui.core.model.SelectItemOption;
+import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.EventListener;
+import org.exoplatform.webui.event.Event.Phase;
+import org.exoplatform.webui.form.UIForm;
+import org.exoplatform.webui.form.UIFormSelectBox;
+import org.exoplatform.webui.form.UIFormStringInput;
+import org.exoplatform.webui.form.validator.MandatoryValidator;
+import org.exoplatform.webui.form.validator.URLValidator;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.portlet.PortletMode;
+import javax.portlet.PortletPreferences;
+
+/**
+ * Created by The eXo Platform SARL Author : dang.tung tungcnw(a)gmail.com June
+ * 27, 2008
+ */
+@ComponentConfig(lifecycle = UIFormLifecycle.class, template =
"system:/groovy/webui/form/UIFormWithTitle.gtmpl", events = {
+ @EventConfig(listeners = UIGadgetEditMode.SaveActionListener.class),
+ @EventConfig(listeners = UIGadgetEditMode.SelectTypeActionListener.class, phase =
Phase.DECODE)})
+public class UIGadgetEditMode extends UIForm
+{
+
+ public static final String FIELD_URL = "gadgetUrl";
+
+ public static final String TYPE_SELECTOR = "typeSelector";
+
+ public static final String GADGET_SELECTOR = "gadgetSelector";
+
+ public static final String REMOTE_TYPE = "remote";
+
+ public static final String LOCAL_TYPE = "local";
+
+ public UIGadgetEditMode() throws Exception
+ {
+ PortletRequestContext pcontext =
(PortletRequestContext)WebuiRequestContext.getCurrentInstance();
+ PortletPreferences pref = pcontext.getRequest().getPreferences();
+
+ List<SelectItemOption<String>> options = new
ArrayList<SelectItemOption<String>>();
+ options.add(new SelectItemOption<String>(REMOTE_TYPE, REMOTE_TYPE));
+ options.add(new SelectItemOption<String>(LOCAL_TYPE, LOCAL_TYPE));
+
+ UIFormSelectBox typeSelector = new UIFormSelectBox(TYPE_SELECTOR, null, options);
+ typeSelector.setOnChange("SelectType");
+ addUIFormInput(typeSelector);
+ addUIFormInput(new UIFormStringInput(FIELD_URL, FIELD_URL,
pref.getValue("url",
+ "http://www.google.com/ig/modules/horoscope.xml")));
+ UIFormSelectBox gadgetSelector =
+ new UIFormSelectBox(GADGET_SELECTOR, null, new
ArrayList<SelectItemOption<String>>());
+ gadgetSelector.setRendered(false);
+ gadgetSelector.addValidator(MandatoryValidator.class);
+ addUIFormInput(gadgetSelector);
+ setActions(new String[]{"Save"});
+ }
+
+ public static class SaveActionListener extends EventListener<UIGadgetEditMode>
+ {
+ public void execute(final Event<UIGadgetEditMode> event) throws Exception
+ {
+ UIGadgetEditMode uiGadgetEditMode = event.getSource();
+ PortletRequestContext pcontext =
(PortletRequestContext)WebuiRequestContext.getCurrentInstance();
+ String url = uiGadgetEditMode.getUIStringInput(FIELD_URL).getValue();
+ UIGadgetPortlet uiPortlet = uiGadgetEditMode.getParent();
+ UIFormSelectBox typeSelector =
uiGadgetEditMode.getUIFormSelectBox(TYPE_SELECTOR);
+ org.exoplatform.webui.core.UIApplication uiApplication =
pcontext.getUIApplication();
+ UIPortalApplication portalApp = Util.getUIPortalApplication();
+
+ if (typeSelector.getValue().equals(REMOTE_TYPE))
+ {
+ String label = uiGadgetEditMode.getLabel(FIELD_URL);
+ if (label.charAt(label.length() - 1) == ':')
+ label = label.substring(0, label.length() - 1);
+ Object[] args = {label};
+
+ if (url == null || url.length() == 0)
+ {
+
uiGadgetEditMode.getUIStringInput(FIELD_URL).setValue(uiPortlet.getUrl());
+ uiApplication.addMessage(new
ApplicationMessage("EmptyFieldValidator.msg.empty-input", args,
+ ApplicationMessage.WARNING));
+ return;
+ }
+ url = url.trim();
+ if (!url.matches(URLValidator.URL_REGEX))
+ {
+
uiGadgetEditMode.getUIStringInput(FIELD_URL).setValue(uiPortlet.getUrl());
+ uiApplication.addMessage(new
ApplicationMessage("URLValidator.msg.invalid-url", args,
+ ApplicationMessage.WARNING));
+ return;
+ }
+ try
+ {
+ PortletPreferences pref = pcontext.getRequest().getPreferences();
+ new URL(url);
+ pref.setValue("url", url);
+ pref.store();
+ uiGadgetEditMode.getUIStringInput(FIELD_URL).setValue(url);
+ if (portalApp.getModeState() == UIPortalApplication.NORMAL_MODE)
+ pcontext.setApplicationMode(PortletMode.VIEW);
+ }
+ catch (Exception e)
+ {
+
uiGadgetEditMode.getUIStringInput(FIELD_URL).setValue(uiPortlet.getUrl());
+ }
+ }
+ else
+ {
+ UIFormSelectBox gadgetSelector =
uiGadgetEditMode.getUIFormSelectBox(GADGET_SELECTOR);
+ String gadgetId = gadgetSelector.getValue();
+
+ ApplicationRegistryService service =
uiPortlet.getApplicationComponent(ApplicationRegistryService.class);
+ Application application = service.getApplication(gadgetId);
+ if (application == null)
+ {
+ return;
+ }
+ UIGadget uiGadget = event.getSource().createUIComponent(pcontext,
UIGadget.class, null, null);
+ uiGadget.setState(new
TransientApplicationState<Gadget>(application.getApplicationName()));
+ PortletPreferences pref = pcontext.getRequest().getPreferences();
+ pref.setValue("url", uiGadget.getUrl());
+ pref.store();
+ uiGadgetEditMode.getUIStringInput(FIELD_URL).setValue(uiGadget.getUrl());
+
+ if (portalApp.getModeState() == UIPortalApplication.NORMAL_MODE)
+ pcontext.setApplicationMode(PortletMode.VIEW);
+ pcontext.addUIComponentToUpdateByAjax(uiPortlet);
+ }
+ }
+ }
+
+ static public class SelectTypeActionListener extends
EventListener<UIGadgetEditMode>
+ {
+ public void execute(final Event<UIGadgetEditMode> event) throws Exception
+ {
+ UIGadgetEditMode uiGadgetEdit = event.getSource();
+ UIFormSelectBox typeSelector = uiGadgetEdit.getUIFormSelectBox(TYPE_SELECTOR);
+ String selectedValue = typeSelector.getValue();
+ UIFormStringInput urlInput = uiGadgetEdit.getUIStringInput(FIELD_URL);
+ UIFormSelectBox gadgetSelector =
uiGadgetEdit.getUIFormSelectBox(GADGET_SELECTOR);
+ if (selectedValue.equals(REMOTE_TYPE))
+ {
+ urlInput.setRendered(true);
+ gadgetSelector.setRendered(false);
+ }
+ else
+ {
+ urlInput.setRendered(false);
+ gadgetSelector.setRendered(true);
+ List<SelectItemOption<String>> gadgetItems =
gadgetSelector.getOptions();
+ gadgetItems.clear();
+
+ ApplicationRegistryService service =
uiGadgetEdit.getApplicationComponent(ApplicationRegistryService.class);
+ UserACL acl = uiGadgetEdit.getApplicationComponent(UserACL.class);
+ List<Application> appList = service.getAllApplications();
+ for (Application app : appList)
+ {
+ if (app.getType().equals(ApplicationType.GADGET))
+ {
+ for (String per : app.getAccessPermissions())
+ {
+ if (acl.hasPermission(per))
+ {
+ gadgetItems.add(new
SelectItemOption<String>(app.getDisplayName(), app.getId()));
+ break;
+ }
+ }
+ }
+ }
+ }
+ event.getRequestContext().addUIComponentToUpdateByAjax(uiGadgetEdit);
+ }
+ }
+}
Modified:
portal/branches/wsrp-integration/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetPortlet.java
===================================================================
---
portal/branches/wsrp-integration/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetPortlet.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetPortlet.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -41,7 +41,8 @@
{
public UIGadgetPortlet() throws Exception
{
- addChild(UIGadgetViewMode.class, null, null);
+ addChild(UIGadgetViewMode.class, null, null);
+ addChild(UIGadgetEditMode.class, null, null);
}
public String getUrl()
Modified:
portal/branches/wsrp-integration/portlet/dashboard/src/main/webapp/WEB-INF/portlet.xml
===================================================================
---
portal/branches/wsrp-integration/portlet/dashboard/src/main/webapp/WEB-INF/portlet.xml 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/portlet/dashboard/src/main/webapp/WEB-INF/portlet.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -75,6 +75,7 @@
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
+ <portlet-mode>edit</portlet-mode>
</supports>
<supported-locale>en</supported-locale>
<resource-bundle>locale.portlet.gadget.GadgetPortlet</resource-bundle>
Modified:
portal/branches/wsrp-integration/portlet/dashboard/src/main/webapp/groovy/dashboard/webui/component/UITabPaneDashboard.gtmpl
===================================================================
---
portal/branches/wsrp-integration/portlet/dashboard/src/main/webapp/groovy/dashboard/webui/component/UITabPaneDashboard.gtmpl 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/portlet/dashboard/src/main/webapp/groovy/dashboard/webui/component/UITabPaneDashboard.gtmpl 2009-11-26
15:54:09 UTC (rev 818)
@@ -7,9 +7,8 @@
import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.web.application.JavascriptManager;
- //PageNavigation pageNavigation = uicomponent.getPageNavigation();
- //ArrayList<PageNode> nodes = pageNavigation.getNodes();
- ArrayList<PageNode> nodes = uicomponent.getSameSiblingsNode();
+ PageNavigation pageNavigation = uicomponent.getPageNavigation();
+ ArrayList<PageNode> nodes = pageNavigation.getNodes();
def tabNbs = nodes.size();
PortalRequestContext pcontext = Util.getPortalRequestContext();
@@ -57,7 +56,7 @@
<div class="LeftTab">
<div class="RightTab">
<div class="MiddleTab">
- <a href="<%= portalURI + node.getUri();
%>"><span>$tabLabel</span></a>
+ <a href="<%= portalURI + node.getName();
%>"><span>$tabLabel</span></a>
<a href="<%= uicomponent.url("DeleteTab",param);
%>">
<img class="CloseIcon"
src="/eXoResources/skin/sharedImages/Blank.gif" alt="DEL" />
</a>
Modified:
portal/branches/wsrp-integration/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetPortlet.gtmpl
===================================================================
---
portal/branches/wsrp-integration/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetPortlet.gtmpl 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetPortlet.gtmpl 2009-11-26
15:54:09 UTC (rev 818)
@@ -1,5 +1,6 @@
<% import javax.portlet.PortletMode ;
- import org.exoplatform.gadget.webui.component.UIGadgetViewMode;
+ import org.exoplatform.gadget.webui.component.UIGadgetViewMode ;
+ import org.exoplatform.gadget.webui.component.UIGadgetEditMode ;
def rcontext = _ctx.getRequestContext() ;
def popupMsgs = uicomponent.getUIPopupMessages();
%>
@@ -7,6 +8,8 @@
<%
if( rcontext.getApplicationMode() == PortletMode.VIEW ) {
uicomponent.renderChild(UIGadgetViewMode.class) ;
+ } else {
+ uicomponent.renderChild(UIGadgetEditMode.class);
}
if(popupMsgs != null) popupMsgs.processRender(rcontext); %>
Modified:
portal/branches/wsrp-integration/portlet/dashboard/src/main/webapp/skin/gadget/webui/component/UIGadgetPortlet/DefaultStylesheet.css
===================================================================
---
portal/branches/wsrp-integration/portlet/dashboard/src/main/webapp/skin/gadget/webui/component/UIGadgetPortlet/DefaultStylesheet.css 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/portlet/dashboard/src/main/webapp/skin/gadget/webui/component/UIGadgetPortlet/DefaultStylesheet.css 2009-11-26
15:54:09 UTC (rev 818)
@@ -21,7 +21,9 @@
padding: 1px;
height: 100%;
}
-
+.UIGadgetPortlet .UIGadgetEditMode{
+ padding: 50px 0;
+}
.UIGadgetPortlet .UIGadgetViewMode {
height: 100%;
}
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIRegisterForm.java
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIRegisterForm.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIRegisterForm.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -19,6 +19,9 @@
package org.exoplatform.account.webui.component;
+import java.util.ArrayList;
+import java.util.List;
+
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.services.organization.UserHandler;
import org.exoplatform.web.application.ApplicationMessage;
@@ -28,15 +31,12 @@
import org.exoplatform.webui.core.UIApplication;
import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
import org.exoplatform.webui.event.Event;
-import org.exoplatform.webui.event.Event.Phase;
import org.exoplatform.webui.event.EventListener;
+import org.exoplatform.webui.event.Event.Phase;
import org.exoplatform.webui.form.UIForm;
import org.exoplatform.webui.form.UIFormInputWithActions;
import org.exoplatform.webui.form.UIFormInputWithActions.ActionData;
-import java.util.ArrayList;
-import java.util.List;
-
/**
*
* @author <a href="mailto:hoang281283@gmail.com">Minh Hoang
TO</a>
@@ -75,10 +75,6 @@
setActions(ACTIONS);
}
- private void resetInput(){
- getChild(UIRegisterInputSet.class).reset();
- }
-
static public class SubscribeActionListener extends
EventListener<UIRegisterForm>{
@Override
public void execute(Event<UIRegisterForm> event) throws Exception {
@@ -90,8 +86,6 @@
if(registerInput.save(userHandler, context)){
//TODO: Send email and add Account Activating feature
- UIApplication uiApp = context.getUIApplication();
- uiApp.addMessage(new
ApplicationMessage("UIRegisterForm.registerWithSuccess.message", null));
}
}
}
@@ -135,7 +129,7 @@
{
// TODO Auto-generated method stub
UIRegisterForm registerForm = event.getSource();
- registerForm.resetInput();
+ registerForm.reset();
}
}
}
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -37,9 +37,10 @@
import org.exoplatform.webui.event.EventListener;
import org.exoplatform.webui.event.MonitorEvent;
-import javax.portlet.PortletPreferences;
import java.util.List;
+import javax.portlet.PortletPreferences;
+
/** Created by The eXo Platform SAS Author : Pham Thanh Tung thanhtungty(a)gmail.com Jun
24, 2008 */
@ComponentConfig(template =
"app:/groovy/applicationregistry/webui/component/UIApplicationOrganizer.gtmpl",
events = {
@EventConfig(listeners = UIApplicationOrganizer.ShowCategoryActionListener.class),
@@ -238,7 +239,6 @@
{
UIApplicationOrganizer uiOrganizer = event.getSource();
ApplicationRegistryService service =
uiOrganizer.getApplicationComponent(ApplicationRegistryService.class);
-
service.importAllPortlets();
service.importExoGadgets();
uiOrganizer.reload();
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetInfo.java
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetInfo.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetInfo.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -65,7 +65,8 @@
public UIGadgetInfo() throws Exception
{
- addChild(UICategorySelector.class, null, null);
+ UICategorySelector categorySelector = addChild(UICategorySelector.class, null,
null);
+ categorySelector.setRendered(false);
}
public Gadget getGadget()
@@ -98,7 +99,8 @@
for (ApplicationCategory category : allCategories)
{
- if (appRegService.getApplication(category.getName(), gadget_.getName()) !=
null)
+ String definitionName = gadget_.getTitle().replace(' ', '_');
+ if (appRegService.getApplication(category.getName(), definitionName) != null)
{
nameList.add(category.getDisplayName());
}
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetManagement.java
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetManagement.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetManagement.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -128,7 +128,6 @@
uiGadgetInfo = addChild(UIGadgetInfo.class, null, null);
}
uiGadgetInfo.setGadget(selectedGadget_);
- uiGadgetInfo.getChild(UICategorySelector.class).setRendered(false);
}
public void processRender(WebuiRequestContext context) throws Exception
Deleted:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/RegisterPortlet_en.properties
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/RegisterPortlet_en.properties 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/WEB-INF/classes/locale/portlet/exoadmin/RegisterPortlet_en.properties 2009-11-26
15:54:09 UTC (rev 818)
@@ -1,21 +0,0 @@
-#
-# Copyright (C) 2009 eXo Platform SAS.
-#
-# This is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of
-# the License, or (at your option) any later version.
-#
-# This software is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this software; if not, write to the Free
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-# 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-#
-
-UIRegisterForm.registerWithSuccess.message=You have successfully registered a new
account!
-UIRegisterForm.title=Register New Account
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -97,7 +97,7 @@
</supports>
<supported-locale>en</supported-locale>
-
<resource-bundle>locale.portlet.exoadmin.RegisterPortlet</resource-bundle>
+
<!--<resource-bundle>locale.portlet.exoadmin.RegisterPortlet</resource-bundle>-->
<portlet-info>
<title>Register Portlet</title>
<short-title>Register Portlet</short-title>
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component/DefaultStylesheet.css
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component/DefaultStylesheet.css 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component/DefaultStylesheet.css 2009-11-26
15:54:09 UTC (rev 818)
@@ -24,7 +24,7 @@
}
.UIManagement .ManagementBlock {
- background: #f8f8f8 url('background/BgEvenRow.gif') repeat-x left top;
+ background: url('background/BgEvenRow.gif') repeat-x left top;
margin-bottom: 1px;
}
@@ -52,11 +52,11 @@
}
.UIPortalNavigationPortlet .UIManagement table.ManagementBlock td.Content {
- width: 20%;
+ width: 23%;
}
.UIPortalNavigationPortlet .UIManagement table.ManagementBlock td.ActionBlock {
- width: 68%;
+ width: 65%;
}
.UIManagement table.ManagementBlock td.Content strong {
Deleted:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component/background/BgEvenRow.gif
===================================================================
(Binary files differ)
Deleted:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component/background/BgOddRow.gif
===================================================================
(Binary files differ)
Deleted:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component/background/Button.gif
===================================================================
(Binary files differ)
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component/background/GroupImage.png
===================================================================
(Binary files differ)
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component/background/LineBg.gif
===================================================================
(Binary files differ)
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/navigation/webui/component/background/MiniIcon.gif
===================================================================
(Binary files differ)
Modified:
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/register/webui/component/DefaultStylesheet.css
===================================================================
---
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/register/webui/component/DefaultStylesheet.css 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/portlet/exoadmin/src/main/webapp/skin/register/webui/component/DefaultStylesheet.css 2009-11-26
15:54:09 UTC (rev 818)
@@ -16,7 +16,3 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-
-.UIRegisterPortlet {
- padding: 30px 0;
-}
\ No newline at end of file
Modified:
portal/branches/wsrp-integration/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UILogoEditMode.java
===================================================================
---
portal/branches/wsrp-integration/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UILogoEditMode.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UILogoEditMode.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -19,6 +19,9 @@
package org.exoplatform.portal.webui.component;
+import javax.portlet.PortletMode;
+import javax.portlet.PortletPreferences;
+
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
import org.exoplatform.web.application.ApplicationMessage;
@@ -32,11 +35,9 @@
import org.exoplatform.webui.exception.MessageException;
import org.exoplatform.webui.form.UIForm;
import org.exoplatform.webui.form.UIFormStringInput;
+import org.exoplatform.webui.form.validator.MandatoryValidator;
import org.exoplatform.webui.form.validator.URLValidator;
-import javax.portlet.PortletMode;
-import javax.portlet.PortletPreferences;
-
/** Created by The eXo Platform SAS Author : eXoPlatform October 2, 2009 */
@ComponentConfig(lifecycle = UIFormLifecycle.class, template =
"system:/groovy/webui/form/UIFormWithTitle.gtmpl", events =
{@EventConfig(listeners = UILogoEditMode.SaveActionListener.class)})
public class UILogoEditMode extends UIForm
@@ -48,7 +49,8 @@
{
PortletRequestContext pcontext =
(PortletRequestContext)WebuiRequestContext.getCurrentInstance();
PortletPreferences pref = pcontext.getRequest().getPreferences();
- addUIFormInput(new UIFormStringInput(FIELD_URL, FIELD_URL,
pref.getValue("url", "")));
+ addUIFormInput(new UIFormStringInput(FIELD_URL, FIELD_URL,
pref.getValue("url", ""))
+ .addValidator(MandatoryValidator.class));
}
static public class SaveActionListener extends EventListener<UILogoEditMode>
@@ -57,7 +59,7 @@
{
UILogoEditMode uiForm = event.getSource();
String url = uiForm.getUIStringInput(FIELD_URL).getValue();
- if ((url == null || url.trim().length() == 0) ||
(!url.trim().matches(URLValidator.URL_REGEX)))
+ if (url != null && !url.trim().matches(URLValidator.URL_REGEX))
{
UILogoPortlet uiPortlet = uiForm.getParent();
uiForm.getUIStringInput(FIELD_URL).setValue(uiPortlet.getURL());
Copied: portal/branches/wsrp-integration/server/jboss/patch (from rev 804,
portal/branches/wsrp-integration/server/jboss/patch)
Property changes on: portal/branches/wsrp-integration/server/jboss/patch
___________________________________________________________________
Name: svn:ignore
+ *.iml
.idea
target
Deleted: portal/branches/wsrp-integration/server/jboss/patch/pom.xml
===================================================================
--- portal/branches/wsrp-integration/server/jboss/patch/pom.xml 2009-11-25 21:32:49 UTC
(rev 804)
+++ portal/branches/wsrp-integration/server/jboss/patch/pom.xml 2009-11-26 15:54:09 UTC
(rev 818)
@@ -1,44 +0,0 @@
-<!--
-
- Copyright (C) 2009 eXo Platform SAS.
-
- This is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of
- the License, or (at your option) any later version.
-
- This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this software; if not, write to the Free
- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-
--->
-
-<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.exoplatform.portal</groupId>
- <artifactId>exo.portal.server.jboss</artifactId>
- <version>3.0.0-Beta03-SNAPSHOT</version>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <artifactId>exo.portal.server.jboss.patch</artifactId>
- <packaging>jar</packaging>
- <name>GateIn Portal Server JBoss Patch</name>
-
- <build>
- <resources>
- <resource>
- <directory>src/main/jboss</directory>
- <includes>
- <include>**/*</include>
- </includes>
- </resource>
- </resources>
- </build>
-</project>
Copied: portal/branches/wsrp-integration/server/jboss/patch/pom.xml (from rev 804,
portal/branches/wsrp-integration/server/jboss/patch/pom.xml)
===================================================================
--- portal/branches/wsrp-integration/server/jboss/patch/pom.xml
(rev 0)
+++ portal/branches/wsrp-integration/server/jboss/patch/pom.xml 2009-11-26 15:54:09 UTC
(rev 818)
@@ -0,0 +1,44 @@
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.server.jboss</artifactId>
+ <version>3.0.0-Beta03-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>exo.portal.server.jboss.patch</artifactId>
+ <packaging>jar</packaging>
+ <name>GateIn Portal Server JBoss Patch</name>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/jboss</directory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ </resources>
+ </build>
+</project>
Copied: portal/branches/wsrp-integration/server/jboss/patch/src (from rev 804,
portal/branches/wsrp-integration/server/jboss/patch/src)
Property changes on: portal/branches/wsrp-integration/server/jboss/patch/src
___________________________________________________________________
Name: svn:ignore
+ *.iml
.idea
Copied: portal/branches/wsrp-integration/server/jboss/patch/src/main (from rev 804,
portal/branches/wsrp-integration/server/jboss/patch/src/main)
Property changes on: portal/branches/wsrp-integration/server/jboss/patch/src/main
___________________________________________________________________
Name: svn:ignore
+ *.iml
.idea
Copied: portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss (from rev 804,
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss)
Property changes on: portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss
___________________________________________________________________
Name: svn:ignore
+ *.iml
.idea
Copied: portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server (from
rev 804, portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server)
Property changes on:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server
___________________________________________________________________
Name: svn:ignore
+ *.iml
.idea
Copied: portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default
(from rev 804,
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default)
Property changes on:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default
___________________________________________________________________
Name: svn:ignore
+ *.iml
.idea
Copied:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/conf
(from rev 804,
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/conf)
Property changes on:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/conf
___________________________________________________________________
Name: svn:ignore
+ *.iml
.idea
Deleted:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/conf/jboss-log4j.xml
===================================================================
---
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/conf/jboss-log4j.xml 2009-11-25
21:32:49 UTC (rev 804)
+++
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/conf/jboss-log4j.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -1,328 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (C) 2009 eXo Platform SAS.
-
- This is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of
- the License, or (at your option) any later version.
-
- This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this software; if not, write to the Free
- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-
--->
-
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<!-- ===================================================================== -->
-<!-- -->
-<!-- Log4j Configuration -->
-<!-- -->
-<!-- ===================================================================== -->
-
-<!-- $Id: jboss-log4j.xml 62403 2007-04-18 15:26:43Z dimitris(a)jboss.org $ -->
-
-<!--
- | For more configuration infromation and examples see the Jakarta Log4j
- | owebsite:
http://jakarta.apache.org/log4j
- -->
-
-<log4j:configuration
xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="false">
-
- <!-- ================================= -->
- <!-- Preserve messages in a local file -->
- <!-- ================================= -->
-
- <!-- A time/date based rolling appender -->
- <appender name="FILE"
class="org.jboss.logging.appender.DailyRollingFileAppender">
- <errorHandler
class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="File"
value="${jboss.server.log.dir}/server.log"/>
- <param name="Append" value="false"/>
-
- <!-- Rollover at midnight each day -->
- <param name="DatePattern"
value="'.'yyyy-MM-dd"/>
-
- <!-- Rollover at the top of each hour
- <param name="DatePattern"
value="'.'yyyy-MM-dd-HH"/>
- -->
-
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] Message\n -->
- <param name="ConversionPattern" value="%d %-5p [%c]
%m%n"/>
-
- <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
- <param name="ConversionPattern" value="%d %-5r %-5p [%c]
(%t:%x) %m%n"/>
- -->
- </layout>
- </appender>
-
- <!-- A size based file rolling appender
- <appender name="FILE"
class="org.jboss.logging.appender.RollingFileAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="File"
value="${jboss.server.log.dir}/server.log"/>
- <param name="Append" value="false"/>
- <param name="MaxFileSize" value="500KB"/>
- <param name="MaxBackupIndex" value="1"/>
-
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%d %-5p [%c]
%m%n"/>
- </layout>
- </appender>
- -->
-
- <!-- ============================== -->
- <!-- Append messages to the console -->
- <!-- ============================== -->
-
- <appender name="CONSOLE"
class="org.apache.log4j.ConsoleAppender">
- <errorHandler
class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="Target" value="System.out"/>
- <param name="Threshold" value="INFO"/>
-
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] Message\n -->
- <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p
[%c{1}] %m%n"/>
- </layout>
- </appender>
-
- <!-- ====================== -->
- <!-- More Appender examples -->
- <!-- ====================== -->
-
- <!-- Buffer events and log them asynchronously
- <appender name="ASYNC"
class="org.apache.log4j.AsyncAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <appender-ref ref="FILE"/>
- <appender-ref ref="CONSOLE"/>
- <appender-ref ref="SMTP"/>
- </appender>
- -->
-
- <!-- EMail events to an administrator
- <appender name="SMTP"
class="org.apache.log4j.net.SMTPAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="Threshold" value="ERROR"/>
- <param name="To" value="admin(a)myhost.domain.com"/>
- <param name="From" value="nobody(a)myhost.domain.com"/>
- <param name="Subject" value="JBoss Sever Errors"/>
- <param name="SMTPHost" value="localhost"/>
- <param name="BufferSize" value="10"/>
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}]
%m%n"/>
- </layout>
- </appender>
- -->
-
- <!-- Syslog events
- <appender name="SYSLOG"
class="org.apache.log4j.net.SyslogAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="Facility" value="LOCAL7"/>
- <param name="FacilityPrinting" value="true"/>
- <param name="SyslogHost" value="localhost"/>
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}]
%m%n"/>
- </layout>
- </appender>
- -->
-
- <!-- Log events to JMS (requires a topic to be created)
- <appender name="JMS"
class="org.apache.log4j.net.JMSAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="Threshold" value="ERROR"/>
- <param name="TopicConnectionFactoryBindingName"
value="java:/ConnectionFactory"/>
- <param name="TopicBindingName"
value="topic/MyErrorsTopic"/>
- </appender>
- -->
-
- <!-- Log events through SNMP
- <appender name="TRAP_LOG"
class="org.apache.log4j.ext.SNMPTrapAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="ImplementationClassName"
value="org.apache.log4j.ext.JoeSNMPTrapSender"/>
- <param name="ManagementHost" value="127.0.0.1"/>
- <param name="ManagementHostTrapListenPort" value="162"/>
- <param name="EnterpriseOID" value="1.3.6.1.4.1.24.0"/>
- <param name="LocalIPAddress" value="127.0.0.1"/>
- <param name="LocalTrapSendPort" value="161"/>
- <param name="GenericTrapType" value="6"/>
- <param name="SpecificTrapType" value="12345678"/>
- <param name="CommunityString" value="public"/>
- <param name="ForwardStackTraceWithTrap" value="true"/>
- <param name="Threshold" value="DEBUG"/>
- <param name="ApplicationTrapOID"
value="1.3.6.1.4.1.24.12.10.22.64"/>
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern"
value="%d,%p,[%t],[%c],%m%n"/>
- </layout>
- </appender>
- -->
-
- <!-- Emit events as JMX notifications
- <appender name="JMX"
class="org.jboss.monitor.services.JMXNotificationAppender">
- <errorHandler
class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
-
- <param name="Threshold" value="WARN"/>
- <param name="ObjectName"
value="jboss.system:service=Logging,type=JMXNotificationAppender"/>
-
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%d %-5p [%c]
%m"/>
- </layout>
- </appender>
- -->
-
- <!-- ================ -->
- <!-- Limit categories -->
- <!-- ================ -->
-
- <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
- <category name="org.apache">
- <priority value="INFO"/>
- </category>
-
- <!-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is
verbose -->
- <category name="org.jboss.serial">
- <priority value="INFO"/>
- </category>
-
- <!-- Limit the org.jgroups category to WARN as its INFO is verbose -->
- <category name="org.jgroups">
- <priority value="WARN"/>
- </category>
-
- <!-- Limit the jacorb category to WARN as its INFO is verbose -->
- <category name="jacorb">
- <priority value="WARN"/>
- </category>
-
- <!-- Limit JBoss categories
- <category name="org.jboss">
- <priority value="INFO"/>
- </category>
- -->
-
- <!-- Limit the JSR77 categories -->
- <category name="org.jboss.management">
- <priority value="INFO"/>
- </category>
-
- <!-- Limit the JSR77 categories -->
- <category name="jcr">
- <priority value="INFO"/>
- </category>
-
- <!-- Limit the JSR-168 and JSR-286 categories -->
- <category name="org.exoplatform.services">
- <priority value="INFO"/>
- </category>
-
- <!-- Enable JBossWS message tracing
- <category name="jbossws.SOAPMessage">
- <priority value="TRACE"/>
- </category>
- -->
-
- <!-- Decrease the priority threshold for the org.jboss.varia category
- <category name="org.jboss.varia">
- <priority value="DEBUG"/>
- </category>
- -->
-
- <!-- Show the evolution of the DataSource pool in the logs [inUse/Available/Max]
- <category
name="org.jboss.resource.connectionmanager.JBossManagedConnectionPool">
- <priority value="TRACE"/>
- </category>
- -->
-
- <!--
- | An example of enabling the custom TRACE level priority that is used
- | by the JBoss internals to diagnose low level details. This example
- | turns on TRACE level msgs for the org.jboss.ejb.plugins package and its
- | subpackages. This will produce A LOT of logging output.
- |
- | Note: since jboss AS 4.2.x, the trace level is supported natively by
- | log4j, so although the custom org.jboss.logging.XLevel priority will
- | still work, there is no need to use it. The two examples that follow
- | will both enable trace logging.
- <category name="org.jboss.system">
- <priority value="TRACE"
class="org.jboss.logging.XLevel"/>
- </category>
- <category name="org.jboss.ejb.plugins">
- <priority value="TRACE"/>
- </category>
- -->
-
- <!--
- | Logs these events to SNMP:
- - server starts/stops
- - cluster evolution (node death/startup)
- - When an EJB archive is deployed (and associated verified messages)
- - When an EAR archive is deployed
-
- <category name="org.jboss.system.server.Server">
- <priority value="INFO" />
- <appender-ref ref="TRAP_LOG"/>
- </category>
-
- <category
name="org.jboss.ha.framework.interfaces.HAPartition.lifecycle">
- <priority value="INFO" />
- <appender-ref ref="TRAP_LOG"/>
- </category>
-
- <category name="org.jboss.deployment.MainDeployer">
- <priority value="ERROR" />
- <appender-ref ref="TRAP_LOG"/>
- </category>
-
- <category name="org.jboss.ejb.EJBDeployer">
- <priority value="INFO" />
- <appender-ref ref="TRAP_LOG"/>
- </category>
-
- <category name="org.jboss.deployment.EARDeployer">
- <priority value="INFO" />
- <appender-ref ref="TRAP_LOG"/>
- </category>
-
- -->
-
- <!-- ======================= -->
- <!-- Setup the Root category -->
- <!-- ======================= -->
-
- <root>
- <appender-ref ref="CONSOLE"/>
- <appender-ref ref="FILE"/>
- </root>
-
- <!-- Clustering logging -->
- <!-- Uncomment the following to redirect the org.jgroups and
- org.jboss.ha categories to a cluster.log file.
-
- <appender name="CLUSTER"
class="org.jboss.logging.appender.RollingFileAppender">
- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
- <param name="File"
value="${jboss.server.log.dir}/cluster.log"/>
- <param name="Append" value="false"/>
- <param name="MaxFileSize" value="500KB"/>
- <param name="MaxBackupIndex" value="1"/>
-
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%d %-5p [%c]
%m%n"/>
- </layout>
- </appender>
- <category name="org.jgroups">
- <priority value="DEBUG" />
- <appender-ref ref="CLUSTER"/>
- </category>
- <category name="org.jboss.ha">
- <priority value="DEBUG" />
- <appender-ref ref="CLUSTER"/>
- </category>
- -->
-
-</log4j:configuration>
Copied:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/conf/jboss-log4j.xml
(from rev 804,
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/conf/jboss-log4j.xml)
===================================================================
---
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/conf/jboss-log4j.xml
(rev 0)
+++
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/conf/jboss-log4j.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -0,0 +1,328 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: jboss-log4j.xml 62403 2007-04-18 15:26:43Z dimitris(a)jboss.org $ -->
+
+<!--
+ | For more configuration infromation and examples see the Jakarta Log4j
+ | owebsite:
http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration
xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="false">
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A time/date based rolling appender -->
+ <appender name="FILE"
class="org.jboss.logging.appender.DailyRollingFileAppender">
+ <errorHandler
class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="File"
value="${jboss.server.log.dir}/server.log"/>
+ <param name="Append" value="false"/>
+
+ <!-- Rollover at midnight each day -->
+ <param name="DatePattern"
value="'.'yyyy-MM-dd"/>
+
+ <!-- Rollover at the top of each hour
+ <param name="DatePattern"
value="'.'yyyy-MM-dd-HH"/>
+ -->
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d %-5p [%c]
%m%n"/>
+
+ <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
+ <param name="ConversionPattern" value="%d %-5r %-5p [%c]
(%t:%x) %m%n"/>
+ -->
+ </layout>
+ </appender>
+
+ <!-- A size based file rolling appender
+ <appender name="FILE"
class="org.jboss.logging.appender.RollingFileAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="File"
value="${jboss.server.log.dir}/server.log"/>
+ <param name="Append" value="false"/>
+ <param name="MaxFileSize" value="500KB"/>
+ <param name="MaxBackupIndex" value="1"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%c]
%m%n"/>
+ </layout>
+ </appender>
+ -->
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE"
class="org.apache.log4j.ConsoleAppender">
+ <errorHandler
class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="Target" value="System.out"/>
+ <param name="Threshold" value="INFO"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p
[%c{1}] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ====================== -->
+ <!-- More Appender examples -->
+ <!-- ====================== -->
+
+ <!-- Buffer events and log them asynchronously
+ <appender name="ASYNC"
class="org.apache.log4j.AsyncAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <appender-ref ref="FILE"/>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="SMTP"/>
+ </appender>
+ -->
+
+ <!-- EMail events to an administrator
+ <appender name="SMTP"
class="org.apache.log4j.net.SMTPAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="Threshold" value="ERROR"/>
+ <param name="To" value="admin(a)myhost.domain.com"/>
+ <param name="From" value="nobody(a)myhost.domain.com"/>
+ <param name="Subject" value="JBoss Sever Errors"/>
+ <param name="SMTPHost" value="localhost"/>
+ <param name="BufferSize" value="10"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}]
%m%n"/>
+ </layout>
+ </appender>
+ -->
+
+ <!-- Syslog events
+ <appender name="SYSLOG"
class="org.apache.log4j.net.SyslogAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="Facility" value="LOCAL7"/>
+ <param name="FacilityPrinting" value="true"/>
+ <param name="SyslogHost" value="localhost"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}]
%m%n"/>
+ </layout>
+ </appender>
+ -->
+
+ <!-- Log events to JMS (requires a topic to be created)
+ <appender name="JMS"
class="org.apache.log4j.net.JMSAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="Threshold" value="ERROR"/>
+ <param name="TopicConnectionFactoryBindingName"
value="java:/ConnectionFactory"/>
+ <param name="TopicBindingName"
value="topic/MyErrorsTopic"/>
+ </appender>
+ -->
+
+ <!-- Log events through SNMP
+ <appender name="TRAP_LOG"
class="org.apache.log4j.ext.SNMPTrapAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="ImplementationClassName"
value="org.apache.log4j.ext.JoeSNMPTrapSender"/>
+ <param name="ManagementHost" value="127.0.0.1"/>
+ <param name="ManagementHostTrapListenPort" value="162"/>
+ <param name="EnterpriseOID" value="1.3.6.1.4.1.24.0"/>
+ <param name="LocalIPAddress" value="127.0.0.1"/>
+ <param name="LocalTrapSendPort" value="161"/>
+ <param name="GenericTrapType" value="6"/>
+ <param name="SpecificTrapType" value="12345678"/>
+ <param name="CommunityString" value="public"/>
+ <param name="ForwardStackTraceWithTrap" value="true"/>
+ <param name="Threshold" value="DEBUG"/>
+ <param name="ApplicationTrapOID"
value="1.3.6.1.4.1.24.12.10.22.64"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern"
value="%d,%p,[%t],[%c],%m%n"/>
+ </layout>
+ </appender>
+ -->
+
+ <!-- Emit events as JMX notifications
+ <appender name="JMX"
class="org.jboss.monitor.services.JMXNotificationAppender">
+ <errorHandler
class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+
+ <param name="Threshold" value="WARN"/>
+ <param name="ObjectName"
value="jboss.system:service=Logging,type=JMXNotificationAppender"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%c]
%m"/>
+ </layout>
+ </appender>
+ -->
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
+ <category name="org.apache">
+ <priority value="INFO"/>
+ </category>
+
+ <!-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is
verbose -->
+ <category name="org.jboss.serial">
+ <priority value="INFO"/>
+ </category>
+
+ <!-- Limit the org.jgroups category to WARN as its INFO is verbose -->
+ <category name="org.jgroups">
+ <priority value="WARN"/>
+ </category>
+
+ <!-- Limit the jacorb category to WARN as its INFO is verbose -->
+ <category name="jacorb">
+ <priority value="WARN"/>
+ </category>
+
+ <!-- Limit JBoss categories
+ <category name="org.jboss">
+ <priority value="INFO"/>
+ </category>
+ -->
+
+ <!-- Limit the JSR77 categories -->
+ <category name="org.jboss.management">
+ <priority value="INFO"/>
+ </category>
+
+ <!-- Limit the JSR77 categories -->
+ <category name="jcr">
+ <priority value="INFO"/>
+ </category>
+
+ <!-- Limit the JSR-168 and JSR-286 categories -->
+ <category name="org.exoplatform.services">
+ <priority value="INFO"/>
+ </category>
+
+ <!-- Enable JBossWS message tracing
+ <category name="jbossws.SOAPMessage">
+ <priority value="TRACE"/>
+ </category>
+ -->
+
+ <!-- Decrease the priority threshold for the org.jboss.varia category
+ <category name="org.jboss.varia">
+ <priority value="DEBUG"/>
+ </category>
+ -->
+
+ <!-- Show the evolution of the DataSource pool in the logs [inUse/Available/Max]
+ <category
name="org.jboss.resource.connectionmanager.JBossManagedConnectionPool">
+ <priority value="TRACE"/>
+ </category>
+ -->
+
+ <!--
+ | An example of enabling the custom TRACE level priority that is used
+ | by the JBoss internals to diagnose low level details. This example
+ | turns on TRACE level msgs for the org.jboss.ejb.plugins package and its
+ | subpackages. This will produce A LOT of logging output.
+ |
+ | Note: since jboss AS 4.2.x, the trace level is supported natively by
+ | log4j, so although the custom org.jboss.logging.XLevel priority will
+ | still work, there is no need to use it. The two examples that follow
+ | will both enable trace logging.
+ <category name="org.jboss.system">
+ <priority value="TRACE"
class="org.jboss.logging.XLevel"/>
+ </category>
+ <category name="org.jboss.ejb.plugins">
+ <priority value="TRACE"/>
+ </category>
+ -->
+
+ <!--
+ | Logs these events to SNMP:
+ - server starts/stops
+ - cluster evolution (node death/startup)
+ - When an EJB archive is deployed (and associated verified messages)
+ - When an EAR archive is deployed
+
+ <category name="org.jboss.system.server.Server">
+ <priority value="INFO" />
+ <appender-ref ref="TRAP_LOG"/>
+ </category>
+
+ <category
name="org.jboss.ha.framework.interfaces.HAPartition.lifecycle">
+ <priority value="INFO" />
+ <appender-ref ref="TRAP_LOG"/>
+ </category>
+
+ <category name="org.jboss.deployment.MainDeployer">
+ <priority value="ERROR" />
+ <appender-ref ref="TRAP_LOG"/>
+ </category>
+
+ <category name="org.jboss.ejb.EJBDeployer">
+ <priority value="INFO" />
+ <appender-ref ref="TRAP_LOG"/>
+ </category>
+
+ <category name="org.jboss.deployment.EARDeployer">
+ <priority value="INFO" />
+ <appender-ref ref="TRAP_LOG"/>
+ </category>
+
+ -->
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="FILE"/>
+ </root>
+
+ <!-- Clustering logging -->
+ <!-- Uncomment the following to redirect the org.jgroups and
+ org.jboss.ha categories to a cluster.log file.
+
+ <appender name="CLUSTER"
class="org.jboss.logging.appender.RollingFileAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="File"
value="${jboss.server.log.dir}/cluster.log"/>
+ <param name="Append" value="false"/>
+ <param name="MaxFileSize" value="500KB"/>
+ <param name="MaxBackupIndex" value="1"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%c]
%m%n"/>
+ </layout>
+ </appender>
+ <category name="org.jgroups">
+ <priority value="DEBUG" />
+ <appender-ref ref="CLUSTER"/>
+ </category>
+ <category name="org.jboss.ha">
+ <priority value="DEBUG" />
+ <appender-ref ref="CLUSTER"/>
+ </category>
+ -->
+
+</log4j:configuration>
Copied:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy
(from rev 804,
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy)
Property changes on:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy
___________________________________________________________________
Name: svn:ignore
+ *.iml
.idea
Copied:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar
(from rev 804,
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar)
Property changes on:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar
___________________________________________________________________
Name: svn:ignore
+ *.iml
.idea
Copied:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF
(from rev 804,
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF)
Property changes on:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF
___________________________________________________________________
Name: svn:ignore
+ *.iml
.idea
Deleted:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/jboss-app.xml
===================================================================
---
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/jboss-app.xml 2009-11-25
21:32:49 UTC (rev 804)
+++
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/jboss-app.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -1,27 +0,0 @@
-<!--
-
- Copyright (C) 2009 eXo Platform SAS.
-
- This is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of
- the License, or (at your option) any later version.
-
- This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this software; if not, write to the Free
- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-
--->
-
-<jboss-app>
- <loader-repository>
- dot.com:loader=eXoPortal
-
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
- </loader-repository>
-</jboss-app>
Copied:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/jboss-app.xml
(from rev 804,
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/jboss-app.xml)
===================================================================
---
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/jboss-app.xml
(rev 0)
+++
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/jboss-app.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -0,0 +1,27 @@
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+
+<jboss-app>
+ <loader-repository>
+ dot.com:loader=eXoPortal
+
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
+ </loader-repository>
+</jboss-app>
Deleted:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/jboss-service.xml
===================================================================
---
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/jboss-service.xml 2009-11-25
21:32:49 UTC (rev 804)
+++
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/jboss-service.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -1,35 +0,0 @@
-<!--
-
- Copyright (C) 2009 eXo Platform SAS.
-
- This is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of
- the License, or (at your option) any later version.
-
- This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this software; if not, write to the Free
- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-
--->
-
-<server>
- <mbean code="org.jboss.security.auth.login.DynamicLoginConfig"
name="jboss:service=DynamicLoginConfig">
- <attribute
name="AuthConfig">META-INF/login-config.xml</attribute>
- <!-- The service which supports dynamic processing of login-config.xml
- configurations.
- -->
- <depends
optional-attribute-name="LoginConfigService">jboss.security:service=XMLLoginConfig</depends>
- <!-- Optionally specify the security mgr service to use when
- this service is stopped to flush the auth caches of the domains
- registered by this service.
- -->
- <depends
optional-attribute-name="SecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
- </mbean>
-</server>
Copied:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/jboss-service.xml
(from rev 804,
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/jboss-service.xml)
===================================================================
---
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/jboss-service.xml
(rev 0)
+++
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/jboss-service.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -0,0 +1,35 @@
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+
+<server>
+ <mbean code="org.jboss.security.auth.login.DynamicLoginConfig"
name="jboss:service=DynamicLoginConfig">
+ <attribute
name="AuthConfig">META-INF/login-config.xml</attribute>
+ <!-- The service which supports dynamic processing of login-config.xml
+ configurations.
+ -->
+ <depends
optional-attribute-name="LoginConfigService">jboss.security:service=XMLLoginConfig</depends>
+ <!-- Optionally specify the security mgr service to use when
+ this service is stopped to flush the auth caches of the domains
+ registered by this service.
+ -->
+ <depends
optional-attribute-name="SecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
+ </mbean>
+</server>
Deleted:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/login-config.xml
===================================================================
---
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/login-config.xml 2009-11-25
21:32:49 UTC (rev 804)
+++
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/login-config.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -1,31 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Copyright (C) 2009 eXo Platform SAS.
-
- This is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of
- the License, or (at your option) any later version.
-
- This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this software; if not, write to the Free
- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-
--->
-
-<!DOCTYPE policy PUBLIC "-//JBoss//DTD JBOSS Security Config 3.0//EN"
-
"http://www.jboss.org/j2ee/dtd/security_config.dtd">
-<policy>
- <application-policy name="gatein-domain">
- <authentication>
- <login-module
code="org.exoplatform.services.security.j2ee.JbossLoginModule"
flag="required"></login-module>
- </authentication>
- </application-policy>
-</policy>
Copied:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/login-config.xml
(from rev 804,
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/login-config.xml)
===================================================================
---
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/login-config.xml
(rev 0)
+++
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/exoplatform.sar/META-INF/login-config.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -0,0 +1,31 @@
+<?xml version='1.0'?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+
+<!DOCTYPE policy PUBLIC "-//JBoss//DTD JBOSS Security Config 3.0//EN"
+
"http://www.jboss.org/j2ee/dtd/security_config.dtd">
+<policy>
+ <application-policy name="gatein-domain">
+ <authentication>
+ <login-module
code="org.exoplatform.services.security.j2ee.JbossLoginModule"
flag="required"></login-module>
+ </authentication>
+ </application-policy>
+</policy>
Copied:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/jboss-web.deployer
(from rev 804,
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/jboss-web.deployer)
Property changes on:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/jboss-web.deployer
___________________________________________________________________
Name: svn:ignore
+ *.iml
.idea
Deleted:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/jboss-web.deployer/web.xml
===================================================================
---
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/jboss-web.deployer/web.xml 2009-11-25
21:32:49 UTC (rev 804)
+++
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/jboss-web.deployer/web.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -1,1274 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- Copyright (C) 2009 eXo Platform SAS.
-
- This is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of
- the License, or (at your option) any later version.
-
- This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this software; if not, write to the Free
- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-
--->
-
-<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- version="2.4">
-
- <!-- ======================== Introduction ============================== -->
- <!-- This document defines default values for *all* web applications -->
- <!-- loaded into this instance of Tomcat. As each application is -->
- <!-- deployed, this file is processed, followed by the -->
- <!-- "/WEB-INF/web.xml" deployment descriptor from your own
-->
- <!-- applications. -->
- <!-- -->
- <!-- WARNING: Do not configure application-specific resources here! -->
- <!-- They should go in the "/WEB-INF/web.xml" file in your application.
-->
-
- <!-- =========== Common Context Params ================================== -->
- <!-- JBossInjectionProvider provides resource injection for managed beans. -->
- <!-- See JSF 1.2 spec section 5.4 for details. -->
- <context-param>
- <param-name>com.sun.faces.injectionProvider</param-name>
-
<param-value>org.jboss.web.jsf.integration.injection.JBossInjectionProvider</param-value>
- </context-param>
-
- <!-- ================== Common filter Configuration ==================== -->
- <filter>
- <filter-name>CommonHeadersFilter</filter-name>
-
<filter-class>org.jboss.web.tomcat.filters.ReplyHeaderFilter</filter-class>
- <init-param>
- <param-name>X-Powered-By</param-name>
- <param-value>Servlet 2.4; JBoss-4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA
date=200802142215)/Tomcat-5.5</param-value>
- </init-param>
- </filter>
-
- <filter-mapping>
- <filter-name>CommonHeadersFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
- <!-- JBAS-4752: This filter should be enabled when authentication cache -->
- <!-- must be flushed as soon as the http sessions expire. -->
-
- <!--
- <filter>
- <filter-name>PrincipalSessionAttributeFilter</filter-name>
-
<filter-class>org.jboss.web.tomcat.security.PrincipalSessionAttributeFilter</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>PrincipalSessionAttributeFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
- -->
-
- <!-- ================== Common Listener Configuration ==================== -->
- <listener>
-
<listener-class>org.jboss.web.tomcat.security.SecurityFlushSessionListener</listener-class>
- </listener>
-
- <!-- Configures JSF for a web application if the javax.faces.webapp.FacesServlet is
declared -->
- <!-- in web.xml.
-->
- <listener>
-
<listener-class>org.jboss.web.jsf.integration.config.JBossJSFConfigureListener</listener-class>
- </listener>
-
- <!-- Listens to all web app lifecycle events so that @PreDestroy can be called on
-->
- <!-- JSF managed beans that go out of scope. You can comment this out if you
-->
- <!-- don't use JSF or you don't use annotations on your managed beans.
-->
- <listener>
-
<listener-class>com.sun.faces.application.WebappLifecycleListener</listener-class>
- </listener>
-
-
- <!-- ================== Built In Servlet Definitions ==================== -->
-
-
- <!-- The default servlet for all web applications, that serves static -->
- <!-- resources. It processes all requests that are not mapped to other -->
- <!-- servlets with servlet mappings (defined either here or in your own -->
- <!-- web.xml file. This servlet supports the following initialization -->
- <!-- parameters (default values are in square brackets): -->
- <!-- -->
- <!-- debug Debugging detail level for messages logged -->
- <!-- by this servlet. [0] -->
- <!-- -->
- <!-- fileEncoding Encoding to be used to read static resources -->
- <!-- [platform default] -->
- <!-- -->
- <!-- input Input buffer size (in bytes) when reading -->
- <!-- resources to be served. [2048] -->
- <!-- -->
- <!-- listings Should directory listings be produced if there -->
- <!-- is no welcome file in this directory? [false] -->
- <!-- WARNING: Listings for directories with many -->
- <!-- entries can be slow and may consume -->
- <!-- significant proportions of server resources. -->
- <!-- -->
- <!-- output Output buffer size (in bytes) when writing -->
- <!-- resources to be served. [2048] -->
- <!-- -->
- <!-- readonly Is this context "read only", so HTTP
-->
- <!-- commands like PUT and DELETE are -->
- <!-- rejected? [true] -->
- <!-- -->
- <!-- readmeFile File name to display with the directory -->
- <!-- contents. [null] -->
- <!-- -->
- <!-- sendfileSize If the connector used supports sendfile, this -->
- <!-- represents the minimal file size in KB for -->
- <!-- which sendfile will be used. Use a negative -->
- <!-- value to always disable sendfile. [48] -->
- <!-- -->
- <!-- For directory listing customization. Checks localXsltFile, then -->
- <!-- globalXsltFile, then defaults to original behavior. -->
- <!-- -->
- <!-- localXsltFile Make directory listings an XML doc and -->
- <!-- pass the result to this style sheet residing -->
- <!-- in that directory. This overrides -->
- <!-- globalXsltFile[null] -->
- <!-- -->
- <!-- globalXsltFile Site wide configuration version of -->
- <!-- localXsltFile This argument is expected -->
- <!-- to be a physical file. [null] -->
- <!-- -->
- <!-- -->
-
- <servlet>
- <servlet-name>default</servlet-name>
-
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
- <init-param>
- <param-name>debug</param-name>
- <param-value>0</param-value>
- </init-param>
- <init-param>
- <param-name>listings</param-name>
- <param-value>false</param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
-
- <!-- The "invoker" servlet, which executes anonymous servlet classes
-->
- <!-- that have not been defined in a web.xml file. Traditionally, this -->
- <!-- servlet is mapped to the URL pattern "/servlet/*", but you can map
-->
- <!-- it to other patterns as well. The extra path info portion of such a -->
- <!-- request must be the fully qualified class name of a Java class that -->
- <!-- implements Servlet (or extends HttpServlet), or the servlet name -->
- <!-- of an existing servlet definition. This servlet supports the -->
- <!-- following initialization parameters (default values are in square -->
- <!-- brackets): -->
- <!-- -->
- <!-- debug Debugging detail level for messages logged -->
- <!-- by this servlet. [0] -->
-
-<!--
- <servlet>
- <servlet-name>invoker</servlet-name>
- <servlet-class>
- org.apache.catalina.servlets.InvokerServlet
- </servlet-class>
- <init-param>
- <param-name>debug</param-name>
- <param-value>0</param-value>
- </init-param>
- <load-on-startup>2</load-on-startup>
- </servlet>
--->
-
-
- <!-- The JSP page compiler and execution servlet, which is the mechanism -->
- <!-- used by Tomcat to support JSP pages. Traditionally, this servlet -->
- <!-- is mapped to the URL pattern "*.jsp". This servlet supports the
-->
- <!-- following initialization parameters (default values are in square -->
- <!-- brackets): -->
- <!-- -->
- <!-- checkInterval If development is false and checkInterval is -->
- <!-- greater than zero, background compilations are -->
- <!-- enabled. checkInterval is the time in seconds -->
- <!-- between checks to see if a JSP page needs to -->
- <!-- be recompiled. [0] -->
- <!-- -->
- <!-- modificationTestInterval -->
- <!-- Causes a JSP (and its dependent files) to not -->
- <!-- be checked for modification during the -->
- <!-- specified time interval (in seconds) from the -->
- <!-- last time the JSP was checked for -->
- <!-- modification. A value of 0 will cause the JSP -->
- <!-- to be checked on every access. -->
- <!-- Used in development mode only. [4] -->
- <!-- -->
- <!-- compiler Which compiler Ant should use to compile JSP -->
- <!-- pages. See the Ant documentation for more -->
- <!-- information. -->
- <!-- -->
- <!-- classdebuginfo Should the class file be compiled with -->
- <!-- debugging information? [true] -->
- <!-- -->
- <!-- classpath What class path should I use while compiling -->
- <!-- generated servlets? [Created dynamically -->
- <!-- based on the current web application] -->
- <!-- -->
- <!-- development Is Jasper used in development mode? If true, -->
- <!-- the frequency at which JSPs are checked for -->
- <!-- modification may be specified via the -->
- <!-- modificationTestInterval parameter. [true] -->
- <!-- -->
- <!-- enablePooling Determines whether tag handler pooling is -->
- <!-- enabled [true] -->
- <!-- -->
- <!-- fork Tell Ant to fork compiles of JSP pages so that -->
- <!-- a separate JVM is used for JSP page compiles -->
- <!-- from the one Tomcat is running in. [true] -->
- <!-- -->
- <!-- ieClassId The class-id value to be sent to Internet -->
- <!-- Explorer when using <jsp:plugin> tags.
-->
- <!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] -->
- <!-- -->
- <!-- javaEncoding Java file encoding to use for generating java -->
- <!-- source files. [UTF8] -->
- <!-- -->
- <!-- keepgenerated Should we keep the generated Java source code -->
- <!-- for each page instead of deleting it? [true] -->
- <!-- -->
- <!-- mappedfile Should we generate static content with one -->
- <!-- print statement per input line, to ease -->
- <!-- debugging? [true] -->
- <!-- -->
- <!-- trimSpaces Should white spaces in template text between -->
- <!-- actions or directives be trimmed? [false] -->
- <!-- -->
- <!-- suppressSmap Should the generation of SMAP info for JSR45 -->
- <!-- debugging be suppressed? [false] -->
- <!-- -->
- <!-- dumpSmap Should the SMAP info for JSR45 debugging be -->
- <!-- dumped to a file? [false] -->
- <!-- False if suppressSmap is true -->
- <!-- -->
- <!-- genStrAsCharArray Should text strings be generated as char -->
- <!-- arrays, to improve performance in some cases? -->
- <!-- [false] -->
- <!-- -->
- <!-- errorOnUseBeanInvalidClassAttribute -->
- <!-- Should Jasper issue an error when the value of -->
- <!-- the class attribute in an useBean action is -->
- <!-- not a valid bean class? [true] -->
- <!-- -->
- <!-- scratchdir What scratch directory should we use when -->
- <!-- compiling JSP pages? [default work directory -->
- <!-- for the current web application] -->
- <!-- -->
- <!-- xpoweredBy Determines whether X-Powered-By response -->
- <!-- header is added by generated servlet [false] -->
- <!-- -->
- <!-- compilerTargetVM Compiler target VM -->
- <!-- default is System.properties -->
- <!-- java.specification.version > 1.4 -->
- <!-- [1.5] else [1.4] -->
- <!-- -->
- <!-- compilerSourceVM Compiler source VM -->
- <!-- default is System.properties -->
- <!-- java.specification.version > 1.4 -->
- <!-- [1.5] else [1.4] -->
- <!-- -->
- <!-- If you wish to use Jikes to compile JSP pages: -->
- <!-- Please see the "Using Jikes" section of the Jasper-HowTo
-->
- <!-- page in the Tomcat documentation. -->
-
- <servlet>
- <servlet-name>jsp</servlet-name>
- <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
- <init-param>
- <param-name>fork</param-name>
- <param-value>false</param-value>
- </init-param>
- <init-param>
- <param-name>xpoweredBy</param-name>
- <param-value>false</param-value>
- </init-param>
- <init-param>
- <param-name>compilerSourceVM</param-name>
- <param-value>1.5</param-value>
- </init-param>
- <!-- Use a custom options class to allow the shared tag lib descriptors
- to be loaded from jars in the tomcat sar conf/tlds directory. The
- standard options implementation can only find taglibs based on the
- class loader classpath.
- -->
- <init-param>
- <param-name>engineOptionsClass</param-name>
-
<param-value>org.jboss.web.tomcat.service.jasper.JspServletOptions</param-value>
- </init-param>
- <!-- Specify the jars relative to the jbossweb-tomcat6.sar that should
- be scanned for common tag lib descriptors to include in every war
- deployment.
- -->
- <init-param>
- <description>JSF standard tlds</description>
- <param-name>tagLibJar0</param-name>
- <param-value>jsf-libs/jsf-impl.jar</param-value>
- </init-param>
- <init-param>
- <description>JSTL standard tlds</description>
- <param-name>tagLibJar1</param-name>
- <param-value>jstl.jar</param-value>
- </init-param>
- <init-param>
- <description>Portlet standard tlds</description>
- <param-name>tagLibJar2</param-name>
-
<param-value>../gatein.ear/pc-portlet-(a){org.gatein.pc.version}.jar</param-value>
- </init-param>
-
- <load-on-startup>3</load-on-startup>
- </servlet>
-
-
- <!-- NOTE: An SSI Filter is also available as an alternative SSI -->
- <!-- implementation. Use either the Servlet or the Filter but NOT both. -->
- <!-- -->
- <!-- Server Side Includes processing servlet, which processes SSI -->
- <!-- directives in HTML pages consistent with similar support in web -->
- <!-- servers like Apache. Traditionally, this servlet is mapped to the -->
- <!-- URL pattern "*.shtml". This servlet supports the following
-->
- <!-- initialization parameters (default values are in square brackets): -->
- <!-- -->
- <!-- buffered Should output from this servlet be buffered? -->
- <!-- (0=false, 1=true) [0] -->
- <!-- -->
- <!-- debug Debugging detail level for messages logged -->
- <!-- by this servlet. [0] -->
- <!-- -->
- <!-- expires The number of seconds before a page with SSI -->
- <!-- directives will expire. [No default] -->
- <!-- -->
- <!-- isVirtualWebappRelative -->
- <!-- Should "virtual" paths be interpreted as
-->
- <!-- relative to the context root, instead of -->
- <!-- the server root? (0=false, 1=true) [0] -->
- <!-- -->
- <!-- inputEncoding The encoding to assume for SSI resources if -->
- <!-- one is not available from the resource. -->
- <!-- [Platform default] -->
- <!-- -->
- <!-- outputEncoding The encoding to use for the page that results -->
- <!-- from the SSI processing. [UTF-8] -->
- <!-- -->
- <!-- -->
- <!-- IMPORTANT: To use the SSI servlet, you also need to rename the -->
- <!-- $CATALINA_HOME/server/lib/servlets-ssi.renametojar file -->
- <!-- to $CATALINA_HOME/server/lib/servlets-ssi.jar -->
-
-<!--
- <servlet>
- <servlet-name>ssi</servlet-name>
- <servlet-class>
- org.apache.catalina.ssi.SSIServlet
- </servlet-class>
- <init-param>
- <param-name>buffered</param-name>
- <param-value>1</param-value>
- </init-param>
- <init-param>
- <param-name>debug</param-name>
- <param-value>0</param-value>
- </init-param>
- <init-param>
- <param-name>expires</param-name>
- <param-value>666</param-value>
- </init-param>
- <init-param>
- <param-name>isVirtualWebappRelative</param-name>
- <param-value>0</param-value>
- </init-param>
- <load-on-startup>4</load-on-startup>
- </servlet>
--->
-
-
- <!-- Common Gateway Includes (CGI) processing servlet, which supports -->
- <!-- execution of external applications that conform to the CGI spec -->
- <!-- requirements. Typically, this servlet is mapped to the URL pattern -->
- <!-- "/cgi-bin/*", which means that any CGI applications that are
-->
- <!-- executed must be present within the web application. This servlet -->
- <!-- supports the following initialization parameters (default values -->
- <!-- are in square brackets): -->
- <!-- -->
- <!-- cgiPathPrefix The CGI search path will start at -->
- <!-- webAppRootDir + File.separator + this prefix. -->
- <!-- [WEB-INF/cgi] -->
- <!-- -->
- <!-- debug Debugging detail level for messages logged -->
- <!-- by this servlet. [0] -->
- <!-- -->
- <!-- executable Name of the exectuable used to run the -->
- <!-- script. [perl] -->
- <!-- -->
- <!-- parameterEncoding Name of parameter encoding to be used with -->
- <!-- CGI servlet. -->
- <!--
[System.getProperty("file.encoding","UTF-8")] -->
- <!-- -->
- <!-- passShellEnvironment Should the shell environment variables (if -->
- <!-- any) be passed to the CGI script? [false] -->
- <!-- -->
- <!-- IMPORTANT: To use the CGI servlet, you also need to rename the -->
- <!-- $CATALINA_HOME/server/lib/servlets-cgi.renametojar file -->
- <!-- to $CATALINA_HOME/server/lib/servlets-cgi.jar -->
-
-<!--
- <servlet>
- <servlet-name>cgi</servlet-name>
-
<servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
- <init-param>
- <param-name>debug</param-name>
- <param-value>0</param-value>
- </init-param>
- <init-param>
- <param-name>cgiPathPrefix</param-name>
- <param-value>WEB-INF/cgi</param-value>
- </init-param>
- <load-on-startup>5</load-on-startup>
- </servlet>
--->
-
-
- <!-- ================ Built In Servlet Mappings ========================= -->
-
-
- <!-- The servlet mappings for the built in servlets defined above. Note -->
- <!-- that, by default, the CGI and SSI servlets are *not* mapped. You -->
- <!-- must uncomment these mappings (or add them to your application's own
-->
- <!-- web.xml deployment descriptor) to enable these services -->
-
- <!-- The mapping for the default servlet -->
- <servlet-mapping>
- <servlet-name>default</servlet-name>
- <url-pattern>/</url-pattern>
- </servlet-mapping>
-
- <!-- The mapping for the invoker servlet -->
-<!--
- <servlet-mapping>
- <servlet-name>invoker</servlet-name>
- <url-pattern>/servlet/*</url-pattern>
- </servlet-mapping>
--->
-
- <!-- The mapping for the JSP servlet -->
- <servlet-mapping>
- <servlet-name>jsp</servlet-name>
- <url-pattern>*.jsp</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>jsp</servlet-name>
- <url-pattern>*.jspx</url-pattern>
- </servlet-mapping>
-
- <!-- The mapping for the SSI servlet -->
-<!--
- <servlet-mapping>
- <servlet-name>ssi</servlet-name>
- <url-pattern>*.shtml</url-pattern>
- </servlet-mapping>
--->
-
- <!-- The mapping for the CGI Gateway servlet -->
-
-<!--
- <servlet-mapping>
- <servlet-name>cgi</servlet-name>
- <url-pattern>/cgi-bin/*</url-pattern>
- </servlet-mapping>
--->
-
-
- <!-- ================== Built In Filter Definitions ===================== -->
-
- <!-- NOTE: An SSI Servlet is also available as an alternative SSI -->
- <!-- implementation. Use either the Servlet or the Filter but NOT both. -->
- <!-- -->
- <!-- Server Side Includes processing filter, which processes SSI -->
- <!-- directives in HTML pages consistent with similar support in web -->
- <!-- servers like Apache. Traditionally, this filter is mapped to the -->
- <!-- URL pattern "*.shtml", though it can be mapped to "*" as it
will -->
- <!-- selectively enable/disable SSI processing based on mime types. For -->
- <!-- this to work you will need to uncomment the .shtml mime type -->
- <!-- definition towards the bottom of this file. -->
- <!-- The contentType init param allows you to apply SSI processing to JSP -->
- <!-- pages, javascript, or any other content you wish. This filter -->
- <!-- supports the following initialization parameters (default values are -->
- <!-- in square brackets): -->
- <!-- -->
- <!-- contentType A regex pattern that must be matched before -->
- <!-- SSI processing is applied. -->
- <!-- [text/x-server-parsed-html(;.*)?] -->
- <!-- -->
- <!-- debug Debugging detail level for messages logged -->
- <!-- by this servlet. [0] -->
- <!-- -->
- <!-- expires The number of seconds before a page with SSI -->
- <!-- directives will expire. [No default] -->
- <!-- -->
- <!-- isVirtualWebappRelative -->
- <!-- Should "virtual" paths be interpreted as
-->
- <!-- relative to the context root, instead of -->
- <!-- the server root? (0=false, 1=true) [0] -->
- <!-- -->
- <!-- -->
- <!-- IMPORTANT: To use the SSI filter, you also need to rename the -->
- <!-- $CATALINA_HOME/server/lib/servlets-ssi.renametojar file -->
- <!-- to $CATALINA_HOME/server/lib/servlets-ssi.jar -->
-
-<!--
- <filter>
- <filter-name>ssi</filter-name>
- <filter-class>
- org.apache.catalina.ssi.SSIFilter
- </filter-class>
- <init-param>
- <param-name>contentType</param-name>
- <param-value>text/x-server-parsed-html(;.*)?</param-value>
- </init-param>
- <init-param>
- <param-name>debug</param-name>
- <param-value>0</param-value>
- </init-param>
- <init-param>
- <param-name>expires</param-name>
- <param-value>666</param-value>
- </init-param>
- <init-param>
- <param-name>isVirtualWebappRelative</param-name>
- <param-value>0</param-value>
- </init-param>
- </filter>
--->
-
-
- <!-- ==================== Built In Filter Mappings ====================== -->
-
- <!-- The mapping for the SSI Filter -->
-<!--
- <filter-mapping>
- <filter-name>ssi</filter-name>
- <url-pattern>*.shtml</url-pattern>
- </filter-mapping>
--->
-
-
- <!-- ==================== Default Session Configuration ================= -->
- <!-- You can set the default session timeout (in minutes) for all newly -->
- <!-- created sessions by modifying the value below. -->
-
- <session-config>
- <session-timeout>30</session-timeout>
- </session-config>
-
-
- <!-- ===================== Default MIME Type Mappings =================== -->
- <!-- When serving static resources, Tomcat will automatically generate -->
- <!-- a "Content-Type" header based on the resource's filename
extension, -->
- <!-- based on these mappings. Additional mappings can be added here (to -->
- <!-- apply to all web applications), or in your own application's web.xml
-->
- <!-- deployment descriptor. -->
-
- <mime-mapping>
- <extension>abs</extension>
- <mime-type>audio/x-mpeg</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>ai</extension>
- <mime-type>application/postscript</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>aif</extension>
- <mime-type>audio/x-aiff</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>aifc</extension>
- <mime-type>audio/x-aiff</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>aiff</extension>
- <mime-type>audio/x-aiff</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>aim</extension>
- <mime-type>application/x-aim</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>art</extension>
- <mime-type>image/x-jg</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>asf</extension>
- <mime-type>video/x-ms-asf</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>asx</extension>
- <mime-type>video/x-ms-asf</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>au</extension>
- <mime-type>audio/basic</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>avi</extension>
- <mime-type>video/x-msvideo</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>avx</extension>
- <mime-type>video/x-rad-screenplay</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>bcpio</extension>
- <mime-type>application/x-bcpio</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>bin</extension>
- <mime-type>application/octet-stream</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>bmp</extension>
- <mime-type>image/bmp</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>body</extension>
- <mime-type>text/html</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>cdf</extension>
- <mime-type>application/x-cdf</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>cer</extension>
- <mime-type>application/x-x509-ca-cert</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>class</extension>
- <mime-type>application/java</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>cpio</extension>
- <mime-type>application/x-cpio</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>csh</extension>
- <mime-type>application/x-csh</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>css</extension>
- <mime-type>text/css</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>dib</extension>
- <mime-type>image/bmp</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>doc</extension>
- <mime-type>application/msword</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>dtd</extension>
- <mime-type>application/xml-dtd</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>dv</extension>
- <mime-type>video/x-dv</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>dvi</extension>
- <mime-type>application/x-dvi</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>eps</extension>
- <mime-type>application/postscript</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>etx</extension>
- <mime-type>text/x-setext</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>exe</extension>
- <mime-type>application/octet-stream</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>gif</extension>
- <mime-type>image/gif</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>gtar</extension>
- <mime-type>application/x-gtar</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>gz</extension>
- <mime-type>application/x-gzip</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>hdf</extension>
- <mime-type>application/x-hdf</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>hqx</extension>
- <mime-type>application/mac-binhex40</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>htc</extension>
- <mime-type>text/x-component</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>htm</extension>
- <mime-type>text/html</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>html</extension>
- <mime-type>text/html</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>hqx</extension>
- <mime-type>application/mac-binhex40</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>ief</extension>
- <mime-type>image/ief</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>jad</extension>
- <mime-type>text/vnd.sun.j2me.app-descriptor</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>jar</extension>
- <mime-type>application/java-archive</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>java</extension>
- <mime-type>text/plain</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>jnlp</extension>
- <mime-type>application/x-java-jnlp-file</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>jpe</extension>
- <mime-type>image/jpeg</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>jpeg</extension>
- <mime-type>image/jpeg</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>jpg</extension>
- <mime-type>image/jpeg</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>js</extension>
- <mime-type>text/javascript</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>jsf</extension>
- <mime-type>text/plain</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>jspf</extension>
- <mime-type>text/plain</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>kar</extension>
- <mime-type>audio/x-midi</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>latex</extension>
- <mime-type>application/x-latex</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>m3u</extension>
- <mime-type>audio/x-mpegurl</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>mac</extension>
- <mime-type>image/x-macpaint</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>man</extension>
- <mime-type>application/x-troff-man</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>mathml</extension>
- <mime-type>application/mathml+xml</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>me</extension>
- <mime-type>application/x-troff-me</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>mid</extension>
- <mime-type>audio/x-midi</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>midi</extension>
- <mime-type>audio/x-midi</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>mif</extension>
- <mime-type>application/x-mif</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>mov</extension>
- <mime-type>video/quicktime</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>movie</extension>
- <mime-type>video/x-sgi-movie</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>mp1</extension>
- <mime-type>audio/x-mpeg</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>mp2</extension>
- <mime-type>audio/x-mpeg</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>mp3</extension>
- <mime-type>audio/x-mpeg</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>mpa</extension>
- <mime-type>audio/x-mpeg</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>mpe</extension>
- <mime-type>video/mpeg</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>mpeg</extension>
- <mime-type>video/mpeg</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>mpega</extension>
- <mime-type>audio/x-mpeg</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>mpg</extension>
- <mime-type>video/mpeg</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>mpv2</extension>
- <mime-type>video/mpeg2</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>ms</extension>
- <mime-type>application/x-wais-source</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>nc</extension>
- <mime-type>application/x-netcdf</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>oda</extension>
- <mime-type>application/oda</mime-type>
- </mime-mapping>
- <mime-mapping>
- <!-- OpenDocument Database -->
- <extension>odb</extension>
- <mime-type>application/vnd.oasis.opendocument.database</mime-type>
- </mime-mapping>
- <mime-mapping>
- <!-- OpenDocument Chart -->
- <extension>odc</extension>
- <mime-type>application/vnd.oasis.opendocument.chart</mime-type>
- </mime-mapping>
- <mime-mapping>
- <!-- OpenDocument Formula -->
- <extension>odf</extension>
- <mime-type>application/vnd.oasis.opendocument.formula</mime-type>
- </mime-mapping>
- <mime-mapping>
- <!-- OpenDocument Drawing -->
- <extension>odg</extension>
- <mime-type>application/vnd.oasis.opendocument.graphics</mime-type>
- </mime-mapping>
- <mime-mapping>
- <!-- OpenDocument Image -->
- <extension>odi</extension>
- <mime-type>application/vnd.oasis.opendocument.image</mime-type>
- </mime-mapping>
- <mime-mapping>
- <!-- OpenDocument Master Document -->
- <extension>odm</extension>
-
<mime-type>application/vnd.oasis.opendocument.text-master</mime-type>
- </mime-mapping>
- <mime-mapping>
- <!-- OpenDocument Presentation -->
- <extension>odp</extension>
-
<mime-type>application/vnd.oasis.opendocument.presentation</mime-type>
- </mime-mapping>
- <mime-mapping>
- <!-- OpenDocument Spreadsheet -->
- <extension>ods</extension>
-
<mime-type>application/vnd.oasis.opendocument.spreadsheet</mime-type>
- </mime-mapping>
- <mime-mapping>
- <!-- OpenDocument Text -->
- <extension>odt</extension>
- <mime-type>application/vnd.oasis.opendocument.text</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>ogg</extension>
- <mime-type>application/ogg</mime-type>
- </mime-mapping>
- <mime-mapping>
- <!-- OpenDocument Drawing Template -->
- <extension>otg </extension>
-
<mime-type>application/vnd.oasis.opendocument.graphics-template</mime-type>
- </mime-mapping>
- <mime-mapping>
- <!-- HTML Document Template -->
- <extension>oth</extension>
- <mime-type>application/vnd.oasis.opendocument.text-web</mime-type>
- </mime-mapping>
- <mime-mapping>
- <!-- OpenDocument Presentation Template -->
- <extension>otp</extension>
-
<mime-type>application/vnd.oasis.opendocument.presentation-template</mime-type>
- </mime-mapping>
- <mime-mapping>
- <!-- OpenDocument Spreadsheet Template -->
- <extension>ots</extension>
- <mime-type>application/vnd.oasis.opendocument.spreadsheet-template
</mime-type>
- </mime-mapping>
- <mime-mapping>
- <!-- OpenDocument Text Template -->
- <extension>ott</extension>
-
<mime-type>application/vnd.oasis.opendocument.text-template</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>pbm</extension>
- <mime-type>image/x-portable-bitmap</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>pct</extension>
- <mime-type>image/pict</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>pdf</extension>
- <mime-type>application/pdf</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>pgm</extension>
- <mime-type>image/x-portable-graymap</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>pic</extension>
- <mime-type>image/pict</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>pict</extension>
- <mime-type>image/pict</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>pls</extension>
- <mime-type>audio/x-scpls</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>png</extension>
- <mime-type>image/png</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>pnm</extension>
- <mime-type>image/x-portable-anymap</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>pnt</extension>
- <mime-type>image/x-macpaint</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>ppm</extension>
- <mime-type>image/x-portable-pixmap</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>ppt</extension>
- <mime-type>application/powerpoint</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>ps</extension>
- <mime-type>application/postscript</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>psd</extension>
- <mime-type>image/x-photoshop</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>qt</extension>
- <mime-type>video/quicktime</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>qti</extension>
- <mime-type>image/x-quicktime</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>qtif</extension>
- <mime-type>image/x-quicktime</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>ras</extension>
- <mime-type>image/x-cmu-raster</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>rdf</extension>
- <mime-type>application/rdf+xml</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>rgb</extension>
- <mime-type>image/x-rgb</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>rm</extension>
- <mime-type>application/vnd.rn-realmedia</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>roff</extension>
- <mime-type>application/x-troff</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>rtf</extension>
- <mime-type>application/rtf</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>rtx</extension>
- <mime-type>text/richtext</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>sh</extension>
- <mime-type>application/x-sh</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>shar</extension>
- <mime-type>application/x-shar</mime-type>
- </mime-mapping>
-<!--
- <mime-mapping>
- <extension>shtml</extension>
- <mime-type>text/x-server-parsed-html</mime-type>
- </mime-mapping>
--->
- <mime-mapping>
- <extension>smf</extension>
- <mime-type>audio/x-midi</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>sit</extension>
- <mime-type>application/x-stuffit</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>snd</extension>
- <mime-type>audio/basic</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>src</extension>
- <mime-type>application/x-wais-source</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>sv4cpio</extension>
- <mime-type>application/x-sv4cpio</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>sv4crc</extension>
- <mime-type>application/x-sv4crc</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>swf</extension>
- <mime-type>application/x-shockwave-flash</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>t</extension>
- <mime-type>application/x-troff</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>tar</extension>
- <mime-type>application/x-tar</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>tcl</extension>
- <mime-type>application/x-tcl</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>tex</extension>
- <mime-type>application/x-tex</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>texi</extension>
- <mime-type>application/x-texinfo</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>texinfo</extension>
- <mime-type>application/x-texinfo</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>tif</extension>
- <mime-type>image/tiff</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>tiff</extension>
- <mime-type>image/tiff</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>tr</extension>
- <mime-type>application/x-troff</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>tsv</extension>
- <mime-type>text/tab-separated-values</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>txt</extension>
- <mime-type>text/plain</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>ulw</extension>
- <mime-type>audio/basic</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>ustar</extension>
- <mime-type>application/x-ustar</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>vxml</extension>
- <mime-type>application/voicexml+xml</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>xbm</extension>
- <mime-type>image/x-xbitmap</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>xht</extension>
- <mime-type>application/xhtml+xml</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>xhtml</extension>
- <mime-type>application/xhtml+xml</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>xml</extension>
- <mime-type>application/xml</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>xpm</extension>
- <mime-type>image/x-xpixmap</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>xsl</extension>
- <mime-type>application/xml</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>xslt</extension>
- <mime-type>application/xslt+xml</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>xul</extension>
- <mime-type>application/vnd.mozilla.xul+xml</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>xwd</extension>
- <mime-type>image/x-xwindowdump</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>wav</extension>
- <mime-type>audio/x-wav</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>svg</extension>
- <mime-type>image/svg+xml</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>svgz</extension>
- <mime-type>image/svg+xml</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>vsd</extension>
- <mime-type>application/x-visio</mime-type>
- </mime-mapping>
- <mime-mapping>
- <!-- Wireless Bitmap -->
- <extension>wbmp</extension>
- <mime-type>image/vnd.wap.wbmp</mime-type>
- </mime-mapping>
- <mime-mapping>
- <!-- WML Source -->
- <extension>wml</extension>
- <mime-type>text/vnd.wap.wml</mime-type>
- </mime-mapping>
- <mime-mapping>
- <!-- Compiled WML -->
- <extension>wmlc</extension>
- <mime-type>application/vnd.wap.wmlc</mime-type>
- </mime-mapping>
- <mime-mapping>
- <!-- WML Script Source -->
- <extension>wmls</extension>
- <mime-type>text/vnd.wap.wmlscript</mime-type>
- </mime-mapping>
- <mime-mapping>
- <!-- Compiled WML Script -->
- <extension>wmlscriptc</extension>
- <mime-type>application/vnd.wap.wmlscriptc</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>wrl</extension>
- <mime-type>x-world/x-vrml</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>Z</extension>
- <mime-type>application/x-compress</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>z</extension>
- <mime-type>application/x-compress</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>zip</extension>
- <mime-type>application/zip</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>xls</extension>
- <mime-type>application/vnd.ms-excel</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>doc</extension>
- <mime-type>application/vnd.ms-word</mime-type>
- </mime-mapping>
- <mime-mapping>
- <extension>ppt</extension>
- <mime-type>application/vnd.ms-powerpoint</mime-type>
- </mime-mapping>
-
- <!-- ==================== Default Welcome File List ===================== -->
- <!-- When a request URI refers to a directory, the default servlet looks -->
- <!-- for a "welcome file" within that directory and, if present,
-->
- <!-- to the corresponding resource URI for display. If no welcome file -->
- <!-- is present, the default servlet either serves a directory listing, -->
- <!-- or returns a 404 status, depending on how it is configured. -->
- <!-- -->
- <!-- If you define welcome files in your own application's web.xml
-->
- <!-- deployment descriptor, that list *replaces* the list configured -->
- <!-- here, so be sure that you include any of the default values that -->
- <!-- you wish to include. -->
-
- <welcome-file-list>
- <welcome-file>index.html</welcome-file>
- <welcome-file>index.htm</welcome-file>
- <welcome-file>index.jsp</welcome-file>
- </welcome-file-list>
-
-</web-app>
Copied:
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/jboss-web.deployer/web.xml
(from rev 804,
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/jboss-web.deployer/web.xml)
===================================================================
---
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/jboss-web.deployer/web.xml
(rev 0)
+++
portal/branches/wsrp-integration/server/jboss/patch/src/main/jboss/server/default/deploy/jboss-web.deployer/web.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -0,0 +1,1274 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+
+<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <!-- ======================== Introduction ============================== -->
+ <!-- This document defines default values for *all* web applications -->
+ <!-- loaded into this instance of Tomcat. As each application is -->
+ <!-- deployed, this file is processed, followed by the -->
+ <!-- "/WEB-INF/web.xml" deployment descriptor from your own
-->
+ <!-- applications. -->
+ <!-- -->
+ <!-- WARNING: Do not configure application-specific resources here! -->
+ <!-- They should go in the "/WEB-INF/web.xml" file in your application.
-->
+
+ <!-- =========== Common Context Params ================================== -->
+ <!-- JBossInjectionProvider provides resource injection for managed beans. -->
+ <!-- See JSF 1.2 spec section 5.4 for details. -->
+ <context-param>
+ <param-name>com.sun.faces.injectionProvider</param-name>
+
<param-value>org.jboss.web.jsf.integration.injection.JBossInjectionProvider</param-value>
+ </context-param>
+
+ <!-- ================== Common filter Configuration ==================== -->
+ <filter>
+ <filter-name>CommonHeadersFilter</filter-name>
+
<filter-class>org.jboss.web.tomcat.filters.ReplyHeaderFilter</filter-class>
+ <init-param>
+ <param-name>X-Powered-By</param-name>
+ <param-value>Servlet 2.4; JBoss-4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA
date=200802142215)/Tomcat-5.5</param-value>
+ </init-param>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>CommonHeadersFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <!-- JBAS-4752: This filter should be enabled when authentication cache -->
+ <!-- must be flushed as soon as the http sessions expire. -->
+
+ <!--
+ <filter>
+ <filter-name>PrincipalSessionAttributeFilter</filter-name>
+
<filter-class>org.jboss.web.tomcat.security.PrincipalSessionAttributeFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>PrincipalSessionAttributeFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+ -->
+
+ <!-- ================== Common Listener Configuration ==================== -->
+ <listener>
+
<listener-class>org.jboss.web.tomcat.security.SecurityFlushSessionListener</listener-class>
+ </listener>
+
+ <!-- Configures JSF for a web application if the javax.faces.webapp.FacesServlet is
declared -->
+ <!-- in web.xml.
-->
+ <listener>
+
<listener-class>org.jboss.web.jsf.integration.config.JBossJSFConfigureListener</listener-class>
+ </listener>
+
+ <!-- Listens to all web app lifecycle events so that @PreDestroy can be called on
-->
+ <!-- JSF managed beans that go out of scope. You can comment this out if you
-->
+ <!-- don't use JSF or you don't use annotations on your managed beans.
-->
+ <listener>
+
<listener-class>com.sun.faces.application.WebappLifecycleListener</listener-class>
+ </listener>
+
+
+ <!-- ================== Built In Servlet Definitions ==================== -->
+
+
+ <!-- The default servlet for all web applications, that serves static -->
+ <!-- resources. It processes all requests that are not mapped to other -->
+ <!-- servlets with servlet mappings (defined either here or in your own -->
+ <!-- web.xml file. This servlet supports the following initialization -->
+ <!-- parameters (default values are in square brackets): -->
+ <!-- -->
+ <!-- debug Debugging detail level for messages logged -->
+ <!-- by this servlet. [0] -->
+ <!-- -->
+ <!-- fileEncoding Encoding to be used to read static resources -->
+ <!-- [platform default] -->
+ <!-- -->
+ <!-- input Input buffer size (in bytes) when reading -->
+ <!-- resources to be served. [2048] -->
+ <!-- -->
+ <!-- listings Should directory listings be produced if there -->
+ <!-- is no welcome file in this directory? [false] -->
+ <!-- WARNING: Listings for directories with many -->
+ <!-- entries can be slow and may consume -->
+ <!-- significant proportions of server resources. -->
+ <!-- -->
+ <!-- output Output buffer size (in bytes) when writing -->
+ <!-- resources to be served. [2048] -->
+ <!-- -->
+ <!-- readonly Is this context "read only", so HTTP
-->
+ <!-- commands like PUT and DELETE are -->
+ <!-- rejected? [true] -->
+ <!-- -->
+ <!-- readmeFile File name to display with the directory -->
+ <!-- contents. [null] -->
+ <!-- -->
+ <!-- sendfileSize If the connector used supports sendfile, this -->
+ <!-- represents the minimal file size in KB for -->
+ <!-- which sendfile will be used. Use a negative -->
+ <!-- value to always disable sendfile. [48] -->
+ <!-- -->
+ <!-- For directory listing customization. Checks localXsltFile, then -->
+ <!-- globalXsltFile, then defaults to original behavior. -->
+ <!-- -->
+ <!-- localXsltFile Make directory listings an XML doc and -->
+ <!-- pass the result to this style sheet residing -->
+ <!-- in that directory. This overrides -->
+ <!-- globalXsltFile[null] -->
+ <!-- -->
+ <!-- globalXsltFile Site wide configuration version of -->
+ <!-- localXsltFile This argument is expected -->
+ <!-- to be a physical file. [null] -->
+ <!-- -->
+ <!-- -->
+
+ <servlet>
+ <servlet-name>default</servlet-name>
+
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
+ <init-param>
+ <param-name>debug</param-name>
+ <param-value>0</param-value>
+ </init-param>
+ <init-param>
+ <param-name>listings</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+
+ <!-- The "invoker" servlet, which executes anonymous servlet classes
-->
+ <!-- that have not been defined in a web.xml file. Traditionally, this -->
+ <!-- servlet is mapped to the URL pattern "/servlet/*", but you can map
-->
+ <!-- it to other patterns as well. The extra path info portion of such a -->
+ <!-- request must be the fully qualified class name of a Java class that -->
+ <!-- implements Servlet (or extends HttpServlet), or the servlet name -->
+ <!-- of an existing servlet definition. This servlet supports the -->
+ <!-- following initialization parameters (default values are in square -->
+ <!-- brackets): -->
+ <!-- -->
+ <!-- debug Debugging detail level for messages logged -->
+ <!-- by this servlet. [0] -->
+
+<!--
+ <servlet>
+ <servlet-name>invoker</servlet-name>
+ <servlet-class>
+ org.apache.catalina.servlets.InvokerServlet
+ </servlet-class>
+ <init-param>
+ <param-name>debug</param-name>
+ <param-value>0</param-value>
+ </init-param>
+ <load-on-startup>2</load-on-startup>
+ </servlet>
+-->
+
+
+ <!-- The JSP page compiler and execution servlet, which is the mechanism -->
+ <!-- used by Tomcat to support JSP pages. Traditionally, this servlet -->
+ <!-- is mapped to the URL pattern "*.jsp". This servlet supports the
-->
+ <!-- following initialization parameters (default values are in square -->
+ <!-- brackets): -->
+ <!-- -->
+ <!-- checkInterval If development is false and checkInterval is -->
+ <!-- greater than zero, background compilations are -->
+ <!-- enabled. checkInterval is the time in seconds -->
+ <!-- between checks to see if a JSP page needs to -->
+ <!-- be recompiled. [0] -->
+ <!-- -->
+ <!-- modificationTestInterval -->
+ <!-- Causes a JSP (and its dependent files) to not -->
+ <!-- be checked for modification during the -->
+ <!-- specified time interval (in seconds) from the -->
+ <!-- last time the JSP was checked for -->
+ <!-- modification. A value of 0 will cause the JSP -->
+ <!-- to be checked on every access. -->
+ <!-- Used in development mode only. [4] -->
+ <!-- -->
+ <!-- compiler Which compiler Ant should use to compile JSP -->
+ <!-- pages. See the Ant documentation for more -->
+ <!-- information. -->
+ <!-- -->
+ <!-- classdebuginfo Should the class file be compiled with -->
+ <!-- debugging information? [true] -->
+ <!-- -->
+ <!-- classpath What class path should I use while compiling -->
+ <!-- generated servlets? [Created dynamically -->
+ <!-- based on the current web application] -->
+ <!-- -->
+ <!-- development Is Jasper used in development mode? If true, -->
+ <!-- the frequency at which JSPs are checked for -->
+ <!-- modification may be specified via the -->
+ <!-- modificationTestInterval parameter. [true] -->
+ <!-- -->
+ <!-- enablePooling Determines whether tag handler pooling is -->
+ <!-- enabled [true] -->
+ <!-- -->
+ <!-- fork Tell Ant to fork compiles of JSP pages so that -->
+ <!-- a separate JVM is used for JSP page compiles -->
+ <!-- from the one Tomcat is running in. [true] -->
+ <!-- -->
+ <!-- ieClassId The class-id value to be sent to Internet -->
+ <!-- Explorer when using <jsp:plugin> tags.
-->
+ <!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] -->
+ <!-- -->
+ <!-- javaEncoding Java file encoding to use for generating java -->
+ <!-- source files. [UTF8] -->
+ <!-- -->
+ <!-- keepgenerated Should we keep the generated Java source code -->
+ <!-- for each page instead of deleting it? [true] -->
+ <!-- -->
+ <!-- mappedfile Should we generate static content with one -->
+ <!-- print statement per input line, to ease -->
+ <!-- debugging? [true] -->
+ <!-- -->
+ <!-- trimSpaces Should white spaces in template text between -->
+ <!-- actions or directives be trimmed? [false] -->
+ <!-- -->
+ <!-- suppressSmap Should the generation of SMAP info for JSR45 -->
+ <!-- debugging be suppressed? [false] -->
+ <!-- -->
+ <!-- dumpSmap Should the SMAP info for JSR45 debugging be -->
+ <!-- dumped to a file? [false] -->
+ <!-- False if suppressSmap is true -->
+ <!-- -->
+ <!-- genStrAsCharArray Should text strings be generated as char -->
+ <!-- arrays, to improve performance in some cases? -->
+ <!-- [false] -->
+ <!-- -->
+ <!-- errorOnUseBeanInvalidClassAttribute -->
+ <!-- Should Jasper issue an error when the value of -->
+ <!-- the class attribute in an useBean action is -->
+ <!-- not a valid bean class? [true] -->
+ <!-- -->
+ <!-- scratchdir What scratch directory should we use when -->
+ <!-- compiling JSP pages? [default work directory -->
+ <!-- for the current web application] -->
+ <!-- -->
+ <!-- xpoweredBy Determines whether X-Powered-By response -->
+ <!-- header is added by generated servlet [false] -->
+ <!-- -->
+ <!-- compilerTargetVM Compiler target VM -->
+ <!-- default is System.properties -->
+ <!-- java.specification.version > 1.4 -->
+ <!-- [1.5] else [1.4] -->
+ <!-- -->
+ <!-- compilerSourceVM Compiler source VM -->
+ <!-- default is System.properties -->
+ <!-- java.specification.version > 1.4 -->
+ <!-- [1.5] else [1.4] -->
+ <!-- -->
+ <!-- If you wish to use Jikes to compile JSP pages: -->
+ <!-- Please see the "Using Jikes" section of the Jasper-HowTo
-->
+ <!-- page in the Tomcat documentation. -->
+
+ <servlet>
+ <servlet-name>jsp</servlet-name>
+ <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
+ <init-param>
+ <param-name>fork</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ <init-param>
+ <param-name>xpoweredBy</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ <init-param>
+ <param-name>compilerSourceVM</param-name>
+ <param-value>1.5</param-value>
+ </init-param>
+ <!-- Use a custom options class to allow the shared tag lib descriptors
+ to be loaded from jars in the tomcat sar conf/tlds directory. The
+ standard options implementation can only find taglibs based on the
+ class loader classpath.
+ -->
+ <init-param>
+ <param-name>engineOptionsClass</param-name>
+
<param-value>org.jboss.web.tomcat.service.jasper.JspServletOptions</param-value>
+ </init-param>
+ <!-- Specify the jars relative to the jbossweb-tomcat6.sar that should
+ be scanned for common tag lib descriptors to include in every war
+ deployment.
+ -->
+ <init-param>
+ <description>JSF standard tlds</description>
+ <param-name>tagLibJar0</param-name>
+ <param-value>jsf-libs/jsf-impl.jar</param-value>
+ </init-param>
+ <init-param>
+ <description>JSTL standard tlds</description>
+ <param-name>tagLibJar1</param-name>
+ <param-value>jstl.jar</param-value>
+ </init-param>
+ <init-param>
+ <description>Portlet standard tlds</description>
+ <param-name>tagLibJar2</param-name>
+
<param-value>../gatein.ear/pc-portlet-(a){org.gatein.pc.version}.jar</param-value>
+ </init-param>
+
+ <load-on-startup>3</load-on-startup>
+ </servlet>
+
+
+ <!-- NOTE: An SSI Filter is also available as an alternative SSI -->
+ <!-- implementation. Use either the Servlet or the Filter but NOT both. -->
+ <!-- -->
+ <!-- Server Side Includes processing servlet, which processes SSI -->
+ <!-- directives in HTML pages consistent with similar support in web -->
+ <!-- servers like Apache. Traditionally, this servlet is mapped to the -->
+ <!-- URL pattern "*.shtml". This servlet supports the following
-->
+ <!-- initialization parameters (default values are in square brackets): -->
+ <!-- -->
+ <!-- buffered Should output from this servlet be buffered? -->
+ <!-- (0=false, 1=true) [0] -->
+ <!-- -->
+ <!-- debug Debugging detail level for messages logged -->
+ <!-- by this servlet. [0] -->
+ <!-- -->
+ <!-- expires The number of seconds before a page with SSI -->
+ <!-- directives will expire. [No default] -->
+ <!-- -->
+ <!-- isVirtualWebappRelative -->
+ <!-- Should "virtual" paths be interpreted as
-->
+ <!-- relative to the context root, instead of -->
+ <!-- the server root? (0=false, 1=true) [0] -->
+ <!-- -->
+ <!-- inputEncoding The encoding to assume for SSI resources if -->
+ <!-- one is not available from the resource. -->
+ <!-- [Platform default] -->
+ <!-- -->
+ <!-- outputEncoding The encoding to use for the page that results -->
+ <!-- from the SSI processing. [UTF-8] -->
+ <!-- -->
+ <!-- -->
+ <!-- IMPORTANT: To use the SSI servlet, you also need to rename the -->
+ <!-- $CATALINA_HOME/server/lib/servlets-ssi.renametojar file -->
+ <!-- to $CATALINA_HOME/server/lib/servlets-ssi.jar -->
+
+<!--
+ <servlet>
+ <servlet-name>ssi</servlet-name>
+ <servlet-class>
+ org.apache.catalina.ssi.SSIServlet
+ </servlet-class>
+ <init-param>
+ <param-name>buffered</param-name>
+ <param-value>1</param-value>
+ </init-param>
+ <init-param>
+ <param-name>debug</param-name>
+ <param-value>0</param-value>
+ </init-param>
+ <init-param>
+ <param-name>expires</param-name>
+ <param-value>666</param-value>
+ </init-param>
+ <init-param>
+ <param-name>isVirtualWebappRelative</param-name>
+ <param-value>0</param-value>
+ </init-param>
+ <load-on-startup>4</load-on-startup>
+ </servlet>
+-->
+
+
+ <!-- Common Gateway Includes (CGI) processing servlet, which supports -->
+ <!-- execution of external applications that conform to the CGI spec -->
+ <!-- requirements. Typically, this servlet is mapped to the URL pattern -->
+ <!-- "/cgi-bin/*", which means that any CGI applications that are
-->
+ <!-- executed must be present within the web application. This servlet -->
+ <!-- supports the following initialization parameters (default values -->
+ <!-- are in square brackets): -->
+ <!-- -->
+ <!-- cgiPathPrefix The CGI search path will start at -->
+ <!-- webAppRootDir + File.separator + this prefix. -->
+ <!-- [WEB-INF/cgi] -->
+ <!-- -->
+ <!-- debug Debugging detail level for messages logged -->
+ <!-- by this servlet. [0] -->
+ <!-- -->
+ <!-- executable Name of the exectuable used to run the -->
+ <!-- script. [perl] -->
+ <!-- -->
+ <!-- parameterEncoding Name of parameter encoding to be used with -->
+ <!-- CGI servlet. -->
+ <!--
[System.getProperty("file.encoding","UTF-8")] -->
+ <!-- -->
+ <!-- passShellEnvironment Should the shell environment variables (if -->
+ <!-- any) be passed to the CGI script? [false] -->
+ <!-- -->
+ <!-- IMPORTANT: To use the CGI servlet, you also need to rename the -->
+ <!-- $CATALINA_HOME/server/lib/servlets-cgi.renametojar file -->
+ <!-- to $CATALINA_HOME/server/lib/servlets-cgi.jar -->
+
+<!--
+ <servlet>
+ <servlet-name>cgi</servlet-name>
+
<servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
+ <init-param>
+ <param-name>debug</param-name>
+ <param-value>0</param-value>
+ </init-param>
+ <init-param>
+ <param-name>cgiPathPrefix</param-name>
+ <param-value>WEB-INF/cgi</param-value>
+ </init-param>
+ <load-on-startup>5</load-on-startup>
+ </servlet>
+-->
+
+
+ <!-- ================ Built In Servlet Mappings ========================= -->
+
+
+ <!-- The servlet mappings for the built in servlets defined above. Note -->
+ <!-- that, by default, the CGI and SSI servlets are *not* mapped. You -->
+ <!-- must uncomment these mappings (or add them to your application's own
-->
+ <!-- web.xml deployment descriptor) to enable these services -->
+
+ <!-- The mapping for the default servlet -->
+ <servlet-mapping>
+ <servlet-name>default</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+
+ <!-- The mapping for the invoker servlet -->
+<!--
+ <servlet-mapping>
+ <servlet-name>invoker</servlet-name>
+ <url-pattern>/servlet/*</url-pattern>
+ </servlet-mapping>
+-->
+
+ <!-- The mapping for the JSP servlet -->
+ <servlet-mapping>
+ <servlet-name>jsp</servlet-name>
+ <url-pattern>*.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>jsp</servlet-name>
+ <url-pattern>*.jspx</url-pattern>
+ </servlet-mapping>
+
+ <!-- The mapping for the SSI servlet -->
+<!--
+ <servlet-mapping>
+ <servlet-name>ssi</servlet-name>
+ <url-pattern>*.shtml</url-pattern>
+ </servlet-mapping>
+-->
+
+ <!-- The mapping for the CGI Gateway servlet -->
+
+<!--
+ <servlet-mapping>
+ <servlet-name>cgi</servlet-name>
+ <url-pattern>/cgi-bin/*</url-pattern>
+ </servlet-mapping>
+-->
+
+
+ <!-- ================== Built In Filter Definitions ===================== -->
+
+ <!-- NOTE: An SSI Servlet is also available as an alternative SSI -->
+ <!-- implementation. Use either the Servlet or the Filter but NOT both. -->
+ <!-- -->
+ <!-- Server Side Includes processing filter, which processes SSI -->
+ <!-- directives in HTML pages consistent with similar support in web -->
+ <!-- servers like Apache. Traditionally, this filter is mapped to the -->
+ <!-- URL pattern "*.shtml", though it can be mapped to "*" as it
will -->
+ <!-- selectively enable/disable SSI processing based on mime types. For -->
+ <!-- this to work you will need to uncomment the .shtml mime type -->
+ <!-- definition towards the bottom of this file. -->
+ <!-- The contentType init param allows you to apply SSI processing to JSP -->
+ <!-- pages, javascript, or any other content you wish. This filter -->
+ <!-- supports the following initialization parameters (default values are -->
+ <!-- in square brackets): -->
+ <!-- -->
+ <!-- contentType A regex pattern that must be matched before -->
+ <!-- SSI processing is applied. -->
+ <!-- [text/x-server-parsed-html(;.*)?] -->
+ <!-- -->
+ <!-- debug Debugging detail level for messages logged -->
+ <!-- by this servlet. [0] -->
+ <!-- -->
+ <!-- expires The number of seconds before a page with SSI -->
+ <!-- directives will expire. [No default] -->
+ <!-- -->
+ <!-- isVirtualWebappRelative -->
+ <!-- Should "virtual" paths be interpreted as
-->
+ <!-- relative to the context root, instead of -->
+ <!-- the server root? (0=false, 1=true) [0] -->
+ <!-- -->
+ <!-- -->
+ <!-- IMPORTANT: To use the SSI filter, you also need to rename the -->
+ <!-- $CATALINA_HOME/server/lib/servlets-ssi.renametojar file -->
+ <!-- to $CATALINA_HOME/server/lib/servlets-ssi.jar -->
+
+<!--
+ <filter>
+ <filter-name>ssi</filter-name>
+ <filter-class>
+ org.apache.catalina.ssi.SSIFilter
+ </filter-class>
+ <init-param>
+ <param-name>contentType</param-name>
+ <param-value>text/x-server-parsed-html(;.*)?</param-value>
+ </init-param>
+ <init-param>
+ <param-name>debug</param-name>
+ <param-value>0</param-value>
+ </init-param>
+ <init-param>
+ <param-name>expires</param-name>
+ <param-value>666</param-value>
+ </init-param>
+ <init-param>
+ <param-name>isVirtualWebappRelative</param-name>
+ <param-value>0</param-value>
+ </init-param>
+ </filter>
+-->
+
+
+ <!-- ==================== Built In Filter Mappings ====================== -->
+
+ <!-- The mapping for the SSI Filter -->
+<!--
+ <filter-mapping>
+ <filter-name>ssi</filter-name>
+ <url-pattern>*.shtml</url-pattern>
+ </filter-mapping>
+-->
+
+
+ <!-- ==================== Default Session Configuration ================= -->
+ <!-- You can set the default session timeout (in minutes) for all newly -->
+ <!-- created sessions by modifying the value below. -->
+
+ <session-config>
+ <session-timeout>30</session-timeout>
+ </session-config>
+
+
+ <!-- ===================== Default MIME Type Mappings =================== -->
+ <!-- When serving static resources, Tomcat will automatically generate -->
+ <!-- a "Content-Type" header based on the resource's filename
extension, -->
+ <!-- based on these mappings. Additional mappings can be added here (to -->
+ <!-- apply to all web applications), or in your own application's web.xml
-->
+ <!-- deployment descriptor. -->
+
+ <mime-mapping>
+ <extension>abs</extension>
+ <mime-type>audio/x-mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ai</extension>
+ <mime-type>application/postscript</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>aif</extension>
+ <mime-type>audio/x-aiff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>aifc</extension>
+ <mime-type>audio/x-aiff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>aiff</extension>
+ <mime-type>audio/x-aiff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>aim</extension>
+ <mime-type>application/x-aim</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>art</extension>
+ <mime-type>image/x-jg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>asf</extension>
+ <mime-type>video/x-ms-asf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>asx</extension>
+ <mime-type>video/x-ms-asf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>au</extension>
+ <mime-type>audio/basic</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>avi</extension>
+ <mime-type>video/x-msvideo</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>avx</extension>
+ <mime-type>video/x-rad-screenplay</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>bcpio</extension>
+ <mime-type>application/x-bcpio</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>bin</extension>
+ <mime-type>application/octet-stream</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>bmp</extension>
+ <mime-type>image/bmp</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>body</extension>
+ <mime-type>text/html</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>cdf</extension>
+ <mime-type>application/x-cdf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>cer</extension>
+ <mime-type>application/x-x509-ca-cert</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>class</extension>
+ <mime-type>application/java</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>cpio</extension>
+ <mime-type>application/x-cpio</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>csh</extension>
+ <mime-type>application/x-csh</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>css</extension>
+ <mime-type>text/css</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>dib</extension>
+ <mime-type>image/bmp</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>doc</extension>
+ <mime-type>application/msword</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>dtd</extension>
+ <mime-type>application/xml-dtd</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>dv</extension>
+ <mime-type>video/x-dv</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>dvi</extension>
+ <mime-type>application/x-dvi</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>eps</extension>
+ <mime-type>application/postscript</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>etx</extension>
+ <mime-type>text/x-setext</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>exe</extension>
+ <mime-type>application/octet-stream</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>gif</extension>
+ <mime-type>image/gif</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>gtar</extension>
+ <mime-type>application/x-gtar</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>gz</extension>
+ <mime-type>application/x-gzip</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>hdf</extension>
+ <mime-type>application/x-hdf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>hqx</extension>
+ <mime-type>application/mac-binhex40</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>htc</extension>
+ <mime-type>text/x-component</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>htm</extension>
+ <mime-type>text/html</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>html</extension>
+ <mime-type>text/html</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>hqx</extension>
+ <mime-type>application/mac-binhex40</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ief</extension>
+ <mime-type>image/ief</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jad</extension>
+ <mime-type>text/vnd.sun.j2me.app-descriptor</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jar</extension>
+ <mime-type>application/java-archive</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>java</extension>
+ <mime-type>text/plain</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jnlp</extension>
+ <mime-type>application/x-java-jnlp-file</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jpe</extension>
+ <mime-type>image/jpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jpeg</extension>
+ <mime-type>image/jpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jpg</extension>
+ <mime-type>image/jpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>js</extension>
+ <mime-type>text/javascript</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jsf</extension>
+ <mime-type>text/plain</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>jspf</extension>
+ <mime-type>text/plain</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>kar</extension>
+ <mime-type>audio/x-midi</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>latex</extension>
+ <mime-type>application/x-latex</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>m3u</extension>
+ <mime-type>audio/x-mpegurl</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mac</extension>
+ <mime-type>image/x-macpaint</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>man</extension>
+ <mime-type>application/x-troff-man</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mathml</extension>
+ <mime-type>application/mathml+xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>me</extension>
+ <mime-type>application/x-troff-me</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mid</extension>
+ <mime-type>audio/x-midi</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>midi</extension>
+ <mime-type>audio/x-midi</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mif</extension>
+ <mime-type>application/x-mif</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mov</extension>
+ <mime-type>video/quicktime</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>movie</extension>
+ <mime-type>video/x-sgi-movie</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mp1</extension>
+ <mime-type>audio/x-mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mp2</extension>
+ <mime-type>audio/x-mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mp3</extension>
+ <mime-type>audio/x-mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mpa</extension>
+ <mime-type>audio/x-mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mpe</extension>
+ <mime-type>video/mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mpeg</extension>
+ <mime-type>video/mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mpega</extension>
+ <mime-type>audio/x-mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mpg</extension>
+ <mime-type>video/mpeg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>mpv2</extension>
+ <mime-type>video/mpeg2</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ms</extension>
+ <mime-type>application/x-wais-source</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>nc</extension>
+ <mime-type>application/x-netcdf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>oda</extension>
+ <mime-type>application/oda</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- OpenDocument Database -->
+ <extension>odb</extension>
+ <mime-type>application/vnd.oasis.opendocument.database</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- OpenDocument Chart -->
+ <extension>odc</extension>
+ <mime-type>application/vnd.oasis.opendocument.chart</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- OpenDocument Formula -->
+ <extension>odf</extension>
+ <mime-type>application/vnd.oasis.opendocument.formula</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- OpenDocument Drawing -->
+ <extension>odg</extension>
+ <mime-type>application/vnd.oasis.opendocument.graphics</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- OpenDocument Image -->
+ <extension>odi</extension>
+ <mime-type>application/vnd.oasis.opendocument.image</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- OpenDocument Master Document -->
+ <extension>odm</extension>
+
<mime-type>application/vnd.oasis.opendocument.text-master</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- OpenDocument Presentation -->
+ <extension>odp</extension>
+
<mime-type>application/vnd.oasis.opendocument.presentation</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- OpenDocument Spreadsheet -->
+ <extension>ods</extension>
+
<mime-type>application/vnd.oasis.opendocument.spreadsheet</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- OpenDocument Text -->
+ <extension>odt</extension>
+ <mime-type>application/vnd.oasis.opendocument.text</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ogg</extension>
+ <mime-type>application/ogg</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- OpenDocument Drawing Template -->
+ <extension>otg </extension>
+
<mime-type>application/vnd.oasis.opendocument.graphics-template</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- HTML Document Template -->
+ <extension>oth</extension>
+ <mime-type>application/vnd.oasis.opendocument.text-web</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- OpenDocument Presentation Template -->
+ <extension>otp</extension>
+
<mime-type>application/vnd.oasis.opendocument.presentation-template</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- OpenDocument Spreadsheet Template -->
+ <extension>ots</extension>
+ <mime-type>application/vnd.oasis.opendocument.spreadsheet-template
</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- OpenDocument Text Template -->
+ <extension>ott</extension>
+
<mime-type>application/vnd.oasis.opendocument.text-template</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pbm</extension>
+ <mime-type>image/x-portable-bitmap</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pct</extension>
+ <mime-type>image/pict</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pdf</extension>
+ <mime-type>application/pdf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pgm</extension>
+ <mime-type>image/x-portable-graymap</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pic</extension>
+ <mime-type>image/pict</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pict</extension>
+ <mime-type>image/pict</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pls</extension>
+ <mime-type>audio/x-scpls</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>png</extension>
+ <mime-type>image/png</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pnm</extension>
+ <mime-type>image/x-portable-anymap</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>pnt</extension>
+ <mime-type>image/x-macpaint</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ppm</extension>
+ <mime-type>image/x-portable-pixmap</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ppt</extension>
+ <mime-type>application/powerpoint</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ps</extension>
+ <mime-type>application/postscript</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>psd</extension>
+ <mime-type>image/x-photoshop</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>qt</extension>
+ <mime-type>video/quicktime</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>qti</extension>
+ <mime-type>image/x-quicktime</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>qtif</extension>
+ <mime-type>image/x-quicktime</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ras</extension>
+ <mime-type>image/x-cmu-raster</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>rdf</extension>
+ <mime-type>application/rdf+xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>rgb</extension>
+ <mime-type>image/x-rgb</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>rm</extension>
+ <mime-type>application/vnd.rn-realmedia</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>roff</extension>
+ <mime-type>application/x-troff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>rtf</extension>
+ <mime-type>application/rtf</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>rtx</extension>
+ <mime-type>text/richtext</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>sh</extension>
+ <mime-type>application/x-sh</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>shar</extension>
+ <mime-type>application/x-shar</mime-type>
+ </mime-mapping>
+<!--
+ <mime-mapping>
+ <extension>shtml</extension>
+ <mime-type>text/x-server-parsed-html</mime-type>
+ </mime-mapping>
+-->
+ <mime-mapping>
+ <extension>smf</extension>
+ <mime-type>audio/x-midi</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>sit</extension>
+ <mime-type>application/x-stuffit</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>snd</extension>
+ <mime-type>audio/basic</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>src</extension>
+ <mime-type>application/x-wais-source</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>sv4cpio</extension>
+ <mime-type>application/x-sv4cpio</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>sv4crc</extension>
+ <mime-type>application/x-sv4crc</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>swf</extension>
+ <mime-type>application/x-shockwave-flash</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>t</extension>
+ <mime-type>application/x-troff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tar</extension>
+ <mime-type>application/x-tar</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tcl</extension>
+ <mime-type>application/x-tcl</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tex</extension>
+ <mime-type>application/x-tex</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>texi</extension>
+ <mime-type>application/x-texinfo</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>texinfo</extension>
+ <mime-type>application/x-texinfo</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tif</extension>
+ <mime-type>image/tiff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tiff</extension>
+ <mime-type>image/tiff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tr</extension>
+ <mime-type>application/x-troff</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>tsv</extension>
+ <mime-type>text/tab-separated-values</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>txt</extension>
+ <mime-type>text/plain</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ulw</extension>
+ <mime-type>audio/basic</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ustar</extension>
+ <mime-type>application/x-ustar</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>vxml</extension>
+ <mime-type>application/voicexml+xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xbm</extension>
+ <mime-type>image/x-xbitmap</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xht</extension>
+ <mime-type>application/xhtml+xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xhtml</extension>
+ <mime-type>application/xhtml+xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xml</extension>
+ <mime-type>application/xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xpm</extension>
+ <mime-type>image/x-xpixmap</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xsl</extension>
+ <mime-type>application/xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xslt</extension>
+ <mime-type>application/xslt+xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xul</extension>
+ <mime-type>application/vnd.mozilla.xul+xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xwd</extension>
+ <mime-type>image/x-xwindowdump</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>wav</extension>
+ <mime-type>audio/x-wav</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>svg</extension>
+ <mime-type>image/svg+xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>svgz</extension>
+ <mime-type>image/svg+xml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>vsd</extension>
+ <mime-type>application/x-visio</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- Wireless Bitmap -->
+ <extension>wbmp</extension>
+ <mime-type>image/vnd.wap.wbmp</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- WML Source -->
+ <extension>wml</extension>
+ <mime-type>text/vnd.wap.wml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- Compiled WML -->
+ <extension>wmlc</extension>
+ <mime-type>application/vnd.wap.wmlc</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- WML Script Source -->
+ <extension>wmls</extension>
+ <mime-type>text/vnd.wap.wmlscript</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <!-- Compiled WML Script -->
+ <extension>wmlscriptc</extension>
+ <mime-type>application/vnd.wap.wmlscriptc</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>wrl</extension>
+ <mime-type>x-world/x-vrml</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>Z</extension>
+ <mime-type>application/x-compress</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>z</extension>
+ <mime-type>application/x-compress</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>zip</extension>
+ <mime-type>application/zip</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>xls</extension>
+ <mime-type>application/vnd.ms-excel</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>doc</extension>
+ <mime-type>application/vnd.ms-word</mime-type>
+ </mime-mapping>
+ <mime-mapping>
+ <extension>ppt</extension>
+ <mime-type>application/vnd.ms-powerpoint</mime-type>
+ </mime-mapping>
+
+ <!-- ==================== Default Welcome File List ===================== -->
+ <!-- When a request URI refers to a directory, the default servlet looks -->
+ <!-- for a "welcome file" within that directory and, if present,
-->
+ <!-- to the corresponding resource URI for display. If no welcome file -->
+ <!-- is present, the default servlet either serves a directory listing, -->
+ <!-- or returns a 404 status, depending on how it is configured. -->
+ <!-- -->
+ <!-- If you define welcome files in your own application's web.xml
-->
+ <!-- deployment descriptor, that list *replaces* the list configured -->
+ <!-- here, so be sure that you include any of the default values that -->
+ <!-- you wish to include. -->
+
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+
+</web-app>
Modified:
portal/branches/wsrp-integration/server/jboss/patch-ear/src/main/jboss/server/default/deployers/jbossweb.deployer/web.xml
===================================================================
---
portal/branches/wsrp-integration/server/jboss/patch-ear/src/main/jboss/server/default/deployers/jbossweb.deployer/web.xml 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/server/jboss/patch-ear/src/main/jboss/server/default/deployers/jbossweb.deployer/web.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -304,7 +304,7 @@
<init-param>
<description>Portlet standard tlds</description>
<param-name>tagLibJar2</param-name>
-
<param-value>../../deploy/gatein.ear/lib/pc-portlet-(a){org.gatein.pc.version}.jar</param-value>
+
<param-value>../../deploy/gatein.ear/pc-portlet-(a){org.gatein.pc.version}.jar</param-value>
</init-param>
Modified: portal/branches/wsrp-integration/server/jboss/pom.xml
===================================================================
--- portal/branches/wsrp-integration/server/jboss/pom.xml 2009-11-26 15:37:51 UTC (rev
817)
+++ portal/branches/wsrp-integration/server/jboss/pom.xml 2009-11-26 15:54:09 UTC (rev
818)
@@ -35,6 +35,7 @@
<name>GateIn Portal Server JBoss</name>
<modules>
+ <module>patch</module>
<module>patch-ear</module>
<module>plugin</module>
</modules>
Modified:
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
===================================================================
---
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2009-11-26
15:54:09 UTC (rev 818)
@@ -543,6 +543,7 @@
var middleBlock = eXo.core.DOMUtil.findFirstChildByClass(portalComposer,
"div", "MLPortalComposer");
var bottomBlock = eXo.core.DOMUtil.findFirstChildByClass(portalComposer,
"div", "BLPortalComposer");
var fakeBottom = eXo.core.DOMUtil.findFirstChildByClass(portalComposer, "div",
"Bottom");
+ var params;
if(middleBlock && middleBlock.style.display != "none") {
middleBlock.style.display = "none";
bottomBlock.style.display = "none";
@@ -555,7 +556,7 @@
eXo.core.DOMUtil.replaceClass(clickedEle, "CollapseIcon",
"ExpandIcon");
}
var requestStr = eXo.env.server.createPortalURL(portalComposer.id, "Toggle",
true);
- ajaxAsyncGetRequest(requestStr);
+ ajaxGet(requestStr);
};
UIPortal.prototype.collapseExpand = function(element) {
Modified:
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/webui/UITabbedDashboard.js
===================================================================
---
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/webui/UITabbedDashboard.js 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/javascript/eXo/webui/UITabbedDashboard.js 2009-11-26
15:54:09 UTC (rev 818)
@@ -19,7 +19,7 @@
eXo.webui.UITabbedDashboard = {
- init : function(){eXo.webui.UITabbedDashboard.isInRequest = false;},
+ init : function(){},
renameTabLabel : function(e){
if(!e){
@@ -91,7 +91,6 @@
if(!e){
e = window.event;
}
- if(eXo.webui.UITabbedDashboard.isInRequest) return;
var keyNum = e.keyCode;
//If user presses on ENTER button
@@ -107,7 +106,6 @@
href += "&uicomponent=UITabPaneDashboard";
href += "&op=AddDashboard";
href += "&objectId=" + newTabLabel;
- eXo.webui.UITabbedDashboard.isInRequest = true;
window.location = href;
}
//If user presses on ESCAPE button
Modified:
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPage/Stylesheet.css
===================================================================
---
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPage/Stylesheet.css 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPage/Stylesheet.css 2009-11-26
15:54:09 UTC (rev 818)
@@ -92,8 +92,7 @@
}
.UIPageBody .VIEW-PAGEBODY .UIPage .UIComponentBlock {
- background: white;
- height: 100%;
+ background: white;
}
.UIPageBody .BLPagebody {
Modified:
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIToolbarContainer/Stylesheet.css
===================================================================
---
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIToolbarContainer/Stylesheet.css 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIToolbarContainer/Stylesheet.css 2009-11-26
15:54:09 UTC (rev 818)
@@ -121,81 +121,79 @@
.UIToolbarContainer .MenuItem .ArrowIcon {
background: url('background/ToolbarContainer.gif') no-repeat right bottom; /*
orientation=lt */
- background: url('background/ToolbarContainer-rt.gif') no-repeat 5px bottom; /*
orientation=rt */
+ background: url('background/ToolbarContainer-rt.gif') no-repeat left bottom; /*
orientation=rt */
}
.UIToolbarContainer .MenuItem a {
- padding-right: 25px; /* orientation=lt */
- padding-left: 25px; /* orientation=rt */
+ padding-right: 15px; /* orientation=lt */
+ padding-left: 15px; /* orientation=rt */
}
-.UIToolbarContainer .ItemIcon {
+.UIToolbarContainer .MenuItem .DefaultPageIcon {
background-position: 10px center; /* orientation=lt */
- background-position: 95% center; /* orientation=rt */
+ background-position: 90% center; /* orientation=rt */
}
/**********************************/
.UIToolbarContainer .DashboardIcon {
- background: url('background/ToolbarContainer.gif') no-repeat 5px -64px; /*
orientation=lt */
- background: url('background/ToolbarContainer.gif') no-repeat 100% -64px; /*
orientation=rt */
+ background: url('background/ToolbarContainer.gif') no-repeat left -64px; /*
orientation=lt */
+ background: url('background/ToolbarContainer.gif') no-repeat right -64px; /*
orientation=rt */
}
.UIToolbarContainer .SiteIcon {
- background: url('background/ToolbarContainer.gif') no-repeat 5px -96px; /*
orientation=lt */
- background: url('background/ToolbarContainer.gif') no-repeat 100% -96px; /*
orientation=rt */
+ background: url('background/ToolbarContainer.gif') no-repeat left -96px; /*
orientation=lt */
+ background: url('background/ToolbarContainer.gif') no-repeat right -96px; /*
orientation=rt */
}
.UIToolbarContainer .SitesIcon {
- background: url('background/ToolbarContainer.gif') no-repeat 5px -96px; /*
orientation=lt */
- background: url('background/ToolbarContainer.gif') no-repeat 100% -96px; /*
orientation=rt */
+ background: url('background/ToolbarContainer.gif') no-repeat left -96px; /*
orientation=lt */
+ background: url('background/ToolbarContainer.gif') no-repeat right -96px; /*
orientation=rt */
}
.UIToolbarContainer .GroupIcon {
background: url('background/ToolbarContainer.gif') no-repeat left -128px; /*
orientation=lt */
- background: url('background/ToolbarContainer.gif') no-repeat 100% -128px; /*
orientation=rt */
- margin-left: 10px; /* orientation=lt */
- margin-right: 10px; /* orientation=rt */
+ background: url('background/ToolbarContainer.gif') no-repeat right -128px; /*
orientation=rt */
}
.UIToolbarContainer .EditorIcon {
- background: url('background/ToolbarContainer.gif') no-repeat 5px -161px; /*
orientation=lt */
- background: url('background/ToolbarContainer.gif') no-repeat 100% -161px; /*
orientation=rt */
+ background: url('background/ToolbarContainer.gif') no-repeat left -161px; /*
orientation=lt */
+ background: url('background/ToolbarContainer.gif') no-repeat right -161px; /*
orientation=rt */
}
.UIToolbarContainer .AddPageIcon {
- background: url('background/ToolbarContainer.gif') no-repeat 5px -320px; /*
orientation=lt */
- background: url('background/ToolbarContainer.gif') no-repeat 100% -320px; /*
orientation=rt */
+ background: url('background/ToolbarContainer.gif') no-repeat left -320px; /*
orientation=lt */
+ background: url('background/ToolbarContainer.gif') no-repeat right -320px; /*
orientation=rt */
}
.UIToolbarContainer .EditPageIcon {
- background: url('background/ToolbarContainer.gif') no-repeat 5px -352px; /*
orientation=lt */
- background: url('background/ToolbarContainer.gif') no-repeat 100% -352px; /*
orientation=rt */
+ background: url('background/ToolbarContainer.gif') no-repeat left -352px; /*
orientation=lt */
+ background: url('background/ToolbarContainer.gif') no-repeat right -352px; /*
orientation=rt */
}
.UIToolbarContainer .EditSiteIcon {
- background: url('background/ToolbarContainer.gif') no-repeat 5px -384px; /*
orientation=lt */
- background: url('background/ToolbarContainer.gif') no-repeat 100% -384px; /*
orientation=rt */
+ background: url('background/ToolbarContainer.gif') no-repeat left -384px; /*
orientation=lt */
+ background: url('background/ToolbarContainer.gif') no-repeat right -384px; /*
orientation=rt */
}
.UIToolbarContainer .ChangeLanguageIcon {
- background: url('background/ToolbarContainer.gif') no-repeat 5px -192px; /*
orientation=lt */
- background: url('background/ToolbarContainer.gif') no-repeat 100% -192px; /*
orientation=rt */
+ background: url('background/ToolbarContainer.gif') no-repeat left -192px; /*
orientation=lt */
+ background: url('background/ToolbarContainer.gif') no-repeat right -192px; /*
orientation=rt */
}
.UIToolbarContainer .ChangeSkinIcon {
- background: url('background/ToolbarContainer.gif') no-repeat 5px -224px; /*
orientation=lt */
- background: url('background/ToolbarContainer.gif') no-repeat 100% -224px; /*
orientation=rt */
+ background: url('background/ToolbarContainer.gif') no-repeat left -224px; /*
orientation=lt */
+ background: url('background/ToolbarContainer.gif') no-repeat right -224px; /*
orientation=rt */
}
.UIToolbarContainer .AccountSettingIcon {
- background: url('background/ToolbarContainer.gif') no-repeat 5px -256px; /*
orientation=lt */
- background: url('background/ToolbarContainer.gif') no-repeat 100% -256px; /*
orientation=rt */
+ background: url('background/ToolbarContainer.gif') no-repeat left -256px; /*
orientation=lt */
+ background: url('background/ToolbarContainer.gif') no-repeat right -256px; /*
orientation=rt */
}
.UIToolbarContainer .SignOutIcon {
- background: url('background/ToolbarContainer.gif') no-repeat 5px -288px; /*
orientation=lt */
- background: url('background/ToolbarContainer.gif') no-repeat 100% -288px; /*
orientation=rt */
+ background: url('background/ToolbarContainer.gif') no-repeat left -288px; /*
orientation=lt */
+ background: url('background/ToolbarContainer.gif') no-repeat right -288px; /*
orientation=rt */
}
.UIToolbarContainer .Name a {
Modified:
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIToolbarContainer/background/ToolbarContainer.gif
===================================================================
(Binary files differ)
Modified:
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIForms/UIFormWithTitle/Stylesheet.css
===================================================================
---
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIForms/UIFormWithTitle/Stylesheet.css 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIForms/UIFormWithTitle/Stylesheet.css 2009-11-26
15:54:09 UTC (rev 818)
@@ -30,15 +30,13 @@
padding-left: 15px; /* orientation=lt */
padding-right: 15px; /* orientation=rt */
background: url('background/TitleBG1x20.gif') repeat-x;
- height: 26px;
- vertical-align: middle; line-height: 26px;
- border: solid 1px #e3e2e2;
- color: #2b2b2b;
- font-weight: bold;
+ height: 19px;
+ vertical-align: middle; line-height: 19px;
+ border: solid 1px #b7b7b7;
}
.UIFormWithTitle .HorizontalLayout {
- background: #f7f7f7;
- border: 1px #e3e2e2 solid;
+ background: #efefef;
+ border: 1px #b7b7b7 solid;
border-top: none;
}
\ No newline at end of file
Modified:
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIForms/UIFormWithTitle/background/TitleBG1x20.gif
===================================================================
(Binary files differ)
Modified:
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIToolbar/Stylesheet.css
===================================================================
---
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIToolbar/Stylesheet.css 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIToolbar/Stylesheet.css 2009-11-26
15:54:09 UTC (rev 818)
@@ -212,7 +212,7 @@
float: right; /* orientation=rt */
text-align: center;
padding: 5px;
- width: 75px;
+ width: 150px;
}
.UIToolbar .BlueLargeToolbar .LablelIcon {
Modified:
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
---
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2009-11-26
15:54:09 UTC (rev 818)
@@ -638,9 +638,10 @@
UIPageCreationWizard.label.pageCreateWizard=Page Creation Wizard
UIPageCreationWizard.label.step=Step
UIPageCreationWizard.label.wizardSteps=Wizard Steps
-UIPageCreationWizard.label.step1.title=Select a Navigation Node and create the Page
-UIPageCreationWizard.label.step2.title=Select a Page Layout Template
-UIPageCreationWizard.label.step3.title=Re-arrange the Page Layout and add Portlets to the
Page
+UIPageCreationWizard.label.step1.title=Welcome to the Page Creation Wizard
+UIPageCreationWizard.label.step2.title=Select a Navigation Node and create the Page
+UIPageCreationWizard.label.step3.title=Select a Page Layout Template
+UIPageCreationWizard.label.step4.title=Re-arrange the Page Layout and add Portlets to the
Page
UIPageCreationWizard.label.abort=#{word.abort}
UIPageCreationWizard.label.back=#{word.back}
UIPageCreationWizard.label.next=#{word.next}
Modified:
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_es.properties
===================================================================
---
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_es.properties 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_es.properties 2009-11-26
15:54:09 UTC (rev 818)
@@ -638,9 +638,10 @@
UIPageCreationWizard.label.pageCreateWizard=Asistente Creaci\u00f3n de P\u00e1gina
UIPageCreationWizard.label.step=Paso
UIPageCreationWizard.label.wizardSteps=Pasos del Asistente
-UIPageCreationWizard.label.step1.title=Selecciona un Nodo de Navegaci\u00f3n y crea la
P\u00e1gina
-UIPageCreationWizard.label.step2.title=Selecciona una Plantilla de Distribuci\u00f3n de
P\u00e1gina
-UIPageCreationWizard.label.step3.title=Reorganiza la Distribuci\u00f3n de la P\u00e1gina
y a\u00f1ade Portlets a la P\u00e1gina
+UIPageCreationWizard.label.step1.title=Bienvenido al Asistente Creaci\u00f3n de
P\u00e1gina
+UIPageCreationWizard.label.step2.title=Selecciona un Nodo de Navegaci\u00f3n y crea la
P\u00e1gina
+UIPageCreationWizard.label.step3.title=Selecciona una Plantilla de Distribuci\u00f3n de
P\u00e1gina
+UIPageCreationWizard.label.step4.title=Reorganiza la Distribuci\u00f3n de la P\u00e1gina
y a\u00f1ade Portlets a la P\u00e1gina
UIPageCreationWizard.label.abort=#{word.abort}
UIPageCreationWizard.label.back=#{word.back}
UIPageCreationWizard.label.next=#{word.next}
Modified:
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties
===================================================================
---
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties 2009-11-26
15:54:09 UTC (rev 818)
@@ -614,9 +614,10 @@
UIPageCreationWizard.label.pageCreateWizard=Assistant de création de page
UIPageCreationWizard.label.step=Etape
UIPageCreationWizard.label.wizardSteps=Etapes de l'assistant
-UIPageCreationWizard.label.step1.title=Sélectionner un noeud pour la page et indiquer le
nom de la page
-UIPageCreationWizard.label.step2.title=Sélectionner un modèle d'organisation de page
-UIPageCreationWizard.label.step3.title=Ré-organiser la page et ajouter des portlets
+UIPageCreationWizard.label.step1.title=Bienvenue dans l'assistant de création de
page
+UIPageCreationWizard.label.step2.title=Sélectionner un noeud pour la page et indiquer le
nom de la page
+UIPageCreationWizard.label.step3.title=Sélectionner un modèle d'organisation de page
+UIPageCreationWizard.label.step4.title=Ré-organiser la page et ajouter des portlets
UIPageCreationWizard.label.abort=#{word.abort}
UIPageCreationWizard.label.back=#{word.back}
UIPageCreationWizard.label.next=#{word.next}
Modified:
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ru.properties
===================================================================
---
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ru.properties 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ru.properties 2009-11-26
15:54:09 UTC (rev 818)
@@ -628,9 +628,10 @@
UIPageCreationWizard.label.pageCreateWizard=Мастер создания страниц
UIPageCreationWizard.label.step=Шаг
UIPageCreationWizard.label.wizardSteps=Шаги
-UIPageCreationWizard.label.step1.title=Выберите узел навигации и создайте страницу
-UIPageCreationWizard.label.step2.title=Выберите макет страницы
-UIPageCreationWizard.label.step3.title=Измените макет и добавьте портлеты
+UIPageCreationWizard.label.step1.title=Добро пожаловать в мастер создания страниц
+UIPageCreationWizard.label.step2.title=Выберите узел навигации и создайте страницу
+UIPageCreationWizard.label.step3.title=Выберите макет страницы
+UIPageCreationWizard.label.step4.title=Измените макет и добавьте портлеты
UIPageCreationWizard.label.abort=#{word.abort}
UIPageCreationWizard.label.back=#{word.back}
UIPageCreationWizard.label.next=#{word.next}
Modified:
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_uk.properties
===================================================================
---
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_uk.properties 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_uk.properties 2009-11-26
15:54:09 UTC (rev 818)
@@ -619,9 +619,10 @@
UIPageCreationWizard.label.pageCreateWizard=Wizard-створювач сторінок
UIPageCreationWizard.label.step=Крок
UIPageCreationWizard.label.wizardSteps=Wizard кроки
-UIPageCreationWizard.label.step1.title=Вибрати навігаційний вузол і створити сторінку
-UIPageCreationWizard.label.step2.title=Вибрати шаблон сторінкової схеми
-UIPageCreationWizard.label.step3.title=Перекомпонувати схему сторінки і додати портлети
+UIPageCreationWizard.label.step1.title=Вітаємо на сторінці Wizard-створювача
+UIPageCreationWizard.label.step2.title=Вибрати навігаційний вузол і створити сторінку
+UIPageCreationWizard.label.step3.title=Вибрати шаблон сторінкової схеми
+UIPageCreationWizard.label.step4.title=Перекомпонувати схему сторінки і додати портлети
UIPageCreationWizard.label.abort=#{word.abort}
UIPageCreationWizard.label.back=#{word.back}
UIPageCreationWizard.label.next=#{word.next}
Modified:
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
===================================================================
---
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties 2009-11-26
15:54:09 UTC (rev 818)
@@ -619,9 +619,10 @@
UIPageCreationWizard.label.pageCreateWizard=Khởi tạo trang bằng Wizard
UIPageCreationWizard.label.step=Bước
UIPageCreationWizard.label.wizardSteps=Các bước tạo trang
-UIPageCreationWizard.label.step1.title=Chọn một node của trang và tạo tên trang.
-UIPageCreationWizard.label.step2.title=Lựa chọn cách trình bày trang theo mẫu.
-UIPageCreationWizard.label.step3.title=Sắp xếp lại cách trình bày trang và thêm Portlet
vào trang.
+UIPageCreationWizard.label.step1.title=Chào mừng bạn đến với khởi tạo trang bằng Wizard.
+UIPageCreationWizard.label.step2.title=Chọn một node của trang và tạo tên trang.
+UIPageCreationWizard.label.step3.title=Lựa chọn cách trình bày trang theo mẫu.
+UIPageCreationWizard.label.step4.title=Sắp xếp lại cách trình bày trang và thêm Portlet
vào trang.
UIPageCreationWizard.label.abort=#{word.abort}
UIPageCreationWizard.label.back=#{word.back}
UIPageCreationWizard.label.next=#{word.next}
Modified:
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/database/database-configuration.xml
===================================================================
---
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/database/database-configuration.xml 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/database/database-configuration.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -33,11 +33,6 @@
<name>hibernate.properties</name>
<description>Default Hibernate Service</description>
<property name="hibernate.show_sql" value="false"/>
- <property name="hibernate.current_session_context_class"
value="thread"/>
- <property name="hibernate.cache.use_second_level_cache"
value="true"/>
- <property name="hibernate.cache.use_query_cache"
value="true"/>
- <!--CHANGEME HashtableCacheProvider shold not be used in production env-->
- <property name="hibernate.cache.provider_class"
value="org.hibernate.cache.HashtableCacheProvider"/>
<property name="hibernate.cglib.use_reflection_optimizer"
value="true"/>
<property name="hibernate.connection.url"
value="jdbc:hsqldb:file:../temp/data/exodb${container.name.suffix}"/>
<property name="hibernate.connection.driver_class"
value="org.hsqldb.jdbcDriver"/>
Modified:
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-config.xml
===================================================================
---
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-config.xml 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-config.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -20,9 +20,9 @@
-->
-<jboss-identity xmlns="urn:picketlink:idm:config:v1_0_0_cr1"
+<jboss-identity xmlns="urn:jboss:identity:idm:config:v1_0_beta"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:picketlink:idm:config:v1_0_0_cr1
identity-config.xsd">
+ xsi:schemaLocation="urn:jboss:identity:idm:config:v1_0_alpha
identity-config.xsd">
<realms>
<realm>
<id>PortalRealm</id>
@@ -35,7 +35,7 @@
<repositories>
<repository>
<id>PortalRepository</id>
-
<class>org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository</class>
+
<class>org.jboss.identity.idm.impl.repository.WrapperIdentityStoreRepository</class>
<external-config/>
<default-identity-store-id>HibernateStore</default-identity-store-id>
<default-attribute-store-id>HibernateStore</default-attribute-store-id>
@@ -46,7 +46,7 @@
<identity-stores>
<identity-store>
<id>HibernateStore</id>
-
<class>org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl</class>
+
<class>org.jboss.identity.idm.impl.store.hibernate.HibernateIdentityStoreImpl</class>
<external-config/>
<supported-relationship-types>
<relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
Modified:
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml
===================================================================
---
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -23,50 +23,54 @@
<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
-
<component>
-
<key>org.exoplatform.services.organization.idm.PicketLinkIDMService</key>
-
<type>org.exoplatform.services.organization.idm.PicketLinkIDMServiceImpl</type>
+ <key>org.exoplatform.services.organization.jbidm.JBossIDMService</key>
+
<type>org.exoplatform.services.organization.jbidm.JBossIDMServiceImpl</type>
<init-params>
<value-param>
<name>config</name>
<value>war:/conf/organization/idm-config.xml</value>
</value-param>
+ <values-param>
+ <name>hibernate.annotations</name>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttributeValue</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredential</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectTextAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateRealm</value>
+ </values-param>
+ <properties-param>
+ <name>hibernate.properties</name>
+ <property name="hibernate.hbm2ddl.auto"
value="update"/>
+ <property name="hibernate.current_session_context_class"
value="thread"/>
+ <property name="hibernate.show_sql"
value="false"/>
+ <property name="hibernate.cglib.use_reflection_optimizer"
value="true"/>
+ <property name="hibernate.connection.url"
value="jdbc:hsqldb:file:../temp/data/exodb${container.name.suffix}"/>
+ <property name="hibernate.connection.driver_class"
value="org.hsqldb.jdbcDriver"/>
+ <property name="hibernate.connection.autocommit"
value="true"/>
+ <property name="hibernate.connection.username"
value="sa"/>
+ <property name="hibernate.connection.password"
value=""/>
+ <property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect"/>
+ <property name="hibernate.c3p0.min_size"
value="5"/>
+ <property name="hibernate.c3p0.max_size"
value="20"/>
+ <property name="hibernate.c3p0.timeout"
value="1800"/>
+ <property name="hibernate.c3p0.max_statements"
value="50"/>
+ </properties-param>
+
</init-params>
</component>
-
<component>
<key>org.exoplatform.services.organization.OrganizationService</key>
-
<type>org.exoplatform.services.organization.idm.PicketLinkIDMOrganizationServiceImpl</type>
+
<type>org.exoplatform.services.organization.jbidm.JBossIDMOrganizationServiceImpl</type>
</component>
- <external-component-plugins>
-
<target-component>org.exoplatform.services.database.HibernateService</target-component>
- <component-plugin>
- <name>add.hibernate.mapping</name>
- <set-method>addPlugin</set-method>
-
<type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
- <init-params>
- <values-param>
- <name>hibernate.mapping</name>
- <value>mappings/HibernateRealm.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml</value>
- <value>mappings/HibernateIdentityObject.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectCredential.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectCredentialType.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectAttribute.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectType.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectRelationship.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectRelationshipType.hbm.xml</value>
-
<value>mappings/HibernateIdentityObjectRelationshipName.hbm.xml</value>
- </values-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-
-
</configuration>
Modified:
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/portal/application-registry-configuration.xml
===================================================================
---
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/portal/application-registry-configuration.xml 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/portal/application-registry-configuration.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -378,11 +378,11 @@
</object-param>
<object-param>
- <name>Gadgets</name>
+ <name>eXoGadgets</name>
<description>Gadgets</description>
<object
type="org.exoplatform.application.registry.ApplicationCategory">
<field name="name">
- <string>Gadgets</string>
+ <string>eXoGadgets</string>
</field>
<field name="displayName">
<string>Gadgets</string>
@@ -402,7 +402,7 @@
<value>
<object
type="org.exoplatform.application.registry.Application">
<field name="categoryName">
- <string>Gadgets</string>
+ <string>eXoGadgets</string>
</field>
<field name="applicationName">
<string>Todo</string>
@@ -431,7 +431,7 @@
<value>
<object
type="org.exoplatform.application.registry.Application">
<field name="categoryName">
- <string>Gadgets</string>
+ <string>eXoGadgets</string>
</field>
<field name="applicationName">
<string>Calendar</string>
@@ -462,7 +462,7 @@
<value>
<object
type="org.exoplatform.application.registry.Application">
<field name="categoryName">
- <string>Gadgets</string>
+ <string>eXoGadgets</string>
</field>
<field name="applicationName">
<string>Calculator</string>
@@ -493,7 +493,7 @@
<value>
<object
type="org.exoplatform.application.registry.Application">
<field name="categoryName">
- <string>Gadgets</string>
+ <string>eXoGadgets</string>
</field>
<field name="applicationName">
<string>rssAggregator</string>
Modified:
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/pages.xml
===================================================================
---
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/pages.xml 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/pages.xml 2009-11-26
15:54:09 UTC (rev 818)
@@ -103,6 +103,13 @@
<portlet>
<application-ref>web</application-ref>
<portlet-ref>SiteMapPortlet</portlet-ref>
+ <preferences>
+ <preference>
+ <name>url</name>
+ <value>http://www.facebook.com</value>
+ <read-only>false</read-only>
+ </preference>
+ </preferences>
</portlet>
<title>SiteMap</title>
<access-permissions>Everyone</access-permissions>
Modified:
portal/branches/wsrp-integration/web/portal/src/main/webapp/groovy/webui/core/UIWizard.gtmpl
===================================================================
---
portal/branches/wsrp-integration/web/portal/src/main/webapp/groovy/webui/core/UIWizard.gtmpl 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/web/portal/src/main/webapp/groovy/webui/core/UIWizard.gtmpl 2009-11-26
15:54:09 UTC (rev 818)
@@ -39,7 +39,7 @@
}
strStep = _ctx.appRes(uicomponent.getId() + ".label.step") +
String.valueOf(j);
if(i != step) {
- actionLink = uicomponent.url("ViewStep" + String.valueOf(i));
+ actionLink = uicomponent.url("ViewStep" + String.valueOf(i));0
print "<a href=\"$actionLink\"
title=\"$strStep\">";
} else print "<a href=\"#\" class=\"SelectedStep\"
title=\"$strStep\">";
Modified:
portal/branches/wsrp-integration/web/portal/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
===================================================================
---
portal/branches/wsrp-integration/web/portal/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/web/portal/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2009-11-26
15:54:09 UTC (rev 818)
@@ -92,4 +92,10 @@
</div>
<div class="ClearBoth"><span></span></div>
</div>
-
+<div class="BottomDecoratorHome">
+ <div class="BottomDecoratorLeft">
+ <div class="BottomDecoratorRight">
+ <div
class="BottomDecoratorMiddle"><span></span></div>
+ </div>
+ </div>
+</div>
Modified:
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationStatistic.java
===================================================================
---
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationStatistic.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationStatistic.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -51,11 +51,6 @@
this.appId = appId;
}
- public String getAppId()
- {
- return appId;
- }
-
/**
* Log the time.
*
Modified:
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationStatisticService.java
===================================================================
---
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationStatisticService.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationStatisticService.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -19,6 +19,8 @@
package org.exoplatform.portal.application;
+import org.exoplatform.application.registry.Application;
+import org.exoplatform.application.registry.ApplicationRegistryService;
import org.exoplatform.management.annotations.Managed;
import org.exoplatform.management.annotations.ManagedDescription;
import org.exoplatform.management.annotations.ManagedName;
@@ -29,7 +31,11 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
+import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
@@ -44,11 +50,17 @@
public class ApplicationStatisticService implements Startable
{
- /** . */
- private final ConcurrentMap<String, ApplicationStatistic> apps = new
ConcurrentHashMap<String, ApplicationStatistic>();
+ private ApplicationRegistryService appRegistryService;
- public ApplicationStatisticService()
+ private ConcurrentMap<String, ApplicationStatistic> apps = new
ConcurrentHashMap<String, ApplicationStatistic>();
+
+ private final String ASC = "ASC";
+
+ private final String DESC = "DESC";
+
+ public ApplicationStatisticService(ApplicationRegistryService appRegistryService)
{
+ this.appRegistryService = appRegistryService;
}
/*
@@ -58,9 +70,22 @@
@ManagedDescription("The list of application identifiers sorted
alphabetically")
public String[] getApplicationList()
{
- List<String> list = new ArrayList<String>(apps.keySet());
- Collections.sort(list);
- return list.toArray(new String[list.size()]);
+ List<Application> list = null;
+ try
+ {
+ list = appRegistryService.getAllApplications();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ List<String> appIds = new ArrayList<String>();
+ for (Application app : list)
+ {
+ appIds.add(app.getId());
+ }
+ Collections.sort(appIds);
+ return appIds.toArray(new String[appIds.size()]);
}
/*
@@ -133,7 +158,28 @@
@ManagedDescription("The list of the 10 slowest applications")
public String[] getSlowestApplications()
{
- return getApplicationsSortedByAverageTime(true);
+ List<Application> list = null;
+ Map application = new HashMap();
+ try
+ {
+ list = appRegistryService.getAllApplications();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+
+ for (Application app : list)
+ {
+ ApplicationStatistic appSta = getApplicationStatistic(app.getId());
+ // remove application haven't loaded
+ if (appSta.getAverageTime() != 0)
+ {
+ application.put(app.getId(), appSta.getAverageTime());
+ }
+ }
+
+ return sort(application, DESC);
}
/*
@@ -143,32 +189,28 @@
@ManagedDescription("The list of the 10 fastest applications")
public String[] getFastestApplications()
{
- return getApplicationsSortedByAverageTime(false);
- }
-
- private String[] getApplicationsSortedByAverageTime(boolean desc)
- {
- List<ApplicationStatistic> list = new
ArrayList<ApplicationStatistic>();
- for (ApplicationStatistic app : apps.values())
+ List<Application> list = null;
+ Map application = new HashMap();
+ try
{
- if (app.getAverageTime() > 0)
- {
- list.add(app);
- }
+ list = appRegistryService.getAllApplications();
}
- Collections.sort(list, new Comparator<ApplicationStatistic>()
+ catch (Exception e)
{
- public int compare(ApplicationStatistic o1, ApplicationStatistic o2)
+ e.printStackTrace();
+ }
+
+ for (Application app : list)
+ {
+ ApplicationStatistic appSta = getApplicationStatistic(app.getId());
+ // remove application haven't loaded
+ if (appSta.getAverageTime() != 0)
{
- return (int)Math.signum(o1.getAverageTime() - o2.getAverageTime());
+ application.put(app.getId(), appSta.getAverageTime());
}
- });
- if (desc)
- {
- Collections.reverse(list);
}
- List<ApplicationStatistic> sub = list.subList(0, Math.min(list.size(), 10));
- return asIds(sub);
+
+ return sort(application, ASC);
}
/*
@@ -178,34 +220,97 @@
@ManagedDescription("The list of the 10 most executed applications")
public String[] getMostExecutedApplications()
{
- ArrayList<ApplicationStatistic> list = new
ArrayList<ApplicationStatistic>();
- for (ApplicationStatistic app : apps.values())
+ List<Application> list = null;
+ Map application = new HashMap();
+ try
{
- if (app.executionCount() > 0)
- {
- list.add(app);
- }
+ list = appRegistryService.getAllApplications();
}
- Collections.sort(list, new Comparator<ApplicationStatistic>()
+ catch (Exception e)
{
- public int compare(ApplicationStatistic o1, ApplicationStatistic o2)
+ e.printStackTrace();
+ }
+
+ for (Application app : list)
+ {
+ ApplicationStatistic appSta = getApplicationStatistic(app.getId());
+ // remove application haven't loaded
+ if (appSta.executionCount() != 0)
{
- long diff = o1.executionCount() - o2.executionCount();
- return diff == 0 ? 0 : diff > 0 ? -1 : 1;
+ application.put(app.getId(), appSta.executionCount());
}
- });
- List<ApplicationStatistic> sub = list.subList(0, Math.min(list.size(), 10));
- return asIds(sub);
+ }
+
+ return sort(application, DESC);
}
- private String[] asIds(List<ApplicationStatistic> list)
+ /*
+ * sort map by value asc or desc
+ */
+ private String[] sort(Map source, String order)
{
- String[] array = new String[list.size()];
- for (int i = 0;i < list.size();i++)
+ String[] app = new String[10];
+ List<Object> list = new LinkedList<Object>(source.entrySet());
+ if (order.equals(ASC))
{
- array[i] = list.get(i).getAppId();
+ Collections.sort(list, new Comparator<Object>()
+ {
+ public int compare(Object o1, Object o2)
+ {
+ double value1 =
Double.parseDouble(((Map.Entry)(o1)).getValue().toString());
+ double value2 =
Double.parseDouble(((Map.Entry)(o2)).getValue().toString());
+ if (value1 > value2)
+ {
+ return 1;
+ }
+ else if (value1 < value2)
+ {
+ return -1;
+ }
+ else
+ {
+ return 0;
+ }
+ }
+ });
}
- return array;
+ else if (order.equals(DESC))
+ {
+ Collections.sort(list, new Comparator<Object>()
+ {
+ public int compare(Object o1, Object o2)
+ {
+ double value1 =
Double.parseDouble(((Map.Entry)(o1)).getValue().toString());
+ double value2 =
Double.parseDouble(((Map.Entry)(o2)).getValue().toString());
+ if (value2 > value1)
+ {
+ return 1;
+ }
+ else if (value2 < value1)
+ {
+ return -1;
+ }
+ else
+ {
+ return 0;
+ }
+ }
+ });
+ }
+
+ int index = 0;
+ for (Iterator it = list.iterator(); it.hasNext();)
+ {
+ Map.Entry entry = (Map.Entry)it.next();
+ app[index] = (String)entry.getKey();
+ index++;
+ if (index >= app.length)
+ {
+ break;
+ }
+ }
+ return app;
+
}
private double toSeconds(double value)
Modified:
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ModelAdapter.java
===================================================================
---
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ModelAdapter.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ModelAdapter.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -183,7 +183,7 @@
public ApplicationState<Gadget> update(ExoContainer container,
ExoPortletState updateState,
ApplicationState<Gadget> gadgetApplicationState) throws Exception
{
- throw new UnsupportedOperationException("Cannot edit gadget
preferences");
+ throw new UnsupportedOperationException("todo / julien");
}
@Override
Modified:
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
===================================================================
---
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -149,7 +149,6 @@
private List<String> supportModes_;
private List<QName> supportedProcessingEvents_;
- private List<QName> supportedPublishingEvents_;
private List<String> supportedPublicParams_;
private boolean portletInPortal_ = true;
private StateString navigationalState;
@@ -489,49 +488,14 @@
QName eventName = iter.next();
if (eventName.equals(name))
{
- log.info("The Portlet " + producerOfferedPortletContext + "
supports comsuming the event : " + name);
+ log.info("The Portlet " + producerOfferedPortletContext + "
supports the event : " + name);
return true;
}
}
- log.info("The portlet " + producerOfferedPortletContext + "
doesn't support consuming the event : " + name);
+ log.info("The portlet " + producerOfferedPortletContext + "
doesn't support the event : " + name);
return false;
}
- public boolean supportsPublishingEvent (QName name)
- {
- if (supportedPublishingEvents_ == null)
- {
- org.gatein.pc.api.Portlet portlet = getProducedOfferedPortlet();
-
- if (portlet == null)
- {
- log.info("Could not find portlet with ID : " +
producerOfferedPortletContext.getId());
- return false;
- }
-
- Map<QName, EventInfo> producedEvents = (Map<QName,
EventInfo>)portlet.getInfo().getEventing().getProducedEvents();
-
- if (producedEvents == null)
- {
- return false;
- }
-
- supportedPublishingEvents_ = new
ArrayList<QName>(producedEvents.keySet());
- }
-
- for (Iterator<QName> iter = supportedPublishingEvents_.iterator();
iter.hasNext();)
- {
- QName eventName = iter.next();
- if (eventName.equals(name))
- {
- log.info("The Portlet " + producerOfferedPortletContext + "
supports producing the event : " + name);
- return true;
- }
- }
- log.info("The portlet " + producerOfferedPortletContext + "
doesn't support producing the event : " + name);
- return false;
- }
-
/**
* Tells, according to the info located in portlet.xml, wether this portlet supports
the public render parameter
* given as a method argument
Modified:
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
===================================================================
---
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -211,11 +211,8 @@
{
for (UpdateNavigationalStateResponse.Event nsEvent : nsEvents)
{
- if (uiPortlet.supportsPublishingEvent(nsEvent.getName()))
- {
- javax.portlet.Event portletEvent = new PortletEvent(nsEvent.getName(),
nsEvent.getPayload());
- events.add(portletEvent);
- }
+ javax.portlet.Event portletEvent = new PortletEvent(nsEvent.getName(),
nsEvent.getPayload());
+ events.add(portletEvent);
}
}
@@ -600,8 +597,8 @@
setupPublicRenderParams(uiPortlet, request.getParameterMap());
//set render params
- String navState =
((PortalRequestContext)event.getRequestContext()).getRequestParameter(ExoPortletInvocationContext.NAVIGATIONAL_STATE_PARAM_NAME);
- uiPortlet.setNavigationalState(ParametersStateString.create(navState));
+ Map<String, String[]> renderParams =
((PortalRequestContext)event.getRequestContext()).getPortletParameters();
+ uiPortlet.setNavigationalState(ParametersStateString.create(renderParams));
}
}
Modified:
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationManagement.java
===================================================================
---
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationManagement.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationManagement.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -95,11 +95,7 @@
UserPortalConfigService portalConfigService =
uiManagement.getApplicationComponent(UserPortalConfigService.class);
PageNavigation navigation = uiNodeSelector.getSelectedNavigation();
- List<String> allPortalNames = portalConfigService.getAllPortalNames();
- if(allPortalNames.contains(navigation.getOwnerId()))
- {
- portalConfigService.update(navigation);
- }
+ portalConfigService.update(navigation);
UIPortal uiPortal = Util.getUIPortal();
setNavigation(uiPortal.getNavigations(), navigation);
UIPopupWindow uiPopup = uiManagement.getParent();
Modified:
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
===================================================================
---
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -495,8 +495,7 @@
}
else
{
- uiApp.addMessage(new
ApplicationMessage("UIPageNodeSelector.msg.notAvailable", null));
- return;
+ throw new Exception("Page don't exist!");
}
}
}
Modified:
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java
===================================================================
---
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -287,7 +287,6 @@
if (uiWizard.getSelectedStep() < THIRD_STEP)
{
- uiWizard.setShowActions(true);
uiWizard.setDescriptionWizard(uiWizard.getSelectedStep());
uiWizard.updateWizardComponent();
uiPortalApp.addMessage(new
ApplicationMessage("UIPageCreationWizard.msg.StepByStep", null));
Modified:
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java
===================================================================
---
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java 2009-11-26
15:37:51 UTC (rev 817)
+++
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java 2009-11-26
15:54:09 UTC (rev 818)
@@ -19,6 +19,7 @@
package org.exoplatform.portal.webui.portal;
+import org.exoplatform.application.gadget.GadgetRegistryService;
import org.exoplatform.application.registry.Application;
import org.exoplatform.commons.utils.PageList;
import org.exoplatform.portal.application.PortalRequestContext;
@@ -26,8 +27,13 @@
import org.exoplatform.portal.config.model.ApplicationType;
import org.exoplatform.portal.config.model.CloneApplicationState;
import org.exoplatform.portal.config.model.Container;
+import org.exoplatform.portal.config.model.TransientApplicationState;
+import org.exoplatform.portal.pom.spi.gadget.Gadget;
+import org.exoplatform.portal.pom.spi.portlet.Portlet;
+import org.exoplatform.portal.pom.spi.portlet.Preference;
import org.exoplatform.portal.webui.application.PortletState;
import org.exoplatform.portal.webui.application.UIApplicationList;
+import org.exoplatform.portal.webui.application.UIGadget;
import org.exoplatform.portal.webui.application.UIPortlet;
import org.exoplatform.portal.webui.container.UIContainerList;
import org.exoplatform.portal.webui.login.UILogin;
@@ -44,6 +50,10 @@
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.services.organization.Query;
import org.exoplatform.services.organization.User;
+import org.exoplatform.services.rss.parser.DefaultRSSChannel;
+import org.exoplatform.services.rss.parser.DefaultRSSItem;
+import org.exoplatform.services.rss.parser.RSSDocument;
+import org.exoplatform.services.rss.parser.RSSParser;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.web.application.JavascriptManager;
import org.exoplatform.webui.core.UIComponent;
@@ -53,6 +63,7 @@
import org.exoplatform.webui.event.EventListener;
import org.exoplatform.webui.exception.MessageException;
+import java.net.URI;
import java.util.Date;
import java.util.List;
@@ -86,9 +97,9 @@
static public class DeleteComponentActionListener extends
EventListener<UIComponent>
{
- private final static String UI_CONTAINER_PREFIX = "UIContainer-";
+ private final static String UI_CONTAINER = "UIContainer";
- private final static String UI_PORTLET_PREFIX = "UIPortlet-";
+ private final static String UI_PORTLET = "UIPortlet";
public void execute(Event<UIComponent> event) throws Exception
{
@@ -141,87 +152,42 @@
Util.showComponentLayoutMode(uiRemoveComponent.getClass());
PortalRequestContext pcontext =
(PortalRequestContext)event.getRequestContext();
-
- // Case1: current component is a portlet
+ String componentType = null;
if (uiComponent instanceof UIPortlet)
{
- removeComponent(id, UI_PORTLET_PREFIX, pcontext);
- return;
+ componentType = UI_PORTLET;
}
-
- // Case 2: current component is a container
- if (uiComponent instanceof org.exoplatform.portal.webui.container.UIContainer)
+ else if (uiComponent instanceof
org.exoplatform.portal.webui.container.UIContainer)
{
- org.exoplatform.portal.webui.container.UIContainer topAncestor =
-
getTopBlockContainer((org.exoplatform.portal.webui.container.UIContainer)uiParent);
-
- /**
- * topAncestor is null if the uiParent is either UIPortal or UIPage,
- * that happens when our container is a simple container
- */
- if (topAncestor == null)
- {
- removeComponent(id, UI_CONTAINER_PREFIX, pcontext);
- return;
- }
- /** Case of nested container like tab container, mixed container */
- else
- {
+ componentType = UI_CONTAINER;
+ org.exoplatform.portal.webui.container.UIContainer topAncestor =
getTopBlockContainer((org.exoplatform.portal.webui.container.UIContainer)uiParent);
+
+ //Case of nested container like tab container, mixed container
+ if(topAncestor != null){
String topAncestorId = topAncestor.getId();
-
- /** If the topAncestor has no child, then it is removed */
- if (topAncestor.getChildren().size() == 0)
- {
- /** Update server-side */
- UIContainer parentOfTopAncestor = topAncestor.getParent();
- parentOfTopAncestor.removeChildById(topAncestorId);
-
- /** Update client side */
- if (topAncestorId.startsWith(UI_CONTAINER_PREFIX))
- {
- topAncestorId =
topAncestorId.substring(UI_CONTAINER_PREFIX.length());
- topAncestor.setId(topAncestorId);
- }
- removeComponent(topAncestorId, UI_CONTAINER_PREFIX, pcontext);
- return;
+ //Add UIContainer- prefix to the id as it is required to be updated by
Ajax
+ if(!topAncestorId.startsWith("UIContainer-")){
+ topAncestor.setId("UIContainer-" + topAncestorId);
}
-
- /** If the uiParent is not the topAncestor and having no child, then it is
removed */
- if(uiParent.getChildren().size() == 0)
- {
- /** Update server-side */
- UIContainer itsParent = uiParent.getParent();
- itsParent.removeChildById(uiParent.getId());
- }
-
- /**
- * Update the topAncestor by Ajax
- */
- if (!topAncestorId.startsWith(UI_CONTAINER_PREFIX))
- {
- topAncestor.setId(UI_CONTAINER_PREFIX + topAncestorId);
- }
pcontext.addUIComponentToUpdateByAjax(topAncestor);
return;
}
}
+ if (componentType != null)
+ {
+ JavascriptManager jsManager = pcontext.getJavascriptManager();
+ jsManager.addJavascript(scriptRemovingComponent(id, componentType));
+
jsManager.addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
+ }
}
- /** Add Javascript script to remove component */
- private void removeComponent(String componentId, String componentType,
PortalRequestContext pcontext)
+ private String scriptRemovingComponent(String componentId, String componentType)
{
- String scriptRemovingComponent = scriptRemovingComponent(componentId,
componentType);
- JavascriptManager jsManager = pcontext.getJavascriptManager();
- jsManager.addJavascript(scriptRemovingComponent);
-
jsManager.addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
- }
-
- private String scriptRemovingComponent(String componentId, String prefix)
- {
StringBuffer buffer = new StringBuffer();
buffer.append("eXo.portal.UIPortal.removeComponent('");
- buffer.append(prefix);
+ buffer.append(componentType);
+ buffer.append("-");
buffer.append(componentId);
buffer.append("');");
return buffer.toString();
@@ -230,13 +196,12 @@
/**
* Returns the top ancestor( of type
* org.exoplatform.portal.webui.container.UIContainer but not of type
- * UIPortal or UIPage) of a given container
+ * UIPortal) of a given container
*/
private static org.exoplatform.portal.webui.container.UIContainer
getTopBlockContainer(
org.exoplatform.portal.webui.container.UIContainer container)
{
- if (container instanceof UIPortal || container instanceof UIPage)
- {
+ if(container instanceof UIPortal){
return null;
}
org.exoplatform.portal.webui.container.UIContainer topAncestor = container;
@@ -244,8 +209,7 @@
try
{
intermediateCont = topAncestor.getParent();
- while (intermediateCont != null && !(intermediateCont instanceof
UIPortal)
- && !(intermediateCont instanceof UIPage))
+ while (intermediateCont != null && !(intermediateCont instanceof
UIPortal))
{
topAncestor = intermediateCont;
intermediateCont = topAncestor.getParent();
@@ -341,6 +305,15 @@
app = appList.getApplication(sourceId);
ApplicationType applicationType = app.getType();
+ // TanPD: Hardcoded to fix bug GTNPORTAL-91
+ Application temp = null;
+ if (applicationType.equals(ApplicationType.GADGET))
+ {
+ applicationType = ApplicationType.PORTLET;
+ temp = app;
+ app =
appList.getApplication("dashboard/Gadget_Wrapper_Portlet");
+ }
+
//
UIPortlet uiPortlet = uiTarget.createUIComponent(UIPortlet.class, null,
null);
if (app.getDisplayName() != null)
@@ -369,9 +342,41 @@
//
uiPortlet.setState(new PortletState(state, applicationType));
+
+ // TanPD: Fix bug GTNPORTAL-91
+ if (temp != null &&
applicationType.equals(ApplicationType.PORTLET))
+ {
+ Portlet pref = uiPortlet.getPreferences();
+ try
+ {
+ UIGadget uiGadget = uiPortlet.createUIComponent(UIGadget.class,
null, null);
+ uiGadget.setState(new
TransientApplicationState<Gadget>(temp.getApplicationName()));
+ pref.setValue("url", uiGadget.getUrl());
+ }
+ catch (Exception e)
+ {
+ // Fix in case: RSS Reader Gadget
+ Preference aggIdPref =
pref.getPreference("aggregatorId");
+ String aggregatorId = null;
+ if (aggIdPref == null || aggIdPref.getValue() == null ||
aggIdPref.getValue().length() == 0)
+ aggregatorId = "rssAggregator";
+ else
+ aggregatorId = aggIdPref.getValue();
+ GadgetRegistryService gadgetSrv =
uiApp.getApplicationComponent(GadgetRegistryService.class);
+ org.exoplatform.application.gadget.Gadget gadget =
gadgetSrv.getGadget(aggregatorId);
+ // TODO make sure it's an rss feed
+ // TODO make sure that we did not add it already
+ UIGadget uiGadget = uiPortlet.createUIComponent(UIGadget.class,
null, null);
+ uiGadget.setState(new
TransientApplicationState<org.exoplatform.portal.pom.spi.gadget.Gadget>(
+ gadget.getName()));
+ pref.setValue("url", uiGadget.getUrl());
+ }
+ }
+
uiPortlet.setPortletInPortal(uiTarget instanceof UIPortal);
uiPortlet.setShowEditControl(true);
uiSource = uiPortlet;
+
}
List<UIComponent> children = uiTarget.getChildren();
uiSource.setParent(uiTarget);